[kramdown-users] kramdown table-making has gone completely insane

Shawn Van Ittersum svicalifornia at gmail.com
Mon Oct 11 14:47:29 EDT 2010

On Mon, 11 Oct 2010 20:28:57 +0200, Thomas Leitner wrote:
> This may be so but the above code is not very robust and probably based
> on the code of the original Markdown.pl implementation because it does
> exactly this. I don't know what else GFM does but the above code for
> code spans won't work in all situations. For example, consider this:
>     This is an <span title="some ` title">element `codespan`</span>
> The regexp will destroy the HTML `span` element and the code span it
> contains.

True, but is that legal kramdown?  Shouldn't the backtick in the title attribute be escaped?

> It also probably won't work correctly for code spans using multiple
> backticks (which is allowed by standard Markdown):
>     This is a `` ` `` code span and a literal ` backtick.

Hmm, that's true.

My main thought for this thread is that the pipe characters in Matt's original example should not have been interpreted as table delimiters.  They shouldn't need to be escaped, as they were already in a code span.


More information about the kramdown-users mailing list