[Kramdown-users] HTML span clarification

Eric Sunshine sunshine at sunshineco.com
Tue Nov 24 11:18:45 EST 2009


Hi Thomas,

The Kramdown documentation for HTML spans 
(http://kramdown.rubyforge.org/syntax.html#html-spans) states:

"Span level HTML tags ... have to be preceded by at least one non 
whitespace character on the same line so that kramdown correctly 
recognizes them as span level element and not as block level element."

If I read this correctly, then the following HTML {a}...{/a} element at 
the start of a paragraph should not be recognized as a span element. 
(HTML angle delimiters replaced by { and } to pacify broken email clients.)

   {a href="/" title="Product"}Product{/a} was released.
   Download it _now_.

Nevertheless, Kramdown produces the expected (and desired) output;

   {p}{a href="/" title="Product"}Product{/a} was released.
   Download it {em}now{/em}.{/p}

This output seems to contradict the documentation. On the other hand, I 
repeatedly run into situations where this sort of situation arises, so 
the present Kramdown behavior is desirable. Maruku utterly fails with 
this input and requires ugly work-arounds.

-- ES


More information about the Kramdown-users mailing list