Skip to content

Commit 4ea5f46

Browse files
committed
[yaml mode] Fix exponential regexp
Closes #7053
1 parent 817ea7b commit 4ea5f46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/yaml/yaml.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ CodeMirror.defineMode("yaml", function() {
8585
}
8686

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

0 commit comments

Comments
 (0)