-
Notifications
You must be signed in to change notification settings - Fork 9
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
chore(cmark): upgrade pulldown-cmark to 0.11 #108
Conversation
I've just pushed a bunch of commits for this, but it's still a work in progress. The So I keep running up against a couple different issues:
Anyway, this isn't meant as a criticism of your code which I do find very coherent and easy to navigate overall. Just describing some problems I've run into. I do have a couple suggestions for a refactor which I would be willing to do myself if you're open to it:
If you're open to this kind of contribution, what I would likely to is open a separate PR to do the refactor without also pulling in |
@waynr I looked into this one a bit and got a little bit further (it's getting to the spec tests now, but a few are failing). In this case, I think it's just easiest to parse the HtmlBlock as Html like before and I pushed a commit that does that. I think we can save any big architectural changes for later. Would you be willing to add the missing variants? If not, I can take a look later (I'm done on this for now, just took a brief look). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually good enough.
Hi! I found this project when I encountered the bug described in denoland/deno#19458.
My understanding is that in order for
deno fmt
not to mangle frontmatter,dprint-plugin-markdown
needs to update topulldown-cmark
0.10 or later in order to incorporate theTag::MetadataBlock
variant into the ast builder.This PR is not quite finished since I wanted to get some early feedback about if this work is even desirable and what all needs to happen for it to be merged. I also imagine that this is the kind of work that a maintainer may have already begun working on locally so I thought I might save myself some time by not duplicating any existing efforts.
Here are what I imageine the next steps will be if I do continue this work:
test_issue26_with_carriage_return_line_feeds
, which seems to be broken by thisTag::HtmlBlock
andTag::MetadataBlock
to theNode
enum (and write parsers for them)Event::InlineMath
,Event::DisplayMath
,Event::InlineHtml
to theNode
enumIt's not clear to me yet if there is anything to be done beyond merely parsing these new
Tag
andEvent
variants -- is there any special consideration needed include formatting them in the output?