cristianvasquez / obsidian-prettify

A markdown prettifier for obsidian
GNU General Public License v3.0
129 stars 12 forks source link

Plugin deleting note contents in some cases, cannot ctrl+z #69

Open GeoffVDC opened 3 years ago

GeoffVDC commented 3 years ago

When pressing ctrl+alt+L, sometimes it deletes the entire content of the notes and just leaves --- at the top of the note. This happens sometimes when pressing ctrl+alt+L on an already formatted file, or multiple manual executions (i.e. pressing the hotkey) of the plugin. A lot of the time there is no way to get back the content since ctrl+z does not bring the text back, so the content is deleted forever...

cristianvasquez commented 3 years ago

Hello, I cannot reproduce.

Do you have sync?

GeoffVDC commented 3 years ago

Hi,

I was testing around a bit and I found a way to reproduce:

Luckily I was saved by the native file recovery plugin that takes snapshots of your notes. I do not have sync, I manually push my notes to github at the end of the day.

Cheers, Geoff

GeoffVDC commented 3 years ago

Hello @cristianvasquez ,

Narrowed this down to Linux only. So ONLY on Linux (Ubuntu for me) does the content get deleted when doing ctrl+shift+l when you have selected text in the note.

Cheers

cristianvasquez commented 2 years ago

Hi @GeoffVDC, I use Linux and I cannot reproduce it.

I've updated a new version, that selects the text differently.