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

Migration generator: loose lists get mangled #1355

Open
rparrett opened this issue Jun 4, 2024 · 0 comments
Open

Migration generator: loose lists get mangled #1355

rparrett opened this issue Jun 4, 2024 · 0 comments
Labels
A-Migration Guides C-Automation Tools to make repetitive tasks easier C-Bug A problem with the code that runs the site

Comments

@rparrett
Copy link
Contributor

rparrett commented Jun 4, 2024

It seems that a list with a line break between two items is considered a "loose list"

- a

- b

Becomes this:

Start(List(None))
Start(Item)
Start(Paragraph)
Text(Borrowed("a"))
End(Paragraph)
End(Item)
Start(Item)
Start(Paragraph)
Text(Borrowed("b"))
End(Paragraph)
End(Item)
End(List(None))

when parsed by pulldown_cmark. This is normal/expected behavior.

Because we emit line endings for Paragraph tag start/end, the final markdown ends up being:

-
a

-
b

Which is rendered like this:


a

b


Here's an example in the wild:
https://github.com/bevy/bevy-website/blob/39fcf9589e236e8779b6488a2db6639a3e68a5f3/release-content/0.14/migration-guides/11989_Implement_the_AnimationGraph_allowing_for_multiple_animati.md?plain=1
(this was fixed manually in #1344)

I am not really sure how to work around this, but if I find time I may try to

  • Not emit line breaks for the first paragraph start event for a particular list item
  • Add indentation for subsequent paragraphs in a list item on the paragraph start event
@rparrett rparrett added C-Bug A problem with the code that runs the site A-Migration Guides labels Jun 4, 2024
@alice-i-cecile alice-i-cecile added the C-Automation Tools to make repetitive tasks easier label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Migration Guides C-Automation Tools to make repetitive tasks easier C-Bug A problem with the code that runs the site
Projects
None yet
Development

No branches or pull requests

2 participants