What is the recommended method of displaying preformatted text (especially code samples with significant whitespace) with Slim?
For example, how to display the below (with correct indentation) using Slim:
<pre>
Vivamus eu lacinia nisi
Nam pretium urna magna
Donec sit amet enim ac augue luctus pharetra.
Pellentesque dictum
Enim vel
Cras risus lectus
</pre>
Embedded engines are an acceptable answer, but not preferred.
Well, all you need to do is use the pipe:
pre
| Vivamus eu lacinia nisi
Nam pretium urna magna
Donec sit amet enim ac augue luctus pharetra.
Pellentesque dictum
Enim vel
Cras risus lectus
Everything after the pipe is copied over. See the slim docs: http://rdoc.info/gems/slim/file/README.md#Text__
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