also highlight "if"

This commit is contained in:
Fabian Jakobs 2010-10-20 12:29:35 +02:00
commit adde939166

View file

@ -19,8 +19,8 @@ JavaScriptHighlightRules = function() {
var docComment = new DocCommentHighlightRules(); var docComment = new DocCommentHighlightRules();
var keywords = lang.arrayToMap( var keywords = lang.arrayToMap(
("break|case|catch|continue|default|delete|do|else|finally|for|function|\ ("break|case|catch|continue|default|delete|do|else|finally|for|function|" +
if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with").split("|") "if|in|instanceof|new|return|switch|throw|try|typeof|var|while|with").split("|")
); );
var buildinConstants = lang.arrayToMap( var buildinConstants = lang.arrayToMap(
@ -28,8 +28,8 @@ JavaScriptHighlightRules = function() {
); );
var futureReserved = lang.arrayToMap( var futureReserved = lang.arrayToMap(
("class|enum|extends|super|const|export|import|implements|let|private|\ ("class|enum|extends|super|const|export|import|implements|let|private|" +
public|yield|interface|package|protected|static").split("|") "public|yield|interface|package|protected|static").split("|")
); );
// regexp must not have capturing parentheses. Use (?:) instead. // regexp must not have capturing parentheses. Use (?:) instead.