fix #1315 '#' symbol and preprocessor directive can be separated with spaces

This commit is contained in:
nightwing 2013-05-21 22:34:10 +04:00
commit d7501b5b1a

View file

@ -82,11 +82,11 @@ var c_cppHighlightRules = function() {
regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b"
}, { }, {
token : "keyword", // pre-compiler directives token : "keyword", // pre-compiler directives
regex : "(?:#include|#import|#pragma|#line|#define|#undef|#if|#ifdef|#else|#elif|#ifndef)\\b", regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b",
next : "directive" next : "directive"
}, { }, {
token : "keyword", // special case pre-compiler directive token : "keyword", // special case pre-compiler directive
regex : "(?:#endif)\\b" regex : "(?:#\\s*endif)\\b"
}, { }, {
token : "support.function.C99.c", token : "support.function.C99.c",
regex : cFunctions regex : cFunctions