markdown icon indicating copy to clipboard operation
markdown copied to clipboard

Parsing: add reference nodes to AST tree

Open quenbyako opened this issue 3 years ago • 1 comments

Here is the problem: autoresolving of referenced links works well, however, for me, it's strictly important to get reference link definitions unchanged. E.g. this code:

Hello [world][wiki-world]

[wiki-world]: https://wikipedia.com/blah-blah-blah

can't be parsed and rendered back again to same structure, instead of this, ast with markdown renderer, renders to this structure:

Hello [world](https://wikipedia.com/blah-blah-blah)

which isn't what i expect from syntax tree.

I looked a bit in code, and found that for now, links parser has overcomplicated structure, imho, so maybe it's time to refactor it a bit? As far as i understand, the proposed change is impossible with current implementation of links parser.

quenbyako avatar Jun 19 '22 22:06 quenbyako

I'm happy to accept patches but to set expectation: I'm not going to work on this myself.

kjk avatar Jun 19 '22 23:06 kjk