Essentially the same issue as #276, but when not in templater mode. While #277 fixed the issue by processing action.type differently, the issue appears to stem from the use of the path matching regex which will eagerly match a parenthesis in the note name.
For example, given this button:
name Paren Test
type note(a () file) text
action
Is expected to create a file: a () file.md, but instead creates a (.md.
This incorrect parenthesis matching also affects the open options, as any open option is past the end of the match and ignored.
Given this button, we'd expect it to not open the file, but it defaults to opening it.
name Parens & Open
type note(a () file, false) text
action
Reproduced in version 0.9.13.
I don't know what sort of backwards compatibility concerns there might be with changing the regex. If it's guaranteed that the text, note, and other type declarations are always at the start or end of the string, it could be possible to prune the type string as it gets processed. And then the regex could be made to match the entire string.
eg: text note(...) or note(...) text -> note(...) -> (...)
Essentially the same issue as #276, but when not in
templatermode. While #277 fixed the issue by processingaction.typedifferently, the issue appears to stem from the use of thepathmatching regex which will eagerly match a parenthesis in the note name.For example, given this button:
Is expected to create a file:
a () file.md, but instead createsa (.md.This incorrect parenthesis matching also affects the open options, as any open option is past the end of the match and ignored.
Given this button, we'd expect it to not open the file, but it defaults to opening it.
Reproduced in version
0.9.13.I don't know what sort of backwards compatibility concerns there might be with changing the regex. If it's guaranteed that the
text,note, and other type declarations are always at the start or end of the string, it could be possible to prune the type string as it gets processed. And then the regex could be made to match the entire string.eg:
text note(...)ornote(...) text->note(...)->(...)