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 217 forks source link

TableCaption Node's start/end indices are not set #175

Closed vsch closed 9 years ago

vsch commented 9 years ago

The TableCaption node is not properly created in the parser resulting in startIndex, endIndex always being zero.

I have a fix and an AST test, here is the result of the new AST test without the fix, it shows the problem well:

[error]          TableCaptionNode [0-0]
[error]            TextNode [604-609] 'Table'
[error]            SpecialTextNode [609-610] ':'
[error]            TextNode [610-618] ' Caption'

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

sirthias commented 9 years ago

You rock! :)

sirthias commented 9 years ago

Closed by #181.

vsch commented 9 years ago

Thank the plugin. Visually highlighting the range makes finding bugs a piece of cake. I now have a “Debug” scheme in the plugin for myself. It has neon background colours for all the elements so that you can easily see where they start and end.

Best regards,

Vladimir.

On Aug 21, 2015, at 5:43 AM, Mathias notifications@github.com wrote:

You rock! :)

— Reply to this email directly or view it on GitHub https://github.com/sirthias/pegdown/issues/175#issuecomment-133354429.