Filename matches fail if the actor name and image have parenthesis.
I have the following image in the directory configured as token-replacer's root:
GiantBeetle(4HD).svg
In addition I added a few others when troubleshooting:
Giant_Beetle,_4HD.svg
GiantBeetle[4HD].svg
GiantBeetle{4HD}.svg
The only match that fails is Giant_Beetle_(4HD).svg. I added a log statement to show the contents of the cache, and you can see that of the 4 filenames above, the comma and brackets are all escaped, while the parens are unaltered:
However, when the attempt to match occurs, token-replacer is looking for a pattern with escaped parens:
token-replacer.js:709 Token Replacer: searching for token for giant_beetle_%284hd%29
token-replacer.js:710 Token Replacer: searching for portrait for portrait_giant_beetle_%284hd%29
Filename matches fail if the actor name and image have parenthesis.
I have the following image in the directory configured as token-replacer's root:
In addition I added a few others when troubleshooting:
The only match that fails is
Giant_Beetle_(4HD).svg
. I added a log statement to show the contents of the cache, and you can see that of the 4 filenames above, the comma and brackets are all escaped, while the parens are unaltered:However, when the attempt to match occurs, token-replacer is looking for a pattern with escaped parens:
Here's an export of my console log from which the above code blocks were taken: 202204281019-token_replacer-parenthesis.log