DCsunset / pandoc-include

A pandoc filter to allow file and header inclusion
MIT License
63 stars 14 forks source link

Use RegEx for parsing include lines #41

Closed studerluk closed 9 months ago

studerluk commented 9 months ago

This replaces the if/else structure for detecting and parsing include statements with a RegEx based approach.

My experiance was that it is not always clear how pandoc will split a paragraph into Elements which makes using array index for detecting include statements unreliable especially when whild cards for the paths come into play.

DCsunset commented 9 months ago

It makes sense to use RegEx to parse it. Thanks for your contribution.

studerluk commented 9 months ago

Sure, I'm glad I can help