Parsed all repo with a regexp of common misspelled words and fixed.
This commit is contained in:
garanews
2020-10-07 12:29:30 +02:00
committed by GitHub
parent 9c112cd785
commit 61749dee23
28 changed files with 37 additions and 37 deletions

View File

@@ -116,7 +116,7 @@ export function expandRecordingRules(query: string, mapping: { [name: string]: s
// Split query into array, so if query uses operators, we can correctly add labels to each individual part.
const queryArray = expandedQuery.split(/(\+|\-|\*|\/|\%|\^)/);
// Regex that matches occurences of ){ or }{ or ]{ which is a sign of incorrecly added labels.
// Regex that matches occurrences of ){ or }{ or ]{ which is a sign of incorrecly added labels.
const invalidLabelsRegex = /(\)\{|\}\{|\]\{)/;
const correctlyExpandedQueryArray = queryArray.map(query => {
return addLabelsToExpression(query, invalidLabelsRegex);