mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Loki: Fix parsing of escaped quotes in LogQL (#69584)
* fix parsing issue * replace escaped quotes
This commit is contained in:
@@ -599,7 +599,10 @@ function isIntervalVariableError(node: SyntaxNode) {
|
||||
|
||||
function handleQuotes(string: string) {
|
||||
if (string[0] === `"` && string[string.length - 1] === `"`) {
|
||||
return string.replace(/"/g, '').replace(/\\\\/g, '\\');
|
||||
return string
|
||||
.substring(1, string.length - 1)
|
||||
.replace(/\\"/g, '"')
|
||||
.replace(/\\\\/g, '\\');
|
||||
}
|
||||
return string.replace(/`/g, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user