Skip to content

Commit 58d2a8a

Browse files
committed
[yaml mode] Be less restrictive about keys in front of colons
Issue #2695
1 parent 252a9d6 commit 58d2a8a

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
@@ -80,7 +80,7 @@ CodeMirror.defineMode("yaml", function() {
8080
}
8181

8282
/* pairs (associative arrays) -> key */
83-
if (!state.pair && stream.match(/^\s*\S+(?=\s*:($|\s))/i)) {
83+
if (!state.pair && stream.match(/^\s*[^\-:{}"\[\]][^:{}"\[\]]*(?=\s*:($|\s))/i)) {
8484
state.pair = true;
8585
state.keyCol = stream.indentation();
8686
return "atom";

0 commit comments

Comments
 (0)