decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Markdown stability patch

Open demshy opened this issue 7 months ago • 0 comments

Summary

Trying to address some of the reproducible bugs in current markdown editor. The ultimate plan is still to upgrade the editor to Plate and have high hopes that that will fix most of the problems, but in the meantime we can try to patch some of the most annoying ones.

First fix is for https://github.com/decaporg/decap-cms/issues/7220 - where converting markdown without text (but newlines, breaks or spaces) would result in a slate root without paragraph node.

Second fix is for https://github.com/decaporg/decap-cms/issues/7123 - a case where backspace in urls contained in lists breaks the editor

Test plan https://github.com/decaporg/decap-cms/issues/7220 Switch to markdown mode, add a space or a line break, switch back to richtext mode and hit shift+enter. The editor should no longer crash.

https://github.com/decaporg/decap-cms/issues/7123 Create a bullet list with two items. In the second change some of the text to link. Then use backspace at the start of that link. The editor should not crash. Keep using backspace until the bullet is removed and the editor should also not crash then.

Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)

demshy avatar Jun 27 '24 11:06 demshy