-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Markdown: Preserve multiple spaces in inline code #13590
Changes from 21 commits
f94f5a8
c32ebba
afd962e
15aee10
d5fdb2c
e0f2ed2
8d23538
4fc4693
dbe851d
6af20a1
feee9dd
17f18ad
9a7cd17
e2abead
5c7d4e1
6489a4d
c5677d0
0856e6a
0b42cdf
f939b6d
33d7a43
5350af8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#### Preserve multiple spaces in inline code (#13590 by @kachkaev and @thorn0) | ||
|
||
Previously, multiple whitespace characters in inline code were collapsed into a single space. This is no longer happening to match [CommonMark spec](https://spec.commonmark.org/0.30/#backtick-string). | ||
|
||
<!-- prettier-ignore --> | ||
```markdown | ||
<!-- Input --> | ||
` foo bar baz ` | ||
|
||
<!-- Prettier stable --> | ||
` foo bar baz ` | ||
|
||
<!-- Prettier main --> | ||
` foo bar baz ` | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ markdown\` | |
|
||
=====================================output===================================== | ||
markdown\` | ||
const cssString = css\\\` background-color: \\$\\{color('base')\\}\\\`; | ||
const cssString = css\\\` background-color: \\$\\{color('base')\\}\\\`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't this call There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a crazy test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, you explained before... forgot. Sorry. |
||
\`; | ||
|
||
markdown\` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ | |
``` 3 ``22`` `1` ``` | ||
|
||
`` 2 ```123``` `1` `` | ||
|
||
`` CODE` `` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
` three spaces everywhere ` | ||
|
||
` three spaces | ||
everywhere ` | ||
|
||
` three spaces | ||
everywhere ` |
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.
Maybe we can move this to
print
? So we can reduce onemapAst
call. Can be separate PR.