Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit be5ca00

Browse files
committed
Merge pull request #423 from mprobst/ts-more-kws
Support TypeScript, add more JS keywords.
2 parents df12927 + 2857525 commit be5ca00

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/prettify.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,9 @@ var prettyPrint;
193193
"for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
194194
"throw,true,try,unless,until,when,while,yes";
195195
var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
196-
"debugger,eval,export,function,get,instanceof,null,set,undefined," +
197-
"var,with,Infinity,NaN"];
196+
"abstract,async,await,constructor,debugger,enum,eval,export,function," +
197+
"get,implements,instanceof,interface,let,null,set,undefined,var,with," +
198+
"yield,Infinity,NaN"];
198199
var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
199200
"goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
200201
"sub,undef,unless,until,use,wantarray,while,BEGIN,END";
@@ -1434,7 +1435,7 @@ var prettyPrint;
14341435
'keywords': JSCRIPT_KEYWORDS,
14351436
'cStyleComments': true,
14361437
'regexLiterals': true
1437-
}), ['javascript', 'js']);
1438+
}), ['javascript', 'js', 'ts', 'typescript']);
14381439
registerLangHandler(sourceDecorator({
14391440
'keywords': COFFEE_KEYWORDS,
14401441
'hashComments': 3, // ### style block comments

0 commit comments

Comments
 (0)