koishi-plugin-latex-render 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +9 -2
- package/lib/index.js +9 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -156,7 +156,9 @@ function generateHtml(content, config) {
|
|
|
156
156
|
const katexOptions = {
|
|
157
157
|
throwOnError: false,
|
|
158
158
|
// 保持不报错降级
|
|
159
|
-
strict: false
|
|
159
|
+
strict: false,
|
|
160
|
+
output: "html"
|
|
161
|
+
// 强制只输出 HTML 排版,绝不生成辅助阅读的 MathML
|
|
160
162
|
};
|
|
161
163
|
if (hasMarkdown) {
|
|
162
164
|
const latexCache = [];
|
|
@@ -219,8 +221,13 @@ ${placeholder}
|
|
|
219
221
|
<html>
|
|
220
222
|
<head>
|
|
221
223
|
<meta charset="UTF-8">
|
|
222
|
-
<link rel="stylesheet" href="https://cdn.
|
|
224
|
+
<link rel="stylesheet" href="https://cdn.staticfile.net/KaTeX/0.16.9/katex.min.css">
|
|
223
225
|
<style>
|
|
226
|
+
/* 🌟 彻底干掉辅助阅读的 MathML,防止重影 */
|
|
227
|
+
.katex-mathml {
|
|
228
|
+
display: none !important;
|
|
229
|
+
}
|
|
230
|
+
|
|
224
231
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
225
232
|
body {
|
|
226
233
|
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|
package/lib/index.js
CHANGED
|
@@ -156,7 +156,9 @@ function generateHtml(content, config) {
|
|
|
156
156
|
const katexOptions = {
|
|
157
157
|
throwOnError: false,
|
|
158
158
|
// 保持不报错降级
|
|
159
|
-
strict: false
|
|
159
|
+
strict: false,
|
|
160
|
+
output: "html"
|
|
161
|
+
// 强制只输出 HTML 排版,绝不生成辅助阅读的 MathML
|
|
160
162
|
};
|
|
161
163
|
if (hasMarkdown) {
|
|
162
164
|
const latexCache = [];
|
|
@@ -219,8 +221,13 @@ ${placeholder}
|
|
|
219
221
|
<html>
|
|
220
222
|
<head>
|
|
221
223
|
<meta charset="UTF-8">
|
|
222
|
-
<link rel="stylesheet" href="https://cdn.
|
|
224
|
+
<link rel="stylesheet" href="https://cdn.staticfile.net/KaTeX/0.16.9/katex.min.css">
|
|
223
225
|
<style>
|
|
226
|
+
/* 🌟 彻底干掉辅助阅读的 MathML,防止重影 */
|
|
227
|
+
.katex-mathml {
|
|
228
|
+
display: none !important;
|
|
229
|
+
}
|
|
230
|
+
|
|
224
231
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
225
232
|
body {
|
|
226
233
|
font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
|