[kramdown-users] block inline attribute list problem

Thomas Leitner t_leitner at gmx.at
Mon Oct 11 03:27:08 EDT 2010


On 2010-10-09 14:55 -0700 Matt Neuburg wrote:
> This, however, does nothing:
> 
> require 'kramdown'
> s = <<END
> {: #myid}
> <div>
> Testing
> </div>
> END
> puts Kramdown::Document.new(s).to_html
> 
> 
> <div>
> Testing
> </div>
> 
> I expect the div to gain the id value "myid", but it doesn't. Okay, so
> maybe the problem is that markdown is not turned on for this div.

Okay, it's a bit unusual to use a block IAL to set attributes on HTML
tags but it should certainly work.

> Let's try it:
> 
> 
> require 'kramdown'
> s = <<END
> {: #myid}
> <div markdown="1">
> Testing
> </div>
> END
> puts Kramdown::Document.new(s).to_html
> 
> 
> <div>
>   <p id="myid">Testing</p>
> </div>
> 
> 
> Hmmm. We've skipped the div and attached the id to the internal p.

Another bug you stumbled upon.

I have added these to my TODO list! Thanks for reporting!

-- Thomas


More information about the kramdown-users mailing list