Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Square Brackets not matching Correctly #57

Open
domsch1988 opened this issue Feb 1, 2024 · 1 comment
Open

Square Brackets not matching Correctly #57

domsch1988 opened this issue Feb 1, 2024 · 1 comment

Comments

@domsch1988
Copy link

I'm trying to match Text like this:
[SFSGT]
[ILSBY]
[BFKR]
etc.

With regexp-builder i can match it like this:
\\[[A-Z]\\]
But from a bit of testing with different matches, it seems like svg-tag-mode isn't able to handle the two Square Brackets. The Regex above produces no tags at all. If i match it like this:
[A-Z]\\]
It correctly matches all text and the last Square Bracket
With Capture groups i'm also able to only match the first Square bracket. From your examples with the Priorities, Having any Static Character between the Square Bracket and the Text also seems to work. But having exactly those two Brackets in the regex seems to somehow break.

@rougier
Copy link
Owner

rougier commented Feb 5, 2024

Ah damn, this is the syntax I retained for having an icon next to the label such that "[collection/icon] Hello" is interpreted as the collection/icon and the text "Hello". One way is to use directly svg-lib-tag-text that is purely textual (bracket shoud be okay)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants