mirror of
https://github.com/grafana/grafana.git
synced 2025-02-03 12:11:09 -06:00
used regex instead of string replacing
This commit is contained in:
parent
54f92514d5
commit
03d4b61208
@ -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() };
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user