orca
orca copied to clipboard
Setext-style Headers Cause Editor to Break
Prerequisites
- [x] Using yarn
- [x] Using an up-to-date
main
branch
Expected Behavior
Editor Functions as expected.
Current Behavior
Using Setext-style Headers causes the Editor to function in unexpected ways.
https://user-images.githubusercontent.com/6120081/194559887-4698c11f-5d03-42d8-989f-de9a75b8c7c8.mp4
Steps to Reproduce
-
Use Setext-style headers in the document editor
-
Press enter to trigger Header line decoration
-
Type more stuff
-
Try to backspace/highlight to delete text.
Possible Solution (Not obligatory)
My guess is this has to do with the widget decorations used to hide and decorate ATX style header markup, which does not work effectively with Setext-style headers. See app/renderer/components/codemirror/extensions/hideMarkdown.ts
for where we do the markup replacement. See the codemirror documentation for how this works.