Skip to content

[BUG] Does Not Replace Multiple ${STUFF} #447

@RumiaKitinari

Description

@RumiaKitinari

Description

When multiple ${STUFF}'s (e.g. ${GREEK}s) are in the "trigger", then only the first one seems to be registered.

Notably, that issue will not occur if the ${GREEK} is replaced with what it's a shortcut for (alpha, beta, etc...), and the snippet will work just fine.

Notes:

  1. It doesn't seem to matter if "A(uto)" is active or not, whether this occurs.
  2. I've only experienced the issue with ${GREEK}, but it's likely to be the same with other ${STUFF}, like ${SYMBOL}.

To Reproduce

  1. Create a replacement snippet with 2+ ${STUFF}s:
{trigger: /([A-Za-z]|\\${GREEK})([A-Za-z]|\\${GREEK})_/, 
 replacement: "[[0]][[1]]_{[[2]]}$1", 
 options: "rmA", priority: 1, description: "Shortcut for subscripting!"},
  1. Test the snippet. It just doesn't work.

Expected Behavior

The substitution would be properly performed, no matter the quantity of ${STUFF}s.

Additional Info

N/A

SYSTEM INFO:
Obsidian version: v1.9.12
Installer version: v1.8.10
Operating system: Windows 11 Home 10.0.26100
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: Minimal v7.6.0
Snippets enabled: 10
Restricted mode: off
Plugins installed: 37
Plugins enabled: 33
1: Tasks v7.21.0
2: Meta Bind v1.4.6
3: List Callouts v1.2.9
4: Natural Language Dates v0.6.2
5: QuickAdd v2.3.0
6: Tag Wrangler v0.6.4
7: Templater v2.14.1
8: Longform v2.1.0
9: Style Settings v1.0.9
10: Minimal Theme Settings v8.1.1
11: Image Captions v1.1.6
12: Iconize v2.14.7
13: Homepage v4.2.2
14: Dice Roller v11.4.2
15: Dataview v0.5.68
16: Calendar v1.5.10
17: Advanced Tables v0.22.1
18: Iconic v1.1.4
19: Waypoint v2.1.0
20: TaskNotes v3.23.3
21: Lazy Plugin Loader v1.0.21
22: Latex Suite v1.9.8
23: Outliner v4.9.0
24: Folder Note v0.7.3
25: Omnisearch v1.27.2
26: Smart Typography v1.0.18
27: Text Format v3.1.0
28: Underline v1.3.0
29: Discord Rich Presence v1.5.1
30: Git v2.35.0
31: Image Converter v1.3.18
32: Linter v1.30.0
33: User Plugins v1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions