Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit

Permalink
Replaced string concatenation with template literals
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbuberl committed Sep 20, 2017
1 parent 3b3fd84 commit 85811a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ function getTokenValue(tokens, tokenName, delimiter) {
function replace(target, options) {
options = injectDefaultOptions(options);

var includeRegExp = new RegExp(escapeRegExp(options.prefix) + '(.+?)' + escapeRegExp(options.suffix), 'g');
var regexPattern = `${ escapeRegExp(options.prefix) }(.+?)${ escapeRegExp(options.suffix)}`;
var includeRegExp = new RegExp(regexPattern, 'g');
var isObject = false;
var text;

Expand Down

0 comments on commit 85811a8

Please sign in to comment.