Commit bfc84c0f by Torkel Ödegaard Committed by GitHub

Merge pull request #15980 from srid12/custom-variable-issue-15921

used regex instead of string replacing
parents 614b4251 03d4b612
......@@ -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