[kramdown-users] div indentation with kramdown?
Matt Neuburg
matt at tidbits.com
Mon Aug 15 13:00:00 EDT 2011
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.
require 'rubygems'
require 'kramdown'
s = <<END
<div class="photo">
<div style="display:table">
<div style="display:table-row">
<div style="display:table-cell; vertical-align:middle" markdown="1">
Testing.
</div>
</div>
</div>
</div>
END
p Kramdown::Document.new(s).to_html
Output is:
<div class="photo">
<div style="display:table">
<div style="display:table-row">
<div style="display:table-cell; vertical-align:middle">
<p>Testing.
</div>
</div></p>
</div>
</div>
</div></div>
Those extra </div> 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.
--
matt neuburg, phd = matt at tidbits.com, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
More information about the kramdown-users
mailing list