4 ms·
In addition, you can use something like the markdown filter for body text. :markdown ## Heading Content This is just some *emphatic* tex
by carbon8 16y ago
In addition, you can use something like the markdown filter for body text.
:markdown
## Heading Content
This is just some *emphatic* text. Maybe I'll talk about `$BASH_VERSION` here.
- krainboltgreene 16y agoAs someone who uses HAML constantly: 1. :markdown doesn't accept classes, ids, or any other modifiers like %tags. This makes for some difficult fugging. 2. You cant do - ruby or = ruby under :markdown or similar. This is terribly inconsistent and requires some stupid work arounds.
- carbon8 16y ago1. Discount, used by both RDiscount and BlueCloth, supports limited use of classes in inline text via pseudo-protocols in link-style tags. You can also use inline HTML in markdown. I believe that the latter is what most people do. 2. You can do the equivalent of = in Haml filters by enclosing the Ruby in #{}. For example, where sign_up_path is a Ruby helper method: :markdown [Sign Up](#{sign_up_path}) Personally, in the past I've put large blocks of mostly-static content (eg, a TOS) in a erb template or partial. I now often use the markdown filter for things like help documentation in my sites.
- krainboltgreene 16y agoThe :markdown "symbol" doesn't take a class. :markdown.red#item2 %list:markdown.red#item2 %list.red#item2:markdown ...
- carbon8 16y agoForgive me if I'm misunderstanding your point, but :markdown isn't a tag that gets output to html, it just designates the beginning of the block to be processed with markdown, so classes and ids aren't applicable. If you want the markdown block in a class or id, you just do this: #id.class :markdown [A link](/path) outputs: <div id="id" class="class"> <a href="/path">A link</a> </div>