We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2bda9 commit 44ff314Copy full SHA for 44ff314
src/core/highlight.js
@@ -33,7 +33,9 @@ async function highlightElement(elem) {
33
const languages = getLanguageHint(elem.classList);
34
let response;
35
try {
36
- response = await sendHighlightRequest(elem.innerText, languages);
+ // Safari return "" for innerText when the document is hidden
37
+ const code = elem.innerText ? elem.innerText : elem.textContent;
38
+ response = await sendHighlightRequest(code, languages);
39
} catch (err) {
40
console.error(err);
41
return;
0 commit comments