C++ markdown parser devlog #1.
Got the inline parsing detection for code snippets and emphasis nodes working in my C++ markdown parser.
Issues I had:
- Duplication of paragraph nodes.
the first version didn't handle the newlines (\n) properly, thus creating an extra empty node when parsing every new block; it created the corresponding paragraph node, but due using EoF as delimiter, when seeing a newline didn't break the loop.
- Improper cleanup after each AST call.
I didn't thought of using null pointer as a fallback when the inline_parsing() was called, so sometimes when parsing emphasis nodes, it could return empty nodes (duplicated in memory) as well.