mattcoleanderson / obsidian-dynamic-text-concealer

Obsidian.md Plugin to conceal or replace user configured text patterns in Live Preview and Read Mode.
MIT License
7 stars 0 forks source link

Entering a caret in regexp box freezes the app #31

Open conery opened 4 months ago

conery commented 4 months ago

Hi --

I'd like to hide the lines that have three backticks at the start and end of code blocks. I started to write a regexp that has a caret followed by three backticks. But as soon as I type the caret (shift-6) Obsidian freezes up. I have to use the Quit command in the menu bar to quit and restart.

mattcoleanderson commented 3 months ago

This is an ongoing issue I have detailed in #28. Essentially, the regex is being evaluated immediately when typing in the configuration screen. For now it is best to paste the full regex into the configuration when it is ready.

I recommend testing your regex first at a website such as: https://regex101.com/

This issues will eventually be resolve with a confirmation button to save your input regex before running it. However, Obsidian will still hang if you write an inefficient regex and then confirm it. An ideal fix for this would be to abort regex evaluation should it last longer than x amount of seconds. However I have yet to find a clean way to implement this.

mattcoleanderson commented 3 months ago

Duplicate of #28