mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Loki: Update syntax highlighting to colorize strings (#45962)
* Loki: Update syntax highlighting to colorize strings * Updated patterns
This commit is contained in:
parent
aeec087065
commit
a53f169350
@ -239,9 +239,19 @@ export const lokiGrammar: Grammar = {
|
||||
},
|
||||
},
|
||||
],
|
||||
quote: {
|
||||
pattern: /"(?:\\.|[^\\"])*"/,
|
||||
alias: 'string',
|
||||
greedy: true,
|
||||
},
|
||||
backticks: {
|
||||
pattern: /`(?:\\.|[^\\`])*`/,
|
||||
alias: 'string',
|
||||
greedy: true,
|
||||
},
|
||||
number: /\b-?\d+((\.\d*)?([eE][+-]?\d+)?)?\b/,
|
||||
operator: /\s?(\|[=~]?|!=?|<(?:=>?|<|>)?|>[>=]?)\s?/i,
|
||||
punctuation: /[{}()`,.]/,
|
||||
punctuation: /[{}(),.]/,
|
||||
};
|
||||
|
||||
export default lokiGrammar;
|
||||
|
Loading…
Reference in New Issue
Block a user