Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super-WIP take terminal render for lowdown #529

Closed
wants to merge 1 commit into from

Conversation

Ericson2314
Copy link
Contributor

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 #362 (comment) "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 of lowdown is vaguely similar and this wasn't deduplicated with that either.)

@Ericson2314 Ericson2314 changed the title WIP take terminal render for lowdown Super-WIP take terminal render for lowdown Jan 29, 2024
@jgm
Copy link
Member

jgm commented Jan 29, 2024

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.

@Ericson2314
Copy link
Contributor Author

Do you think there will be enough accessors functions to get out all the node-type-specific node info from the union?

@jgm
Copy link
Member

jgm commented Jan 29, 2024

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.

@Ericson2314
Copy link
Contributor Author

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 :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for ANSI output format
2 participants