Since #3320 non-breaking spaces are preserved in Markdown prose, but they still aren’t preserved in inline code, which would have been useful to avoid line breaks in things like x = 2.
In the listings below ␣ represents a regular space, and • represents a non-breaking space.
Prettier 1.18.2
Playground link
Input:
normal␣space
non-breaking•space
`normal␣space`
`non-breaking•space`
Output:
normal␣space
non-breaking•space
`normal␣space`
`non-breaking␣space`
Expected behavior:
normal␣space
non-breaking•space
`normal␣space`
`non-breaking•space`
Since #3320 non-breaking spaces are preserved in Markdown prose, but they still aren’t preserved in inline code, which would have been useful to avoid line breaks in things like
x = 2.In the listings below
␣represents a regular space, and•represents a non-breaking space.Prettier 1.18.2
Playground link
Input:
Output:
Expected behavior: