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

Reference Rule includes trailing blank lines in AST Node's text range #177

Closed vsch closed 9 years ago

vsch commented 9 years ago

Reference rule parses trailing blank lines and includes them as the source range of the node.

Reference should not include any blank lines, even the EOL at the end of the line is not needed since a reference does not span more than one line.

Only critical for syntax highlighting. Does not affect conversion to HTML.

I have a fix with a test.

vsch commented 9 years ago

The same applies to HTML Block. Also fixed.

vsch commented 9 years ago

The same applies to HorizontalRule. Also fixed.

sirthias commented 9 years ago

Closed by #181.