@wenyan-md/core 1.0.12 → 1.0.13

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/dist/core.js CHANGED
@@ -1,48 +1,50 @@
1
1
  import { marked as g } from "marked";
2
- import { markedHighlight as H } from "marked-highlight";
3
- import x from "highlight.js";
4
- import P from "front-matter";
2
+ import { markedHighlight as j } from "marked-highlight";
3
+ import C from "highlight.js";
4
+ import V from "front-matter";
5
5
  import * as f from "css-tree";
6
- import { mathjax as j } from "mathjax-full/js/mathjax.js";
7
- import { TeX as V } from "mathjax-full/js/input/tex.js";
8
- import { SVG as q } from "mathjax-full/js/output/svg.js";
9
- import { liteAdaptor as I } from "mathjax-full/js/adaptors/liteAdaptor.js";
10
- import { RegisterHTMLHandler as k } from "mathjax-full/js/handlers/html.js";
11
- import { AllPackages as R } from "mathjax-full/js/input/tex/AllPackages.js";
12
- import { themes as b } from "./theme.js";
13
- import { hlThemes as C } from "./hltheme.js";
14
- const z = {
6
+ import { mathjax as q } from "mathjax-full/js/mathjax.js";
7
+ import { TeX as I } from "mathjax-full/js/input/tex.js";
8
+ import { SVG as z } from "mathjax-full/js/output/svg.js";
9
+ import { liteAdaptor as D } from "mathjax-full/js/adaptors/liteAdaptor.js";
10
+ import { RegisterHTMLHandler as T } from "mathjax-full/js/handlers/html.js";
11
+ import { AllPackages as E } from "mathjax-full/js/input/tex/AllPackages.js";
12
+ import { themes as $ } from "./theme.js";
13
+ import { hlThemes as A } from "./hltheme.js";
14
+ const N = {
15
15
  inlineMath: [["$", "$"], ["\\(", "\\)"]],
16
16
  displayMath: [["$$", "$$"], ["\\[", "\\]"]],
17
17
  processEscapes: !0,
18
- packages: R
19
- }, D = {
18
+ packages: E
19
+ }, R = {
20
20
  fontCache: "none"
21
21
  };
22
22
  let m;
23
23
  if (!m) {
24
- m = I();
24
+ m = D();
25
25
  try {
26
- k(m);
26
+ T(m);
27
27
  } catch {
28
28
  }
29
29
  }
30
- k(m);
31
- const E = new V(z), N = new q(D);
32
- function A(t, i) {
33
- const l = t.display ? "section" : "span", o = t.display ? "block-equation" : "inline-equation";
34
- t.typesetRoot = i.adaptor.node(l, { class: o }, [t.typesetRoot]);
30
+ T(m);
31
+ const F = new I(N), G = new z(R);
32
+ function M(t, i) {
33
+ const l = t.display ? "section" : "span", n = t.display ? "block-equation" : "inline-equation", r = t.typesetRoot;
34
+ t.math && i.adaptor.setAttribute(r, "math", t.math);
35
+ const o = i.adaptor.node(l, { class: n }, [r]);
36
+ t.typesetRoot = o;
35
37
  }
36
- async function F(t) {
38
+ async function B(t) {
37
39
  try {
38
- const i = j.document(t, {
39
- InputJax: E,
40
- OutputJax: N,
40
+ const i = q.document(t, {
41
+ InputJax: F,
42
+ OutputJax: G,
41
43
  renderActions: {
42
- addContainer: [190, (o) => {
43
- for (const r of o.math)
44
- A(r, o);
45
- }, A]
44
+ addContainer: [190, (n) => {
45
+ for (const r of n.math)
46
+ M(r, n);
47
+ }, M]
46
48
  }
47
49
  });
48
50
  i.render();
@@ -52,99 +54,104 @@ async function F(t) {
52
54
  throw console.error("Error rendering MathJax:", i), i;
53
55
  }
54
56
  }
55
- const G = `#wenyan pre::before {
57
+ const J = `#wenyan pre::before {
56
58
  display: block;
57
59
  content: "";
58
60
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="45" height="12" viewBox="0 0 450 130"><ellipse cx="65" cy="65" rx="50" ry="52" stroke="rgb(220,60,54)" stroke-width="2" fill="rgb(237,108,96)"/><ellipse cx="225" cy="65" rx="50" ry="52" stroke="rgb(218,151,33)" stroke-width="2" fill="rgb(247,193,81)"/><ellipse cx="385" cy="65" rx="50" ry="52" stroke="rgb(27,161,37)" stroke-width="2" fill="rgb(100,200,86)"/></svg>');
59
61
  background-repeat: no-repeat;
60
62
  width: 100%;
61
63
  height: 16px;
62
- }`, ie = "ui-serif, Georgia, Cambria, 'Noto Serif', 'Times New Roman', serif", B = "ui-sans-serif, system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', 'Roboto', sans-serif", L = "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace";
63
- function le() {
64
- const t = H({
65
- emptyLangClass: "hljs",
66
- langPrefix: "hljs language-",
67
- highlight: function(r, s, a) {
68
- const e = x.getLanguage(s) ? s : "plaintext";
69
- return x.highlight(r, { language: e }).value;
70
- }
71
- });
72
- g.use(t);
73
- const i = {
74
- name: "attributeImage",
75
- level: "inline",
76
- start(r) {
77
- return r.indexOf("![");
78
- },
79
- tokenizer(r) {
80
- const a = /^!\[([^\]]*)\]\(([^)]+)\)\{(.*?)\}/.exec(r);
81
- if (a)
82
- return {
83
- type: "attributeImage",
84
- raw: a[0],
85
- alt: a[1],
86
- href: a[2],
87
- attrs: a[3]
88
- };
89
- },
90
- renderer(r) {
91
- const s = J(r.attrs), a = Array.from(s).map(
92
- ([e, n]) => /^\d+$/.test(n) ? `${e}:${n}px` : `${e}:${n}`
93
- ).join("; ");
94
- return `<img src="${r.href}" alt="${r.alt || ""}" title="${r.alt || ""}" style="${a}">`;
95
- }
96
- };
97
- g.use({ extensions: [i] });
98
- const l = g.Renderer, o = g.Parser;
99
- l.heading = function(r) {
100
- const s = o.parseInline(r.tokens), a = r.depth;
101
- return `<h${a}><span>${s}</span></h${a}>
64
+ }`, pe = "Georgia, Cambria, 'Noto Serif', 'Times New Roman', serif", O = "system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', 'Roboto', sans-serif", H = "Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace";
65
+ let k = !1, y = null;
66
+ async function U() {
67
+ if (!k)
68
+ return y || (y = (async () => {
69
+ const t = j({
70
+ emptyLangClass: "hljs",
71
+ langPrefix: "hljs language-",
72
+ highlight: function(r, o, a) {
73
+ const e = C.getLanguage(o) ? o : "plaintext";
74
+ return C.highlight(r, { language: e }).value;
75
+ }
76
+ });
77
+ g.use(t);
78
+ const i = {
79
+ name: "attributeImage",
80
+ level: "inline",
81
+ start(r) {
82
+ return r.indexOf("![");
83
+ },
84
+ tokenizer(r) {
85
+ const a = /^!\[([^\]]*)\]\(([^)]+)\)\{(.*?)\}/.exec(r);
86
+ if (a)
87
+ return {
88
+ type: "attributeImage",
89
+ raw: a[0],
90
+ alt: a[1],
91
+ href: a[2],
92
+ attrs: a[3]
93
+ };
94
+ },
95
+ renderer(r) {
96
+ const o = W(r.attrs), a = Array.from(o).map(
97
+ ([e, s]) => /^\d+$/.test(s) ? `${e}:${s}px` : `${e}:${s}`
98
+ ).join("; ");
99
+ return `<img src="${r.href}" alt="${r.alt || ""}" title="${r.alt || ""}" style="${a}">`;
100
+ }
101
+ };
102
+ g.use({ extensions: [i] });
103
+ const l = g.Renderer, n = g.Parser;
104
+ l.heading = function(r) {
105
+ const o = n.parseInline(r.tokens), a = r.depth;
106
+ return `<h${a}><span>${o}</span></h${a}>
102
107
  `;
103
- }, l.paragraph = function(r) {
104
- const s = r.text;
105
- return s.length > 4 && (/\$\$[\s\S]*?\$\$/g.test(s) || /\\\[[\s\S]*?\\\]/g.test(s)) ? `${s}
106
- ` : `<p>${o.parseInline(r.tokens)}</p>
108
+ }, l.paragraph = function(r) {
109
+ const o = r.text;
110
+ return o.length > 4 && (/\$\$[\s\S]*?\$\$/g.test(o) || /\\\[[\s\S]*?\\\]/g.test(o)) ? `${o}
111
+ ` : `<p>${n.parseInline(r.tokens)}</p>
107
112
  `;
108
- }, l.image = function(r, s, a) {
109
- return `<img src="${r.href}" alt="${r.text || ""}" title="${r.text || ""}">`;
110
- }, g.use({ renderer: l });
113
+ }, l.image = function(r, o, a) {
114
+ return `<img src="${r.href}" alt="${r.text || ""}" title="${r.text || ""}">`;
115
+ }, g.use({ renderer: l }), k = !0;
116
+ })(), y);
111
117
  }
112
- function J(t) {
118
+ function W(t) {
113
119
  const i = /* @__PURE__ */ new Map();
114
120
  return t.split(/\s+/).forEach((l) => {
115
- const [o, r] = l.split("=");
116
- o && r && i.set(o, r.replace(/^["']|["']$/g, ""));
121
+ const [n, r] = l.split("=");
122
+ n && r && i.set(n, r.replace(/^["']|["']$/g, ""));
117
123
  }), i;
118
124
  }
119
- function ce(t) {
120
- const { attributes: i, body: l } = P(t), o = {};
125
+ async function fe(t) {
126
+ const { attributes: i, body: l } = V(t), n = {};
121
127
  let r = "";
122
- const { title: s, description: a, cover: e } = i;
123
- return s && (o.title = s), a && (r += "> " + a + `
128
+ const { title: o, description: a, cover: e } = i;
129
+ return o && (n.title = o), a && (r += "> " + a + `
124
130
 
125
- `, o.description = a), e && (o.cover = e), o.body = r + l, o;
131
+ `, n.description = a), e && (n.cover = e), n.body = r + l, n;
126
132
  }
127
- async function pe(t) {
133
+ async function ue(t) {
134
+ await U();
128
135
  const i = g.parse(t);
129
- return await F(i);
136
+ return await B(i);
130
137
  }
131
- async function fe(t, i, l, o = !0, r = !0) {
132
- let s = b.default;
133
- if (i && (s = b[i], s || (s = Object.values(b).find(
138
+ async function he(t, i, l, n = !0, r = !0) {
139
+ let o = $.default;
140
+ if (i && (o = $[i], o || (o = Object.values($).find(
134
141
  (c) => c.name.toLowerCase() === i.toLowerCase()
135
- ))), !s)
142
+ ))), !o)
136
143
  throw new Error("主题不存在");
137
- if (!(l in C))
144
+ if (!(l in A))
138
145
  throw new Error("代码块主题不存在");
139
- const a = U(await s.getCss()), n = await C[l].getCss();
140
- return O(t, a, n, o, r);
146
+ const a = Z(await o.getCss()), s = await A[l].getCss();
147
+ return Y(t, a, s, n, r);
141
148
  }
142
- async function O(t, i, l, o = !0, r = !0) {
143
- r && Y(!1, t), i = W(i, {
149
+ async function Y(t, i, l, n = !0, r = !0) {
150
+ r && K(!1, t), i = X(i, {
144
151
  "#wenyan pre code": [
145
152
  {
146
153
  property: "font-family",
147
- value: L,
154
+ value: H,
148
155
  append: !0
149
156
  }
150
157
  ],
@@ -156,7 +163,7 @@ async function O(t, i, l, o = !0, r = !0) {
156
163
  }
157
164
  ]
158
165
  });
159
- const s = f.parse(i, {
166
+ const o = f.parse(i, {
160
167
  context: "stylesheet",
161
168
  positions: !1,
162
169
  parseAtrulePrelude: !1,
@@ -169,92 +176,92 @@ async function O(t, i, l, o = !0, r = !0) {
169
176
  parseCustomProperty: !1,
170
177
  parseValue: !1
171
178
  });
172
- if (s.children.appendList(a.children), o) {
173
- const n = f.parse(G, {
179
+ if (o.children.appendList(a.children), n) {
180
+ const s = f.parse(J, {
174
181
  context: "stylesheet",
175
182
  positions: !1,
176
183
  parseAtrulePrelude: !1,
177
184
  parseCustomProperty: !1,
178
185
  parseValue: !1
179
186
  });
180
- s.children.appendList(n.children);
187
+ o.children.appendList(s.children);
181
188
  }
182
- f.walk(s, {
189
+ f.walk(o, {
183
190
  visit: "Rule",
184
- enter(n, c, p) {
185
- const u = n.prelude.children;
191
+ enter(s, c, p) {
192
+ const u = s.prelude.children;
186
193
  u && u.forEach((d) => {
187
- const h = f.generate(d), $ = n.block.children.toArray();
188
- h === "#wenyan" ? $.forEach((y) => {
189
- const v = f.generate(y.value);
190
- t.style[y.property] = v;
191
- }) : t.querySelectorAll(h).forEach((v) => {
192
- $.forEach((w) => {
193
- const T = f.generate(w.value);
194
- v.style[w.property] = T;
194
+ const h = f.generate(d), w = s.block.children.toArray();
195
+ h === "#wenyan" ? w.forEach((v) => {
196
+ const b = f.generate(v.value);
197
+ t.style[v.property] = b;
198
+ }) : t.querySelectorAll(h).forEach((b) => {
199
+ w.forEach((x) => {
200
+ const P = f.generate(x.value);
201
+ b.style[x.property] = P;
195
202
  });
196
203
  });
197
204
  });
198
205
  }
199
206
  });
200
207
  let e = t.querySelectorAll("mjx-container");
201
- return e.forEach((n) => {
202
- const c = n.querySelector("svg");
208
+ return e.forEach((s) => {
209
+ const c = s.querySelector("svg");
203
210
  c.style.width = c.getAttribute("width"), c.style.height = c.getAttribute("height"), c.removeAttribute("width"), c.removeAttribute("height");
204
- const p = n.parentElement;
205
- n.remove(), p.appendChild(c), p.classList.contains("block-equation") && p.setAttribute("style", "text-align: center; margin-bottom: 1rem;");
206
- }), e = t.querySelectorAll("pre code"), e.forEach((n) => {
207
- n.innerHTML = n.innerHTML.replace(/\n/g, "<br>").replace(/(>[^<]+)|(^[^<]+)/g, (c) => c.replace(/\s/g, "&nbsp;"));
208
- }), e = t.querySelectorAll("h1, h2, h3, h4, h5, h6, blockquote, pre"), e.forEach((n) => {
211
+ const p = s.parentElement;
212
+ s.remove(), p.appendChild(c), p.classList.contains("block-equation") && p.setAttribute("style", "text-align: center; margin-bottom: 1rem;");
213
+ }), e = t.querySelectorAll("pre code"), e.forEach((s) => {
214
+ s.innerHTML = s.innerHTML.replace(/\n/g, "<br>").replace(/(>[^<]+)|(^[^<]+)/g, (c) => c.replace(/\s/g, "&nbsp;"));
215
+ }), e = t.querySelectorAll("h1, h2, h3, h4, h5, h6, blockquote, pre"), e.forEach((s) => {
209
216
  const c = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map();
210
- f.walk(s, {
217
+ f.walk(o, {
211
218
  visit: "Rule",
212
219
  enter(u) {
213
- const d = f.generate(u.prelude), h = n.tagName.toLowerCase();
214
- d.includes(`${h}::after`) ? M(u, c) : d.includes(`${h}::before`) && M(u, p);
220
+ const d = f.generate(u.prelude), h = s.tagName.toLowerCase();
221
+ d.includes(`${h}::after`) ? S(u, c) : d.includes(`${h}::before`) && S(u, p);
215
222
  }
216
- }), c.size > 0 && n.appendChild(S(c, t.ownerDocument)), p.size > 0 && n.insertBefore(S(p, t.ownerDocument), n.firstChild);
217
- }), e = t.querySelectorAll("li"), e.forEach((n) => {
223
+ }), c.size > 0 && s.appendChild(L(c, t.ownerDocument)), p.size > 0 && s.insertBefore(L(p, t.ownerDocument), s.firstChild);
224
+ }), e = t.querySelectorAll("li"), e.forEach((s) => {
218
225
  const c = t.ownerDocument.createElement("section");
219
- for (; n.firstChild; )
220
- c.appendChild(n.firstChild);
221
- n.appendChild(c);
226
+ for (; s.firstChild; )
227
+ c.appendChild(s.firstChild);
228
+ s.appendChild(c);
222
229
  }), t.setAttribute("data-provider", "WenYan"), `${t.outerHTML.replace(/class="mjx-solid"/g, 'fill="none" stroke-width="70"')}`;
223
230
  }
224
- function U(t) {
225
- const i = /--([a-zA-Z0-9\-]+):\s*([^;()]*\((?:[^()]*|\([^()]*\))*\)[^;()]*|[^;]+);/g, l = /var\(--([a-zA-Z0-9\-]+)\)/g, o = {};
231
+ function Z(t) {
232
+ const i = /--([a-zA-Z0-9\-]+):\s*([^;()]*\((?:[^()]*|\([^()]*\))*\)[^;()]*|[^;]+);/g, l = /var\(--([a-zA-Z0-9\-]+)\)/g, n = {};
226
233
  let r;
227
234
  for (; (r = i.exec(t)) !== null; ) {
228
- const e = r[1], n = r[2].trim().replaceAll(`
235
+ const e = r[1], s = r[2].trim().replaceAll(`
229
236
  `, "");
230
- o[e] = n;
237
+ n[e] = s;
231
238
  }
232
- o["sans-serif-font"] || (o["sans-serif-font"] = B), o["monospace-font"] || (o["monospace-font"] = L);
233
- function s(e, n, c = /* @__PURE__ */ new Set()) {
239
+ n["sans-serif-font"] || (n["sans-serif-font"] = O), n["monospace-font"] || (n["monospace-font"] = H);
240
+ function o(e, s, c = /* @__PURE__ */ new Set()) {
234
241
  if (c.has(e)) return e;
235
242
  c.add(e);
236
243
  let p = e, u;
237
244
  for (; (u = l.exec(p)) !== null; ) {
238
245
  const d = u[1];
239
- if (n[d]) {
240
- const h = s(n[d], n, c);
246
+ if (s[d]) {
247
+ const h = o(s[d], s, c);
241
248
  p = p.replace(u[0], h);
242
249
  }
243
250
  }
244
251
  return p;
245
252
  }
246
- for (const e in o) {
247
- const n = s(o[e], o);
248
- o[e] = n;
253
+ for (const e in n) {
254
+ const s = o(n[e], n);
255
+ n[e] = s;
249
256
  }
250
257
  let a = t;
251
258
  for (; (r = l.exec(t)) !== null; ) {
252
259
  const e = r[1];
253
- o[e] && (a = a.replace(r[0], o[e]));
260
+ n[e] && (a = a.replace(r[0], n[e]));
254
261
  }
255
262
  return a.replace(/:root\s*\{[^}]*\}/g, "");
256
263
  }
257
- function W(t, i) {
264
+ function X(t, i) {
258
265
  const l = f.parse(t, {
259
266
  context: "stylesheet",
260
267
  positions: !1,
@@ -264,19 +271,19 @@ function W(t, i) {
264
271
  });
265
272
  return f.walk(l, {
266
273
  visit: "Rule",
267
- leave: (o, r, s) => {
268
- if (o.prelude.type !== "SelectorList") return;
269
- const a = o.prelude.children.toArray().map((e) => f.generate(e));
274
+ leave: (n, r, o) => {
275
+ if (n.prelude.type !== "SelectorList") return;
276
+ const a = n.prelude.children.toArray().map((e) => f.generate(e));
270
277
  if (a) {
271
- const e = a[0], n = i[e];
272
- if (!n) return;
273
- for (const { property: c, value: p, append: u } of n)
278
+ const e = a[0], s = i[e];
279
+ if (!s) return;
280
+ for (const { property: c, value: p, append: u } of s)
274
281
  if (p) {
275
282
  let d = !1;
276
- f.walk(o.block, (h) => {
283
+ f.walk(n.block, (h) => {
277
284
  h.type === "Declaration" && h.property === c && (h.value = f.parse(p, { context: "value" }), d = !0);
278
- }), !d && u && o.block.children.prepend(
279
- s.createItem({
285
+ }), !d && u && n.block.children.prepend(
286
+ o.createItem({
280
287
  type: "Declaration",
281
288
  property: c,
282
289
  value: f.parse(p, { context: "value" })
@@ -287,44 +294,44 @@ function W(t, i) {
287
294
  }
288
295
  }), f.generate(l);
289
296
  }
290
- function M(t, i) {
297
+ function S(t, i) {
291
298
  f.walk(t.block, {
292
299
  visit: "Declaration",
293
300
  enter(l) {
294
- const o = l.property, r = f.generate(l.value);
295
- i.set(o, r);
301
+ const n = l.property, r = f.generate(l.value);
302
+ i.set(n, r);
296
303
  }
297
304
  });
298
305
  }
299
- function S(t, i) {
306
+ function L(t, i) {
300
307
  const l = i.createElement("section");
301
308
  t.get("content") && (l.textContent = t.get("content").replace(/['"]/g, ""), t.delete("content"));
302
- for (const [s, a] of t)
309
+ for (const [o, a] of t)
303
310
  if (a.includes("url(")) {
304
- const e = a.match(/data:image\/svg\+xml;utf8,(.*<\/svg>)/), n = a.match(/data:image\/svg\+xml;base64,([^"'\)]*)["']?\)/), c = a.match(/(?:"|')?(https?[^"'\)]*)(?:"|')?\)/);
311
+ const e = a.match(/data:image\/svg\+xml;utf8,(.*<\/svg>)/), s = a.match(/data:image\/svg\+xml;base64,([^"'\)]*)["']?\)/), c = a.match(/(?:"|')?(https?[^"'\)]*)(?:"|')?\)/);
305
312
  if (e) {
306
313
  const p = decodeURIComponent(e[1]);
307
314
  l.innerHTML = p;
308
- } else if (n) {
309
- const p = atob(n[1]);
315
+ } else if (s) {
316
+ const p = atob(s[1]);
310
317
  l.innerHTML = p;
311
318
  } else if (c) {
312
319
  const p = i.createElement("img");
313
320
  p.src = c[1], p.setAttribute("style", "vertical-align: top;"), l.appendChild(p);
314
321
  }
315
- t.delete(s);
322
+ t.delete(o);
316
323
  }
317
- const r = Array.from(t.entries()).map(([s, a]) => `${s}: ${a}`).join("; ");
324
+ const r = Array.from(t.entries()).map(([o, a]) => `${o}: ${a}`).join("; ");
318
325
  return l.style.cssText = r, l;
319
326
  }
320
- function Y(t, i) {
321
- let l = [], o = 0;
322
- if (i.querySelectorAll("a[href]").forEach((s) => {
323
- const a = s.textContent || s.innerText, e = s.getAttribute("href");
324
- l.push([++o, a, e]);
325
- const n = i.ownerDocument.createElement("sup");
326
- n.setAttribute("class", "footnote"), n.innerHTML = `[${o}]`, s.after(n);
327
- }), o > 0)
327
+ function K(t, i) {
328
+ let l = [], n = 0;
329
+ if (i.querySelectorAll("a[href]").forEach((o) => {
330
+ const a = o.textContent || o.innerText, e = o.getAttribute("href");
331
+ l.push([++n, a, e]);
332
+ const s = i.ownerDocument.createElement("sup");
333
+ s.setAttribute("class", "footnote"), s.innerHTML = `[${n}]`, o.after(s);
334
+ }), n > 0)
328
335
  if (t) {
329
336
  const a = `<h3>引用链接</h3><div id="footnotes"><ul>${l.map((e) => e[1] === e[2] ? `<li id="#footnote-${e[0]}">[${e[0]}]: <i>${e[1]}</i></li>` : `<li id="#footnote-${e[0]}">[${e[0]}] ${e[1]}: <i>${e[2]}</i></li>`).join("")}</ul></div>`;
330
337
  i.innerHTML += a;
@@ -334,17 +341,17 @@ function Y(t, i) {
334
341
  }
335
342
  }
336
343
  export {
337
- Y as addFootnotes,
338
- S as buildPseudoSpan,
339
- le as configureMarked,
340
- M as extractDeclarations,
341
- fe as getContentForGzhBuiltinTheme,
342
- O as getContentForGzhCustomCss,
343
- ce as handleFrontMatter,
344
- W as modifyCss,
345
- L as monospace,
346
- pe as renderMarkdown,
347
- U as replaceCSSVariables,
348
- B as sansSerif,
349
- ie as serif
344
+ K as addFootnotes,
345
+ L as buildPseudoSpan,
346
+ U as configureMarked,
347
+ S as extractDeclarations,
348
+ he as getContentForGzhBuiltinTheme,
349
+ Y as getContentForGzhCustomCss,
350
+ fe as handleFrontMatter,
351
+ X as modifyCss,
352
+ H as monospace,
353
+ ue as renderMarkdown,
354
+ Z as replaceCSSVariables,
355
+ O as sansSerif,
356
+ pe as serif
350
357
  };
@@ -1,9 +1,4 @@
1
- const n = `:root {
2
- --sans-serif-font: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
3
- "Noto Color Emoji";
4
- --monospace-font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "liberation mono", "courier new", monospace;
5
- }
6
- #wenyan {
1
+ const n = `#wenyan {
7
2
  font-family: var(--sans-serif-font);
8
3
  line-height: 1.75;
9
4
  }
@@ -20,7 +20,7 @@ const n = `/*
20
20
  }
21
21
  #wenyan p,
22
22
  #wenyan pre {
23
- margin: 1em 0.8em;
23
+ margin: 1em 0;
24
24
  }
25
25
  #wenyan strong {
26
26
  color: var(--primary-color);