WIP: Upgrade to remark-parse@10#11867
Closed
TrevorBurnham wants to merge 7 commits intoprettier:mainfrom
Closed
Conversation
The build config will likely need changes, but `yarn test` is runnable. 563 snapshots failing.
563 snapshots failing (no change).
563 snapshots failing (no change).
563 snapshots failing (no change).
563 snapshots failing (no change).
551 snapshots failing.
Member
|
Maybe off top, but does remark has |
4 tasks
4 tasks
Open
4 tasks
Contributor
|
I guess this should be closed in favor of this more up-to-date PR? |
Author
|
Sure, happy to close this out. Would love to see that upgrade happen! 🤞 |
This PR got abandoned. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re: #11828
This is a first pass at upgrading to the latest
remark-parseversion, based onmicromark, for Markdown/MDX.Current status
This is far from complete: 551 snapshots are failing on this branch (though some of those are due to harmless behavior changes; see Changes around escaping below). I'm hoping this will be a useful starting point for other contributors who can get this across the finish line.
Most of the work I've done here is getting Jest to run against all the ESM modules in the new packages, by running them through
babel-jest. I've also replaced the custom plugins withremark-packages where possible, though in some cases these don't have all of the same behaviors (e.g.remark-frontmatterdoesn't recognize this custom pragma) and may need to be replaced with new custom implementations.Next steps
There are two in-house plugins,
liquidandloose-items, that don't appear to have anyremark-package equivalents, so someone will have to figure out how to reimplement those withmicromark.Once those are implemented, we need to take a careful look at the failing snapshots, decide which ones are blockers, and take steps to resolve them.
Finally, I've been focused on getting the unit tests running, but the build config will also need to be updated in order to get this branch running.
Changes around escaping
Many of the failing snapshots are caused by extra escaping. For example, the input
was previously converted to
but on this branch comes out as
That is, the result is the same aside from the unmatched
_at the start being escaped.That change may be a positive one? The current behavior is that the opening
_is escaped in the case where the input contains another_, e.g._ http://www.example.com:80/_a*/*(the output is\_ http://www.example.com:80/_a*/*). So the new escaping behavior is more consistent, but noisier.