Let's say I have this code in HTML:
<p>Lorem ipsum, <b>volutpat</b>. Ut wisi enim ad minim veniam.</p>
How would I convert that to slim? Throughout all of Slim's documentation, it never once mentions bold, italic, or any other inline elements. I tried this:
p Lorem ipsum, b volutpat. Ut wisi enim ad minim veniam.
As expected it just added a 'b' to the text. I also tried using tubes:
p Lorem ipsum,
| b volutpat.
| Ut wisi enim ad minim veniam.
This gave me the exact same result, plus. If anyone could help, I'd greatly appreciate it! Here is just a few trials that I was trying to work out: http://codepen.io/spikeyty/pen/wruIs
It's sometimes not worth following every rule. Use this and you are fine.
p Lorem ipsum, <b>volutpat</b>. Ut wisi enim ad minim veniam.
You can also use Markdown directly in Slim if a lot of bolds and italics appear in your text, for example:
p Normal slim syntax.
markdown:
Lorem Markdownum, **volutpat**. Ut wisi *enim* ad minim `veniam`.
p
|Lorem ipsum,
b volutpat.
|Ut wisi enim ad minim veniam.
This gets rendered as "Lorem ipsum, volutpat. Ut wisi enim ad minim veniam." (see your updated codepen).
Source: https://groups.google.com/forum/#!topic/slim-template/h8fYkG5lj9k
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With