logseq / logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: http://trello.com/b/8txSM12G/roadmap
https://logseq.com
GNU Affero General Public License v3.0
30.07k stars 1.76k forks source link

Heading shortcut (Crtl+2) deletes text #11253

Open fockr opened 3 weeks ago

fockr commented 3 weeks ago

Search first

What Happened?

I created a new page in the journal using [[text]]. Then I wanted to format the line to H2 using Crtl+2 and the [[ text ]] got deleted. Only the ## formating was there. Undo functionality also was broken - hence I wan't able to revert the deletion.

Reproduce the Bug

  1. Go to today's journal page
  2. type [[ some new page name ]]
  3. press Ctrl+2
  4. observe deletion of [[ some new page name ]]

Expected Behavior

The [[ some new page name ]] text is supposed to stay. I only expect to see ## formatting in front of the text.

Screenshots

No response

Desktop or Mobile Platform Information

App Version: 0.10.8 Git Revision: 3fc1560 Platform: Mozilla/5.0 (X11 Linux x86_64) AppleWebKit/537.36 (KHTML like Gecko) Logseq/0.10.8 Chrome/118.0.5993.159 Electron/27.1.3 Safari/537.36 Language: de Plugins: logseq-allday-theme (v1.1.19), logseq-atlas-theme (v0.3.5), logseq-bonofix-theme (v3.10.4), logseq-dev-theme (v1.26.17), logseq-link-preview (v2.3.0), logseq-plugin-heading-level-shortcuts (v0.0.6), logseq-quick-capture (0.0.7)

Additional Context

No response

Are you willing to submit a PR? If you know how to fix the bug.

andelf commented 3 weeks ago

logseq-plugin-heading-level-shortcuts (v0.0.6)

The plugin might forget to persist block content before editing it.