jgm / peg-markdown

An implementation of markdown in C, using a PEG grammar
Other
696 stars 140 forks source link

Underlining headings requires more than two `=` / `-` #17

Closed rekado closed 12 years ago

rekado commented 12 years ago

This snippet is not supported in peg-markdown, but works with Redcarpet:

This is a heading
=

This is a sub-heading
-

Headings are only rendered when three or more =/- are used. According to the specs, any number of = or - should work.

jgm commented 12 years ago

Yes, this is a bug. Gruber's markdown spec says that the underline in a setext header can be any number of - or = characters.

+++ rekado [Nov 04 12 05:23 ]:

This snippet is not supported in peg-markdown, but works with Redcarpet:

This is a heading

This is a sub-heading

Headings are only rendered when three or more =/- are used. [1]According to the specs, any number of = or - should work.

— Reply to this email directly or [2]view it on GitHub. [Jshd8sI44GVrKZBvymxqKIaG_N9k74d6Pb3IIO31lpTIwmDBSrsvvbIbfdWvA_JK.gif]

References

  1. http://daringfireball.net/projects/markdown/syntax#header
  2. https://github.com/jgm/peg-markdown/issues/17