From da418eb8d957dec0e199000ddecc9b9d176d1299 Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Sat, 31 Dec 2016 00:46:15 +0200 Subject: [PATCH] Small tweaks --- src/cpp.ts | 4 ---- src/css.ts | 2 ++ src/html.ts | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cpp.ts b/src/cpp.ts index fc013a54..5ea949f7 100644 --- a/src/cpp.ts +++ b/src/cpp.ts @@ -282,16 +282,12 @@ export var language = { comment: [ [/[^\/*]+/, 'comment' ], - // [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-( - // [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/ [/\*\//, 'comment', '@pop' ], [/[\/*]/, 'comment' ] ], //Identical copy of comment above, except for the addition of .doc doccomment: [ [/[^\/*]+/, 'comment.doc' ], - // [/\/\*/, 'comment.doc', '@push' ], // nested comment not allowed :-( - [/\/\*/, 'comment.doc.invalid' ], [/\*\//, 'comment.doc', '@pop' ], [/[\/*]/, 'comment.doc' ] ], diff --git a/src/css.ts b/src/css.ts index 506247d6..4013afa4 100644 --- a/src/css.ts +++ b/src/css.ts @@ -184,12 +184,14 @@ export var language = { stringenddoublequote: [ ['\\\\.', 'string'], ['"', { token: 'string', next: '@pop' }], + [/[^\\"]+/, 'string'], ['.', 'string'] ], stringendquote: [ ['\\\\.', 'string'], ['\'', { token: 'string', next: '@pop' }], + [/[^\\']+/, 'string'], ['.', 'string'] ] } diff --git a/src/html.ts b/src/html.ts index dae63cdf..3047c596 100644 --- a/src/html.ts +++ b/src/html.ts @@ -144,7 +144,8 @@ export var language = { ], scriptEmbedded: [ - [/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }] + [/<\/script/, { token: '@rematch', next: '@pop', nextEmbedded: '@pop' }], + [/[^<]+/, ''] ], // -- END