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
Paragraph starting with a decimal number is moved into preceding list (MDX) #11332
Comments
It looks like this is an issue with $ parsers.remark.parse('* List\n\n1.0')
{
type: 'root',
children: [
{
type: 'list',
ordered: false,
start: null,
spread: false,
children: [Array],
position: [Position]
},
{ type: 'paragraph', children: [Array], position: [Position] }
],
position: {
start: { line: 1, column: 1, offset: 0 },
end: { line: 3, column: 4, offset: 11 }
}
} But with $ parsers.remark.parse('* List\n\n1.0')
{
type: 'root',
children: [
{
type: 'list',
ordered: false,
start: null,
spread: false,
children: [Array],
position: [Position],
loose: true
}
],
position: {
start: { line: 1, column: 1, offset: 0 },
end: { line: 3, column: 4, offset: 11 }
}
} I'll see if I can put together a test case for the |
I looked into this on the |
It looks like upgrading to |
Another complication: The |
I've created an issue to track the task of upgrading Prettier to |
Prettier 2.3.2
Playground link
Input:
- A list item. 1.x Some text below the list that starts with "1.x"
Output:
- A list item. 1.x Some text below the list that starts with "1.x"
Expected behavior:
The text below the list should not be indented. In addition to being aesthetically unpleasant, the indentation actually changes the meaning of the code, as you can confirm in the MDX Playground:
AFAICT this bug occurs whenever a line of text after a paragraph starts with a string of the form
\d\.\S+
.The text was updated successfully, but these errors were encountered: