Skip to content

Commit

Permalink
[yaml mode] Fix exponential regexp
Browse files Browse the repository at this point in the history
Closes #7053
  • Loading branch information
marijnh committed Aug 9, 2023
1 parent 817ea7b commit 4ea5f46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mode/yaml/yaml.js
Expand Up @@ -85,7 +85,7 @@ CodeMirror.defineMode("yaml", function() {
}

/* pairs (associative arrays) -> key */
if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)) {
if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)) {
state.pair = true;
state.keyCol = stream.indentation();
return "atom";
Expand Down

0 comments on commit 4ea5f46

Please sign in to comment.