-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Matching tags with namespaces. #122
Comments
As of #184, fetching Node information like this has been removed (it may be added again in the future, but the backend has switched from C to Rust). |
Thanks for the update, if I'm understanding correctly, it's no longer possible to access the AST? |
If anyone wants the original behaviour, I forked this gem and it has all the original functionality and more: https://github.com/ioquatix/markly (including support for tag namespaces as an extension to common mark). |
At this moment, correct. The underlying Rust gem does support AST walking but it hasn't been a priority for me to implement in "C glue," so I used the major version break as an opportunity to remove it. Out of curiosity, what do you use AST walking for? I have found that wlaking over the resulting HTML has been much easier. Sure, it's a second pass, but there are many more tools to manipulate that data. |
I think for some use cases, processing the output HTML can be okay, but I would say that loosing this feature is a pretty big loss for this library, given that a lot of people using the 0.x version could be using that interface. For me, it was definitely one of the innovative features - before I was trying to process markdown after the fact using Kramdown, and it was much more robust to process the AST directly. I really liked the C interface you built with the AST in this gem, and my fork was really just about taking that to the next level in terms of searching and moving around nodes. |
I don't know if this is going to improve anyone's world or anything, but: I realized recently that I might need to expose the comrak AST parsing/walking here in Commonmark for another project (kivikakk/comrak#258) that I'm working on. I'll be working on this in the next few months so AST traversing may very well be coming back. (ccing @joeldrapper for #199) |
Thanks! Well, as you know I forked this project (https://github.com/ioquatix/markly) and still maintain the C API, since I depend heavily on the AST manipulations in my own project. What was important to me was rich AST operations, like finding, matching and replacing. |
Here is an example of an html block:
The text was updated successfully, but these errors were encountered: