From 02f1cb642376f12d56adb1cc53a11ca8f80a08a0 Mon Sep 17 00:00:00 2001 From: Una Kravets Date: Wed, 4 Jan 2017 22:37:37 -0500 Subject: [PATCH] Changed {{}} to -{}- to avoid popular collision Vue.js and other popular libraries like handlebars use `{{}}`, so I converted it to `-{}-` --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 03ec9ad..de0b01a 100644 --- a/index.js +++ b/index.js @@ -55,11 +55,11 @@ Sentencer.prototype.make = function(template) { var self = this; var sentence = template; - var occurrences = template.match(/\{\{(.+?)\}\}/g); + var occurrences = template.match(/-\{(.+?)\}-/g); if(occurrences && occurrences.length) { for(var i = 0; i < occurrences.length; i++) { - var action = occurrences[i].replace('{{', '').replace('}}', '').trim(); + var action = occurrences[i].replace('-{', '').replace('}-', '').trim(); var result = ''; if(action.match(/\((.+?)\)/)) { try {