Skip to content

Commit 79fe4b1

Browse files
committed
fix getting text on source pages
1 parent 9afdfbe commit 79fe4b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: root/static/js/syntaxhighlighter.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ if (source) {
177177
// the code.
178178
else if (packageMatch) {
179179
const decodedPackageMatch = decodeURIComponent(packageMatch[1]);
180-
const leadingSource = source.text().split("package " + decodedPackageMatch + ";");
180+
const leadingSource = source.innerText.split("package " + decodedPackageMatch + ";");
181181
const lineCount = leadingSource[0].split("\n").length;
182182
if (leadingSource.length > 1 && lineCount > 1) {
183183
source.dataset.line = lineCount;

0 commit comments

Comments
 (0)