[kramdown-users] div indentation with kramdown?

Matt Neuburg matt at tidbits.com
Mon Aug 15 16:38:51 EDT 2011

On Aug 15, 2011, at 12:27 PM, Damien Pollet wrote:

> On 15 August 2011 19:00, Matt Neuburg <matt at tidbits.com> wrote:
>> I'm trying to lay out some div tags nicely with indentation and yet still have kramdown work, but I'm having trouble doing so.
> [...]
>> Those extra &lt;/div&gt; insertions are the problem. I can get rid of them by flattening the indentation (everything indented all the way to the left) but I'd rather not have to. :) Is there another option? Thx - m.
> I doubt it, since indentations 4 spaces and beyond are meaningful to kramdown.
> The best I can think of is to process your file piecewise, maybe by
> using erb or some other templating library to separate your html
> layout from the kramdown content per se.

Yeah, great minds think alike, as that is exactly what I ended up doing. If you look at the ERB examples, the first thing he does is run gsub on the template to remove whitespace from the start of every line. m.

More information about the kramdown-users mailing list