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-parse
version, 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-frontmatter
doesn't recognize this custom pragma) and may need to be replaced with new custom implementations.Next steps
There are two in-house plugins,
liquid
andloose-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.