MCPcopy
hub / github.com/zxlie/FeHelper / span

Function span

apps/code-beautify/content-script.js:86–86  ·  view source on GitHub ↗
(cls, text)

Source from the content-addressed store, hash-verified

84
85 let esc = s => s.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
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(','));

Callers 2

highlightJSFunction · 0.85
highlightCSSFunction · 0.85

Calls 1

escFunction · 0.85

Tested by

no test coverage detected