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

Shawn Van Ittersum svicalifornia at gmail.com
Mon Oct 11 07:09:00 EDT 2010

For whole-line code blocks (lines indented by spaces so that the entire line is considered a code-block), the solution is easy: don't apply kramdown processing to the contents of the line.

Is there any other syntax besides ` characters and leading spaces to trigger a code block?  If not, then I've covered both cases with simple, fast solutions to disable kramdown processing of the contents.


On Mon, 11 Oct 2010 09:50:00 +0200, Thomas Leitner wrote:
> On 2010-10-11 03:03 +1100 Shawn Van Ittersum wrote:
>> More generally, I think that kramdown should ignore the contents of
>> any code block or span.  I can't think of a good reason for kramdown
>> to interpret the contents of code blocks.  If it didn't, then this
>> table creation problem would go away.
> kramdown does ignore the contents of code spans and code blocks.
> However, the parsing code for tables would be much more complex and
> slower if we were to check for pipes in code spans. For example, what
> about this:
>     cell 1 | cell 2 with a `code | span
>     ending here` | cell 4
> It is actually rather hard to trigger a table since *each* line needs
> to have at least one pipe character *and* the table has to be on block
> boundaries. For example, the following is not converted to a table:
>     This is just some paragraph, showing the `|` character
>     and explaining why this is not a table.
> So the problem with the example from Matt is that the paragraph is so
> short that it fits on one line. Therefore you need to escape the pipe
> characters in such cases.
> -- Thomas
> _______________________________________________
> kramdown-users mailing list
> kramdown-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/kramdown-users

More information about the kramdown-users mailing list