'Paste URL as link' pastes the raw link after a heading

Bug report

If you insert a link directly after a heading, the link format dialog is not displayed.

Environment

  • Platform: Windows
  • Platform version: 11
  • App Version: v5.9.0-beta.1

How to reproduce

link-format

Hi Lukas,

Thanks for reporting. Weird! Will look into it.

Looks like a CodeMirror 5’s bug.

It checks if the current token state has header: 0 (means the cursor pos is not in the middle of the heading), but it is 2 instead when the cursor is immediately after the heading:

I’d expect it to be fixed in CM6. Let me migrate to it rather than find a workaround for CM5.

1 Like

alright, it’s annoying than I thought.
found a quick workaround

1 Like