sirthias / pegdown

A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions
http://pegdown.org
Apache License 2.0
1.29k stars 218 forks source link

Trailing Spaces/Tabs should be allowed after --- or === for Setext headers #176

Closed vsch closed 9 years ago

vsch commented 9 years ago

If there are spaces after the last - or = in an Setext header then the header is parsed as a paragraph.

straight from http://docutils.sourceforge.net/mirror/setext/sermon_1+920315.etx.txt

This is for the --- or === line

 (a) scan forward for a line that's made up of at least 2 leading
      dash characters (=minimum length; a practical consideration)
      with possible trailing white space (spaces, tabs and other
      defacto invisible [control] characters). If applicable, grep
      all such lines globally using the pattern "^--[-]*[\s\t]*$"

I have a fix and test.

Will post PR with a bunch of other parser compatibility and other source range anomalies. Including #175

sirthias commented 9 years ago

Great. Thanks, Vladimir!

sirthias commented 9 years ago

Closed by #181.