kjdev / hoextdown

Hoextdown is an extension to Hoedown
MIT License
23 stars 15 forks source link

Fix crash that occurs with empty headers with trailing whitespace when using TOC or header ids #12

Closed jasharpe closed 9 years ago

jasharpe commented 9 years ago

Fix crash that occurs with empty headers with trailing whitespace when using TOC or header ids. Defence in depth: handle NULLs properly in toc_header and rndr_header, but also change is_atxheader logic so that a header consisting only of whitespace isn't considered a header. This should prevent the header callback from ever being called with NULL content.

kjdev commented 9 years ago

It was fixed processing of empty header. Please check.

3997c15894da2d6b6008e3231d13d633ff8ccf87