Skip to content
Snippets Groups Projects
Commit 1d4b525f authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[yaml mode] Tweak key regexp

Issue #2695
parent 1d35536e
No related branches found
No related tags found
No related merge requests found
......@@ -80,7 +80,7 @@ CodeMirror.defineMode("yaml", function() {
}
/* pairs (associative arrays) -> key */
if (!state.pair && stream.match(/^\s*[^\-:{}"\[\]][^:{}"\[\]]*(?=\s*:($|\s))/i)) {
if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)) {
state.pair = true;
state.keyCol = stream.indentation();
return "atom";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment