-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Refactor markdown paragraph print
#9847
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
Conversation
| test <World /> test | ||
| </Hello>123 | ||
| </Hello> | ||
| 123 |
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 change may related to #6961
paragraph printparagraph print
fb4e2c4 to
232bef1
Compare
# Conflicts: # src/language-markdown/printer-markdown.js
# Conflicts: # src/language-markdown/printer-markdown.js
|
@thorn0 Can you review this, when you got time? This is actually quite big change, because it called unsafe |
|
Ooops, I keep forgetting about this one... |
|
The doc for #9503 still doesn't look right: [
fill([
conditionalGroup([
group([/*...*/]),
group([/*...*/]),
]),
" ", // <--- should be `line`
"is",
line,
// ... |
| if (typeof printed === "string") { | ||
| return printed; | ||
| } | ||
| return fill(getDocParts(printed)); |
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.
Passing the result of cleanDoc to fill is wrong. cleanDoc doesn't guarantee that the array has the expected structure.
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.
Yes, you are right, and it seems I've done something wrong in other places, I'll check.
|
Yes, this is a big one. My research plan so far: MDX: line break inserted between elements and text in JSX blocks
|
# Conflicts: # src/language-markdown/printer-markdown.js
…markdown-paragraph # Conflicts: # src/language-markdown/printer-markdown.js
Description
Fix #9503
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.✨Try the playground for this PR✨