SkepticMystic / advanced-cursors

Apache License 2.0
100 stars 2 forks source link

Regex matches replaced by first instance only #39

Open zanodor opened 1 year ago

zanodor commented 1 year ago

Actually, the same issue happens in Obsidian's built-in multiple cursors: when multiple matches are highlighted, regex replacements are only done per match of the first instance, like so (Wikilinks changed to bold text in this example):
[[Hugo]] > **Hugo**, [[Bubu]] > **Hugo**, [[Dudu]] > **Hugo**, etc.

When you make a normal selection with the mouse, the search+replace carries out with no problem.

I made a note of this in Obsidian as well:
https://forum.obsidian.md/t/multiple-cursors-hotkeys-only-respect-the-last-selected-cursor/34648/2