Closed Ericson2314 closed 5 months ago
2000 lines more C for a more opinionated/open-ended feature (there is no way for a terminal rendering to be canonically correct, I would think) feels gross to me.
I'm inclined to agree with this. It's good to keep this library lean. Perhaps, for your purposes, you could develop this as a separate library, and then link it with cmark in your finished product.
Do you think there will be enough accessors functions to get out all the node-type-specific node info from the union?
Do you think there will be enough accessors functions to get out all the node-type-specific node info from the union?
You tell me. I believe the API exposes full information about the AST, but if something is missing, let us know.
Great; knowing that it's at least supposed to expose enough stuff to support a downstream renderer --- and thus any gaps can be filled --- is good :).
This doesn't work at all yet. It's just a sedded copy paste from https://github.com/kristapsdz/lowdown to close #362.
I'm just testing the waters here, per @jgm saying in https://github.com/commonmark/cmark/issues/362#issuecomment-1900820490 "I'd be open to it, but ...".
I will admit ~2000 lines more C for a more opinionated/open-ended feature (there is no way for a terminal rendering to be canonically correct, I would think) feels gross to me. (Maybe there are ways to deduplicate this with the rest of
cmark
, but I would not be confident in that. The rest oflowdown
is vaguely similar and this wasn't deduplicated with that either.)