Skip to content

Commit

Permalink
deploy: b33e50e
Browse files Browse the repository at this point in the history
  • Loading branch information
antmicrobot committed Sep 20, 2024
1 parent b596759 commit ce00e40
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 37 deletions.
56 changes: 27 additions & 29 deletions MystEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -47960,46 +47960,45 @@ js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/
const dY = /* @__PURE__ */ new Map(), pY = 42, gY = /* @__PURE__ */ new Map(), k_t = (t, {
preview: e,
lineMap: r,
parent: n
lineMap: e,
parent: r
}) => {
fY.initialize({
theme: "neutral",
suppressErrorRendering: !0
});
const i = t.renderer.rules.fence || function(s, a, o, l, u) {
return u.renderToken(s, a, o);
const n = t.renderer.rules.fence || function(i, s, a, o, l) {
return l.renderToken(i, s, a);
};
t.renderer.rules.fence = (s, a, o, l, u) => {
var m;
const h = s[a];
if (h.info !== "mermaid")
return i(s, a, o, l, u);
const f = h.content.trim(), d = wT(r.current, h.attrGet("data-line-id"));
let p = dY.get(d);
p || (p = gY.get(new y8(f, pY).result()));
const g = Math.random().toString().replace(".", "");
if (h.attrSet("id", `mermaid-${g}`), p && h.attrSet("class", "mermaid"), !p || p.code !== f) {
const v = document.createElement("div");
v.style.position = "fixed", v.style.visibility = "none", document.body.appendChild(v), eie(e.current, `mermaid-${g}`).then((y) => {
fY.render(`mermaid-${g}`, f, v).then(({
svg: b
t.renderer.rules.fence = (i, s, a, o, l) => {
var g;
const u = i[s];
if (u.info !== "mermaid")
return n(i, s, a, o, l);
const h = u.content.trim(), f = wT(e.current, u.attrGet("data-line-id"));
let d = dY.get(f);
d || (d = gY.get(new y8(h, pY).result()));
const p = Math.random().toString().replace(".", "");
if (u.attrSet("id", `mermaid-${p}`), d && u.attrSet("class", "mermaid"), !d || d.code !== h) {
const m = document.createElement("div");
m.style.position = "fixed", m.style.visibility = "none", document.body.appendChild(m), eie(r, `mermaid-${p}`).then((v) => {
fY.render(`mermaid-${p}`, h, m).then(({
svg: y
}) => {
const w = {
svg: b,
code: f
const b = {
svg: y,
code: h
};
dY.set(d, w), gY.set(new y8(f, pY).result(), w), y.innerHTML = b, y.className = "mermaid";
}).catch((b) => {
y.innerHTML = `<b>Mermaid error:</b>
${b}`, y.classList.remove("mermaid");
dY.set(f, b), gY.set(new y8(h, pY).result(), b), v.innerHTML = y, v.className = "mermaid";
}).catch((y) => {
v.innerHTML = `<b>Mermaid error:</b>
${y}`, v.classList.remove("mermaid");
}).finally(() => {
v.remove();
m.remove();
});
});
}
return `<pre ${u.renderAttrs(h)}>${(m = p == null ? void 0 : p.svg) != null ? m : f}</pre>`;
return `<pre ${l.renderAttrs(u)}>${(g = d == null ? void 0 : d.svg) != null ? g : h}</pre>`;
};
};
function S_t(t, e, r) {
Expand Down Expand Up @@ -48091,7 +48090,6 @@ const __t = (t, e) => ((t == null ? void 0 : t.match(e)) || []).length, mY = (t,
breaks: !0,
linkify: !0
}).use(gLe).use(Z1t(e, s)).use(K1t(r, s)).use(k_t, {
preview: n,
lineMap: g,
parent: s
}).use(emt, S_t);
Expand Down
2 changes: 1 addition & 1 deletion docs/collaboration.html
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ <h2 id="other-collaborative-features">Other Collaborative Features<a class="head

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/comments.html
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ <h2 id="suggestions">Suggestions<a class="headerlink" href="#suggestions" title=

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h1 id="myst-editor-user-manual">MyST Editor - User Manual<a class="headerlink"

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.html
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ <h1 id="introduction">Introduction<a class="headerlink" href="#introduction" tit

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/mermaid.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ <h1 id="mermaid-diagrams">Mermaid Diagrams<a class="headerlink" href="#mermaid-d

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/rich-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ <h2 id="refreshing-links">Refreshing Links<a class="headerlink" href="#refreshin

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ <h2 id="view-mode-buttons">View Mode Buttons<a class="headerlink" href="#view-mo

</div>

<a href="https://github.com/antmicro/myst-editor/tree/0553955ac7c33d502c9ace0e52604ed8f22fa253">0553955a</a>
<a href="https://github.com/antmicro/myst-editor/tree/b33e50e1d2e54eba8ce49287d88fa0aedef9952d">b33e50e1</a>
@ <a href="https://github.com/antmicro/myst-editor/tree/main">main</a>

</div>
Expand Down

0 comments on commit ce00e40

Please sign in to comment.