aleclarson / markdown-ast

Tiny markdown parser
MIT License
40 stars 2 forks source link

Avoid trimming newline between text node and inline block node #5

Open aleclarson opened 5 years ago

aleclarson commented 5 years ago

For example, when a\n*b* is parsed, the line break before the italic text is lost.

To fix this, we should only trim trailing newlines when we know a block node is next.