MCPcopy Index your code
hub / github.com/dataease/SQLBot / highlightAuto

Function highlightAuto

frontend/public/swagger-ui-bundle.js:21104–21132  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

21102 }
21103 }
21104 function highlightAuto(s, o) {
21105 o = o || j.languages || Object.keys(i)
21106 const a = (function justTextHighlightResult(s) {
21107 const o = {
21108 relevance: 0,
21109 emitter: new j.__emitter(j),
21110 value: _e(s),
21111 illegal: !1,
21112 top: C,
21113 }
21114 return (o.emitter.addText(s), o)
21115 })(s),
21116 u = o
21117 .filter(getLanguage)
21118 .filter(autoDetection)
21119 .map((o) => _highlight(o, s, !1))
21120 u.unshift(a)
21121 const _ = u.sort((s, o) => {
21122 if (s.relevance !== o.relevance) return o.relevance - s.relevance
21123 if (s.language && o.language) {
21124 if (getLanguage(s.language).supersetOf === o.language) return 1
21125 if (getLanguage(o.language).supersetOf === s.language) return -1
21126 }
21127 return 0
21128 }),
21129 [w, x] = _,
21130 L = w
21131 return ((L.second_best = x), L)
21132 }
21133 const L = {
21134 'before:highlightElement': ({ el: s }) => {
21135 j.useBR &&

Callers 2

processBufferFunction · 0.85
highlightElementFunction · 0.85

Calls 8

_highlightFunction · 0.85
getLanguageFunction · 0.70
_eFunction · 0.50
keysMethod · 0.45
addTextMethod · 0.45
mapMethod · 0.45
filterMethod · 0.45
unshiftMethod · 0.45

Tested by

no test coverage detected