Commit 03d4b612 by sridhar-komati

used regex instead of string replacing

parent 54f92514
......@@ -40,7 +40,7 @@ export class CustomVariable implements Variable {
updateOptions() {
// extract options in comma separated string (use backslash to escape wanted commas)
this.options = _.map(this.query.match(/(?:\\,|[^,])+/g), text => {
text = text.replace('\\,', ',');
text = text.replace(/\\,/g, ',');
return { text: text.trim(), value: text.trim() };
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment