Skip to content

Upgrade to latest remark version#13676

Closed
j-f1 wants to merge 69 commits intoprettier:remark-11from
j-f1:upgrade-remark
Closed

Upgrade to latest remark version#13676
j-f1 wants to merge 69 commits intoprettier:remark-11from
j-f1:upgrade-remark

Conversation

@j-f1
Copy link
Copy Markdown
Member

@j-f1 j-f1 commented Oct 18, 2022

Description

Updgrades to latest Remark and tweaks our custom parsing things to work with it.

TODO

  • MDX
  • evaluate snapshot changes and determine if they’re bugs or improvements
  • fix TypeError: Cannot read properties of undefined (reading '1') at subcontent (/micromark-util-subtokenize/index.js:165:35)

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

playground (Markdown)

@fisker
Copy link
Copy Markdown
Member

fisker commented Oct 18, 2022

Have you seen #12209 (comment)?

@j-f1
Copy link
Copy Markdown
Member Author

j-f1 commented Oct 18, 2022

I definitely saw it when it was posted but forgot about it. Closing since they're working on it and will probably do a better job than me :)

@j-f1 j-f1 closed this Oct 18, 2022
@remcohaszing remcohaszing mentioned this pull request Oct 18, 2022
@remcohaszing
Copy link
Copy Markdown
Contributor

See #12209

I would love to help out if you decide to continue this PR and have any questions. My first suggestion is: add remark-gfm

@j-f1 j-f1 reopened this Oct 18, 2022
@j-f1 j-f1 force-pushed the upgrade-remark branch 3 times, most recently from 7ab0828 to 331c737 Compare October 20, 2022 12:34
Comment thread src/language-markdown/parser-markdown.js Outdated
@fisker fisker changed the base branch from main to remark-11 June 22, 2024 15:20
@fisker
Copy link
Copy Markdown
Member

fisker commented Jun 22, 2024

@j-f1 I think I have made great progress here now.

In this PR, let's focus on the markdown parsing, I kept the mdx parser untouched, it still using unified@9 and remark-parse@8.

I've created remark-11 branch, let's merge this one into it, and then start working on the mdx parser, then we merge together into main branch.

@seiyab Thanks for the liquid plugin from #16134

We still need go through the test changes to make sure they are right.

I'm not going to continue work on this recently. Welcome to continue the work or review if interested. @j-f1 @seiyab @remcohaszing @tats-u

ac15218 (#13676) can find all the code used in other commits.

@seiyab
Copy link
Copy Markdown
Collaborator

seiyab commented Jul 14, 2024

Thank you for your work.
I'm wondering how can we manage that which format changes are valid and which ones are invalid well...

@fisker
Copy link
Copy Markdown
Member

fisker commented Jul 15, 2024

@seiyab
Copy link
Copy Markdown
Collaborator

seiyab commented Jul 16, 2024

Sounds good! But maybe some wrong parsing can be missed? (technically unchanged wrong AST can exist)

@remcohaszing
Copy link
Copy Markdown
Contributor

I would put some faith in the parser that it produces correct ASTs.

@seiyab
Copy link
Copy Markdown
Collaborator

seiyab commented Aug 5, 2024

@fisker
I'm considering make changes to let FULL_TEST=1 yarn test ./tests/format/markdown pass.
But this branch j-f1:upgrade-remark is in forked repository, not prettier/prettier. How should we propose changes? Is just creating branch from j-f1:upgrade-remark and submitting PR against prettier:remark-11 directly fine?

@fisker
Copy link
Copy Markdown
Member

fisker commented Aug 6, 2024

submitting PR against prettier:remark-11 directly fine?

You can do that

@seiyab
Copy link
Copy Markdown
Collaborator

seiyab commented Sep 17, 2024

I'm sorry but I'm not working on this now.
Feel free to tackle this if someone is interested in it.

@fisker
Copy link
Copy Markdown
Member

fisker commented Nov 18, 2025

Continue in #18277

@fisker fisker closed this Nov 18, 2025
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.

5 participants