(s, o, a, w)
| 20897 | return ((x.code = w.code), fire('after:highlight', x), x) |
| 20898 | } |
| 20899 | function _highlight(s, o, a, w) { |
| 20900 | function keywordData(s, o) { |
| 20901 | const i = L.case_insensitive ? o[0].toLowerCase() : o[0] |
| 20902 | return Object.prototype.hasOwnProperty.call(s.keywords, i) && s.keywords[i] |
| 20903 | } |
| 20904 | function processBuffer() { |
| 20905 | ;(null != U.subLanguage |
| 20906 | ? (function processSubLanguage() { |
| 20907 | if ('' === Y) return |
| 20908 | let s = null |
| 20909 | if ('string' == typeof U.subLanguage) { |
| 20910 | if (!i[U.subLanguage]) return void z.addText(Y) |
| 20911 | ;((s = _highlight(U.subLanguage, Y, !0, V[U.subLanguage])), |
| 20912 | (V[U.subLanguage] = s.top)) |
| 20913 | } else s = highlightAuto(Y, U.subLanguage.length ? U.subLanguage : null) |
| 20914 | ;(U.relevance > 0 && (Z += s.relevance), |
| 20915 | z.addSublanguage(s.emitter, s.language)) |
| 20916 | })() |
| 20917 | : (function processKeywords() { |
| 20918 | if (!U.keywords) return void z.addText(Y) |
| 20919 | let s = 0 |
| 20920 | U.keywordPatternRe.lastIndex = 0 |
| 20921 | let o = U.keywordPatternRe.exec(Y), |
| 20922 | i = '' |
| 20923 | for (; o; ) { |
| 20924 | i += Y.substring(s, o.index) |
| 20925 | const a = keywordData(U, o) |
| 20926 | if (a) { |
| 20927 | const [s, u] = a |
| 20928 | if ((z.addText(i), (i = ''), (Z += u), s.startsWith('_'))) i += o[0] |
| 20929 | else { |
| 20930 | const i = L.classNameAliases[s] || s |
| 20931 | z.addKeyword(o[0], i) |
| 20932 | } |
| 20933 | } else i += o[0] |
| 20934 | ;((s = U.keywordPatternRe.lastIndex), (o = U.keywordPatternRe.exec(Y))) |
| 20935 | } |
| 20936 | ;((i += Y.substr(s)), z.addText(i)) |
| 20937 | })(), |
| 20938 | (Y = '')) |
| 20939 | } |
| 20940 | function startNewMode(s) { |
| 20941 | return ( |
| 20942 | s.className && z.openNode(L.classNameAliases[s.className] || s.className), |
| 20943 | (U = Object.create(s, { parent: { value: U } })), |
| 20944 | U |
| 20945 | ) |
| 20946 | } |
| 20947 | function endOfMode(s, o, i) { |
| 20948 | let a = (function startsWith(s, o) { |
| 20949 | const i = s && s.exec(o) |
| 20950 | return i && 0 === i.index |
| 20951 | })(s.endRe, i) |
| 20952 | if (a) { |
| 20953 | if (s['on:end']) { |
| 20954 | const i = new Response(s) |
| 20955 | ;(s['on:end'](o, i), i.isMatchIgnored && (a = !1)) |
| 20956 | } |
no test coverage detected