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
I'm seeing an issue distinct from #457 but also to do with bold and newlines. It's not clear to me if it's fixed in jywarren/woofmark#1, but we can probably test in GitPod there.
What happens is that if (in rich text) we make 2 new lines after bolding a line, then type, it's bold (which is OK, although we could change that if it makes a solution easier). Then, if we unbold the text on the 2nd new line, and keep typing, things seem normal... but in fact there is a double ** left on 2 consecutive lines due to the remaining "bolded" newline (which has no text on it). This the causes ** to appear in markdown mode when we switch to it, and on switching back to rich text, triggers a formatting error:
What I think we should do is filter out newlines that contain only formatting and no content (or only whitespace). We could do this upon switching modes between rich and markdown.
We could also try writing a test for this behavior, in:
I'm seeing an issue distinct from #457 but also to do with bold and newlines. It's not clear to me if it's fixed in jywarren/woofmark#1, but we can probably test in GitPod there.
What happens is that if (in rich text) we make 2 new lines after bolding a line, then type, it's bold (which is OK, although we could change that if it makes a solution easier). Then, if we unbold the text on the 2nd new line, and keep typing, things seem normal... but in fact there is a double
**
left on 2 consecutive lines due to the remaining "bolded" newline (which has no text on it). This the causes**
to appear in markdown mode when we switch to it, and on switching back to rich text, triggers a formatting error:What I think we should do is filter out newlines that contain only formatting and no content (or only whitespace). We could do this upon switching modes between rich and markdown.
We could also try writing a test for this behavior, in:
https://github.com/publiclab/PublicLab.Editor/blob/cf1fc4a9c4b70afaede856bac214e27388ab6cfa/test/ui-testing/bold.test.js
The text was updated successfully, but these errors were encountered: