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

Thomas Leitner t_leitner at gmx.at
Wed Oct 13 04:10:42 EDT 2010


On 2010-10-13 05:33 +1100 Shawn Van Ittersum wrote:
> You can solve this by finding the code spans on each line and
> extracting them (replacing them with hash markers, as in the example
> GFM code I sent previously) before applying the other parsers,
> including the table cell parser.

Extracting the parts and using hashes is not necessary, this can be
done in nicer ways.

However, think about the following example:

    This is *not* a `code | span, it continues on the
    second line and ends` here | some other text here

If I parse for code spans line by line, the code span which continues
to the second line, is not found and therefore this is interpreted as a
table with two rows and two cells each. However, a human reader would
probably see the code span...

I have come to the conclusion that tables should probably be created
out of paragraphs in a later step (after a whole paragraph is read) but
I have to think a bit more about this...

-- Thomas


More information about the kramdown-users mailing list