[kramdown-users] why can't kramdown just leave my HTML alone?

Matt Neuburg matt at tidbits.com
Thu Jul 22 13:37:27 EDT 2010


On or about 7/22/10 2:24 AM, thus spake "Shawn Van Ittersum"
<svicalifornia at gmail.com>:

> I second this.  It's very strange for attributes to be rearranged, and
> especially for src to come before alt in an img tag.
> 
> Thomas, perhaps I don't understand, what was the motivation to have kramdown
> parse HTML?

And especially when I've *explicitly* said markdown="0". Isn't that supposed
to mean "hands off"?

m.

> On Wed, 21 Jul 2010 20:14:30 -0700, Matt Neuburg wrote:
>> require 'rubygems'
>> require 'kramdown'
>> s = '<div markdown="0">'
>> s += '<img src="dummy.png" alt="nothing" />'
>> s += '</div>'
>> puts Kramdown::Document.new(s).to_html
>> 
>> #=> <div><img alt="nothing" src="dummy.png" /></div>
>> 
>> But that isn't what I said, is it? Why can't kramdown just leave my img tag
>> alone? I might have a reason to have the src attribute come first. This is
>> just not nice behavior.

-- 
matt neuburg, phd = matt at tidbits.com, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf
AppleScript: the Definitive Guide, 2nd edition
http://www.tidbits.com/matt/default.html#applescriptthings
Take Control of Exploring & Customizing Snow Leopard
http://tinyurl.com/kufyy8
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