[kramdown-users] kramdown table-making has gone completely insane
Shawn Van Ittersum
svicalifornia at gmail.com
Thu Oct 14 06:24:42 EDT 2010
On Thu, 14 Oct 2010 08:30:14 +0200, Thomas Leitner wrote:
> Your above idea will obviously not work correctly, for example:
> This is a paragraph `with a lone backtick.
> This is another paragraph with a` lone backtick.
> The intention of the writer is clear: There are two paragraphs each
> containing a backtick. Since there is only one backtick in each
> paragraph, the writer correctly thought that he can escape it but he
> does not have to - and chose the latter.
But I would interpret it as a single paragraph block containing a multi-line code span. The failure to escape the backticks is not kramdown's problem to fix. I am strongly advocating that backticks are for code spans only, and they *must* be escaped if they are not intended to open code spans.
>> If someone puts a couple of unescaped backticks in the document, then
>> there's going to be a huge code span. But that's what is supposed to
>> happen. Backticks wrap code spans, pure and simple. If users don't
>> want code spans, they should escape their backticks.
> No, that's not supposed to happen since code span are span level
> elements and cannot cross, per definition, the boundaries of block
> level elements! And don't forget the rule about how markup in
> Markdown/kramdown works: if something is marked up correctly (e.g. two
> backticks in a paragraph delimiting a code span), it is correctly
> parsed and used, otherwise (e.g. only one backtick) it is output as is.
> So one does *not* have to escape a single backtick or a single asterisk
> or a single opening bracket or ...
Okay, but if a code span is opened on one line and closed several lines later, it is still contained inside one block. The so-called block boundaries (blank lines, etc.) inside the code span are irrelevant, because kramdown is supposed to be ignoring the contents of the code span.
Back to your example:
This is a paragraph `with a lone backtick.
This is another paragraph with a` lone backtick.
This would yield a single paragraph block:
<p>This is a paragraph <code>with a lone backtick.
This is another paragraph with a</code> lone backtick.</p>
The code span is wholly contained by the paragraph block.
More information about the kramdown-users