souvikinator / notion-to-md

Convert notion pages, block and list of blocks to markdown (supports nesting and custom parsing)
https://www.npmjs.com/package/notion-to-md
MIT License
1.12k stars 91 forks source link

Fix leading and trailing space breaking annotation parsing #6

Closed dharshatharan closed 2 years ago

dharshatharan commented 2 years ago

When parsing annotated text, if the text has leading or trailing spaces, the parsed text doesn't render as expected in markdown. Here are some examples.

Screen Shot 2021-12-12 at 10 19 21 PM

This change fixes this problem by shifting the leading and trailing spaces outside the parsed text.

souvikinator commented 2 years ago

Thanks for contributing :)