mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-23 21:41:53 +02:00
Add a randomly generated classname to each variable so that CodeMirror does not merge adjacent variables into the same SPAN.
This commit is contained in:
parent
a02d2b9c58
commit
0b83fbb7ce
@ -25,10 +25,11 @@ export const defineCodeMirrorBrunoVariablesMode = (variables, mode) => {
|
|||||||
stream.eat('}');
|
stream.eat('}');
|
||||||
let found = pathFoundInVariables(word, variables);
|
let found = pathFoundInVariables(word, variables);
|
||||||
if (found) {
|
if (found) {
|
||||||
return 'variable-valid';
|
return 'variable-valid ' + (Math.random() + 1).toString(36).substring(9);
|
||||||
} else {
|
} else {
|
||||||
return 'variable-invalid';
|
return 'variable-invalid ' + (Math.random() + 1).toString(36).substring(9);
|
||||||
}
|
}
|
||||||
|
// Random classname added so adjacent variables are not rendered in the same SPAN by CodeMirror.
|
||||||
}
|
}
|
||||||
word += ch;
|
word += ch;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user