mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Switch to global match for full browser support of escaped custom vars
This commit is contained in:
@@ -39,7 +39,7 @@ export class CustomVariable implements Variable {
|
||||
|
||||
updateOptions() {
|
||||
// extract options in comma separated string (use backslash to escape wanted commas)
|
||||
this.options = _.map(this.query.split(/(?<!\\),+/), text => {
|
||||
this.options = _.map(this.query.match(/(?:\\,|[^,])+/g), text => {
|
||||
text = text.replace('\\,', ',');
|
||||
return { text: text.trim(), value: text.trim() };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user