Skip to content

Commit 6cc89ec

Browse files
committed
Fix KaTeX strict mode console warning
1 parent f991f5e commit 6cc89ec

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/chart-caption.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function ChartCaption({ rt, rtLower80, rtUpper80, getRtColor }) {
2222
? "\\htmlClass{invisible}{0}"
2323
: ""
2424
}`}
25-
settings={{ trust: true }}
25+
settings={{ trust: true, strict: allowHtml }}
2626
/>
2727

2828
{rtLower80 && rtUpper80 && (
@@ -57,3 +57,7 @@ export default function ChartCaption({ rt, rtLower80, rtUpper80, getRtColor }) {
5757
</figcaption>
5858
);
5959
}
60+
61+
function allowHtml(errorCode, errorMsg, token) {
62+
return errorCode === "htmlExtension" ? "ignore" : "warn";
63+
}

0 commit comments

Comments
 (0)