orca icon indicating copy to clipboard operation
orca copied to clipboard

Setext-style Headers Cause Editor to Break

Open zachhannum opened this issue 1 year ago • 0 comments

Prerequisites

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

  1. Use Setext-style headers in the document editor

  2. Press enter to trigger Header line decoration

  3. Type more stuff

  4. 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.

zachhannum avatar Oct 07 '22 13:10 zachhannum