Closed MaxGfeller closed 5 years ago
Related with #104?
@davidpelayo Looks like it! Does this solution work for you? I only realized that we're getting problems with variables that were only one character long.
Hi @MaxGfeller
Thank you for the pull request. We actually put the word-character matcher there on purpose as it seems somewhat strange to have key identifiers that start with a character outside the range of [A-Za-z0-9_].
It will also more in line with the previous matching pattern, therefore hopefully not breaking to many things.
@tikiatua That makes sense. But this new rule actually sets a new requirement of two characters for a variable, which seems strange to me.
Many of our variables are just single-digit numbers (as generated so by vue-translation-manager and those don't work anymore.
Very good point. I will adapt the regex matcher to also match single characters that match [A-Za-z0-9_]
Sweet, thank you! And merry christmas to you and your family :)
Should be incorporated v1.10.9. However the regex is adapted slightly different, to only allow word characters (\w) if the length of the replacement is only one character, i.e. {0}
Previously it would only match if the name for a variable was at least two characters long, due to the
\w
and.
identifiers. This solution will also match dots that could be in the identifier - although i'm not sure if that's correct.