diff --git a/src/yaml.ts b/src/yaml.ts index edd7fcc1..49cbc6c5 100644 --- a/src/yaml.ts +++ b/src/yaml.ts @@ -52,7 +52,6 @@ export const language = { {include: '@anchor'}, {include: '@tagHandle'}, {include: '@flowCollections'}, - {include: '@flowScalars'}, {include: '@blockStyle'}, // Numbers @@ -67,6 +66,8 @@ export const language = { // Key:Value pair [/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']], + {include: '@flowScalars'}, + // String nodes [/.+$/, {cases: {'@keywords': 'keyword', '@default': 'string'}}] ], diff --git a/test/yaml.test.ts b/test/yaml.test.ts index 18c18733..00006989 100644 --- a/test/yaml.test.ts +++ b/test/yaml.test.ts @@ -156,9 +156,6 @@ testTokenization('yaml', [ line: ' String', tokens: [{ startIndex: 0, - type: 'white.yaml' - }, { - startIndex: 2, type: 'string.yaml' }] }],