Skip to content
Permalink
Browse files

Escape backslashes in template arguments (fixes #177)

  • Loading branch information...
Qix- committed Jul 31, 2017
1 parent 7a75399 commit fbd17e7a699e7a7a1d3ebbb0ce4961b5ea172449
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.js
@@ -205,7 +205,7 @@ function chalkTag(chalk, strings) {
const parts = [strings.raw[0]];

for (let i = 1; i < strings.length; i++) {
parts.push(args[i - 1].toString().replace(/[{}]/g, '\\$&'));
parts.push(args[i - 1].toString().replace(/[{}\\]/g, '\\$&'));
parts.push(strings.raw[i]);
}

0 comments on commit fbd17e7

Please sign in to comment.
You can’t perform that action at this time.