Search code examples
markdownjekyllgithub-pagesgithub-flavored-markdownkramdown

How do you disable tables in Kramdown?


So I recently made the switch from Maruku to Kramdown on Github Pages, and I ran into a problem:

Problem with Kramdown

Here's the markdown that's causing the problem:

Five days ago I wrote [Standardizing Harmony Classes]
(/standardizing-harmony-classes "Aadit M Shah | Standardizing Harmony Classes").

You see that pipe in "Aadit M Shah | Standardizing Harmony Classes"? Kramdown erroneously treats it as a table cell separator resulting in the horrendous table above, which is actually supposed to be a paragraph.

This makes no sense because the pipe separator is inside a link text literal, and markdown should not be applied to link text literals. Clearly this is a bug in Kramdown.

So how do you disable tables in Kramdown Jekyll? There are lots of places where I have pipes and I don't wish to change them. Is there any other solution to this problem?


Solution

  • Escaping the pipes as Gaurav suggested doesn't work as the backslashes appear in the output, which is wrong.

    Eventually I got so fed up with Kramdown that I shifted to Redcarpet instead. Now everything works like a charm.