(cls, text)
| 84 | |
| 85 | let esc = s => s.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); |
| 86 | let span = (cls, text) => '<span class="hl-' + cls + '">' + esc(text) + '</span>'; |
| 87 | |
| 88 | let JS_KW = new Set('break,case,catch,continue,debugger,default,delete,do,else,finally,for,function,if,in,instanceof,new,return,switch,this,throw,try,typeof,var,void,while,with,class,const,enum,export,extends,import,super,implements,interface,let,package,private,protected,public,static,yield,of,async,await,from'.split(',')); |
| 89 | let CSS_KW = new Set('important,media,keyframes,import,charset,font-face,supports,page,namespace'.split(',')); |
no test coverage detected