You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
As reported in the Forum, paragraphs entered between lists lose their linebreaks.
To Reproduce
Steps to reproduce the behavior:
Go to to your journal and make a new draft post
Enter this the following text:
List 1
1. point 1
2. point 2
In between Paragraph 1
In between Paragraph 2
In between Paragraph 3
List 2
1. point 1
1. point 2
Extra paragraph 1
Extra paragraph 2
Extra paragraph 3
Preview that and you'll see the "In between" paragraphs are all on one line, when they should have linebreaks between them:
Note that this does not happen in our JS markdown parsing, e.g. for comments and IDs.
Expected behavior
It should look like Github markdown parsing:
List 1
point 1
point 2
In between Paragraph 1
In between Paragraph 2
In between Paragraph 3
List 2
point 1
point 2
Extra paragraph 1
Extra paragraph 2
Extra paragraph 3
Context
Since this only seems to be happening in server-side markdown parsing, presumably this affects everyone.
Fixes inaturalist/inaturalist#3204
Paragraphs were not being applied when in between 2 sections of tables,
lists or preformatted text.
This was because the regex used was greedy, and would include
everything between the first and last of one of those tags, rather than
stop matching after the first end tag it finds.
Fix was to apply the non-greedy `?` modifier to the `*`s
Fixes inaturalist/#3204
Paragraphs were not being applied when in between 2 sections of tables,
lists or preformatted text.
This was because the regex used was greedy, and would include
everything between the first and last of one of those tags, rather than
stop matching after the first end tag it finds.
Fix was to apply the non-greedy `?` modifier to the `*`s
This should fix#3529 but allows #3204 to regress.
simple_format_with_structure probably just needs to be re-written with a more
comprehensive recursive strategy so it can strip whitespace within list
elements while still applying simple_format to elements between sibling
lists (or tables, or pres)
Describe the bug
As reported in the Forum, paragraphs entered between lists lose their linebreaks.
To Reproduce
Steps to reproduce the behavior:
Note that this does not happen in our JS markdown parsing, e.g. for comments and IDs.
Expected behavior
It should look like Github markdown parsing:
List 1
In between Paragraph 1
In between Paragraph 2
In between Paragraph 3
List 2
Extra paragraph 1
Extra paragraph 2
Extra paragraph 3
Context
Since this only seems to be happening in server-side markdown parsing, presumably this affects everyone.
Additional context
This is probably a problem with
ApplicationHelper#formatted_user_text
The text was updated successfully, but these errors were encountered: