[Kramdown-users] Expected HTML span behavior?

Eric Sunshine sunshine at sunshineco.com
Tue Nov 24 21:15:56 EST 2009

Hi Thomas,

Thomas Leitner wrote:
>> Rather than the expected:
>>    {p}Link: {a href="/" title="Foo Bar"}Foo Bar{/a}{/p}
>> Or perhaps, though unlikely:
>>    {p}Link: {a href="/" title="Foo
>>    Bar"}Foo Bar{/a}{/p}
> Since the syntax documentation is still in a state of flux, some cases
> are not described. As for your example, I also think that kramdown
> should output one of the above. I have added this to my TODO list -
> thanks!

Different browsers treat a newline in the the 'title' attribute 
differently. (Firefox folds out the newline in 'title' but Chrome and 
IE8 respect it.) Perhaps, therefore, it would be best for Kramdown to 
normalize attribute strings to the first "expected" output, where the 
newline is folded out, rather than the second.

On the one hand, though, it can be argued that it is not Kramdown's 
responsibility to appease different browsers, so folding out the newline 
should not be Kramdown's responsibility. On the other hand, Kramdown 
already appears to be manipulating the HTML element attributes 
(alphabetizing them?), so additionally folding out embedded newlines 
from attribute values is not so far fetched.

-- ES

More information about the Kramdown-users mailing list