Skip to content

Commit

Permalink
improve regex matcher for identifiers. fixes #98
Browse files Browse the repository at this point in the history
  • Loading branch information
tikiatua committed Dec 11, 2018
1 parent 0509cc1 commit 1902edd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vuex-i18n-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ let renderFn = function(identifiers, warnings = true) {
}

// construct a regular expression ot find variable substitutions, i.e. {test}
let matcher = new RegExp('' + identifiers[0] + '\\w+' + identifiers[1], 'g');
let matcher = new RegExp('' + identifiers[0] + '{1}\\w.+?' + identifiers[1] + '{1}', 'g');

// define the replacement function
let replace = function replace(translation, replacements) {
Expand Down

0 comments on commit 1902edd

Please sign in to comment.