Closed DivineDominion closed 7 years ago
Yes, if you pass to the parser complete blocks, or to be more precise, complete top-level blocks (e.g. complete list, not just single list item), then the references are the only problem.
It has to be top-level blocks in order to deal with sub-lists (list nesting), tight vs. loose lists or quoteblocks.
But also note I am not sure whether MD4C (at least without some improvements) can be used for your purpose. It does not provide mapping of parsed things to position (e.g. line number and/or offset) in the input.
With some effort it could be probably added, but honestly, it is currently not on my to-do-list.
Thanks, that clarifies the state of the repo! If you don't want to leave open questions like this tangling, you may close the issue as far as I am concerned. :)
Hi,
MD4C's SAX-like callbacks sound a lot more useful than the reference CMark AST implementation to implement syntax highlighting in an editor. Skimming the code, it appears only reference-style links and images would cause problems if the client does not pass the whole document but only parts of it, like the visible portion on screen or the last edited block of text. Did I get that right?
-- Christian