Skip to content
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

Spaces are removed from markdown lines followed by two spaces on a previous line #7846

Closed
kachkaev opened this issue Mar 23, 2020 · 4 comments · Fixed by #7847
Closed

Spaces are removed from markdown lines followed by two spaces on a previous line #7846

kachkaev opened this issue Mar 23, 2020 · 4 comments · Fixed by #7847
Labels
lang:markdown Issues affecting Markdown locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program

Comments

@kachkaev
Copy link
Member

kachkaev commented Mar 23, 2020

Prettier 2.0.1
Playground link

--parser markdown

Seems like this issue is caused by #7178, which fixes #6948

Input:

There are two spaces following each row with `a...d` below:

- a a  
   b b  
    c c  
   d d  
  e e

1.  a a a  
   b b b  
  c c c  
   d d d  
    e e e

Output:

There are two spaces following each row with `a...d` below:

- a a  
  bb  
  cc  
  dd  
  ee

1.  a a a  
    bbb  
    ccc  
    ddd  
    eee

Expected behavior:

There are two spaces following each row with `a...d` below:

- a a  
  b b  
  c c  
  d d  
  e e

1.  a a a  
    b b b  
    c c c  
    d d d  
    e e e

Meanwhile, a workaround is to use <br> instead of ·· for line breaks.

Seems like this issue only relates to lists. Not in lists though, there is the same leading space issue as reported in #6948

@kachkaev kachkaev changed the title Spaces are removed from markdown lines followed by two spaces on the previous line Spaces are removed from markdown lines followed by two spaces on a previous line Mar 23, 2020
@alexander-akait alexander-akait added lang:markdown Issues affecting Markdown type:bug Issues identifying ugly output, or a defect in the program labels Mar 23, 2020
@alexander-akait
Copy link
Member

Thanks

@thorn0
Copy link
Member

thorn0 commented Mar 23, 2020

Is this a regression in 2.0?

@kachkaev
Copy link
Member Author

Yep, all was OK in 1.19 (before #7178)

@kachkaev
Copy link
Member Author

kachkaev commented Mar 23, 2020

@thorn0 if there is a planned 2.0.x release but we still don't have a proper fix, perhaps we could just revert #7178 for now and also remove a corresponding section in the blog post. That's minor compared to the impact this new bug has. For us, its a blocker for upgrading to v2, while #6948 is just a small imperfection.

cc @sasurau4, if you have time to look into fixing 🙏

@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jun 24, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:markdown Issues affecting Markdown locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants