(t0)
| 122 | return t8; |
| 123 | } |
| 124 | function Highlighted(t0) { |
| 125 | const $ = _c(10); |
| 126 | const { |
| 127 | codeWithSpaces, |
| 128 | language |
| 129 | } = t0; |
| 130 | let t1; |
| 131 | if ($[0] === Symbol.for("react.memo_cache_sentinel")) { |
| 132 | t1 = getCliHighlightPromise(); |
| 133 | $[0] = t1; |
| 134 | } else { |
| 135 | t1 = $[0]; |
| 136 | } |
| 137 | const hl = use(t1); |
| 138 | let t2; |
| 139 | if ($[1] !== codeWithSpaces || $[2] !== hl || $[3] !== language) { |
| 140 | bb0: { |
| 141 | if (!hl) { |
| 142 | t2 = codeWithSpaces; |
| 143 | break bb0; |
| 144 | } |
| 145 | let highlightLang = "markdown"; |
| 146 | if (language) { |
| 147 | if (hl.supportsLanguage(language)) { |
| 148 | highlightLang = language; |
| 149 | } else { |
| 150 | logForDebugging(`Language not supported while highlighting code, falling back to markdown: ${language}`); |
| 151 | } |
| 152 | } |
| 153 | ; |
| 154 | try { |
| 155 | t2 = cachedHighlight(hl, codeWithSpaces, highlightLang); |
| 156 | } catch (t3) { |
| 157 | const e = t3; |
| 158 | if (e instanceof Error && e.message.includes("Unknown language")) { |
| 159 | logForDebugging(`Language not supported while highlighting code, falling back to markdown: ${e}`); |
| 160 | let t4; |
| 161 | if ($[5] !== codeWithSpaces || $[6] !== hl) { |
| 162 | t4 = cachedHighlight(hl, codeWithSpaces, "markdown"); |
| 163 | $[5] = codeWithSpaces; |
| 164 | $[6] = hl; |
| 165 | $[7] = t4; |
| 166 | } else { |
| 167 | t4 = $[7]; |
| 168 | } |
| 169 | t2 = t4; |
| 170 | break bb0; |
| 171 | } |
| 172 | t2 = codeWithSpaces; |
| 173 | } |
| 174 | } |
| 175 | $[1] = codeWithSpaces; |
| 176 | $[2] = hl; |
| 177 | $[3] = language; |
| 178 | $[4] = t2; |
| 179 | } else { |
| 180 | t2 = $[4]; |
| 181 | } |
nothing calls this directly
no test coverage detected