first commit
This commit is contained in:
31
unpackage/dist/cache/.vite/deps/snarkdown.js
vendored
Normal file
31
unpackage/dist/cache/.vite/deps/snarkdown.js
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import "./chunk-F3FYYIAV.js";
|
||||
|
||||
// ../../../../Projects/uniapp/app-test/test1/node_modules/snarkdown/dist/snarkdown.es.js
|
||||
var e = { "": ["<em>", "</em>"], _: ["<strong>", "</strong>"], "*": ["<strong>", "</strong>"], "~": ["<s>", "</s>"], "\n": ["<br />"], " ": ["<br />"], "-": ["<hr />"] };
|
||||
function n(e2) {
|
||||
return e2.replace(RegExp("^" + (e2.match(/^(\t| )+/) || "")[0], "gm"), "");
|
||||
}
|
||||
function r(e2) {
|
||||
return (e2 + "").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
||||
}
|
||||
function t(a, c) {
|
||||
var o, l, g, s, p, u = /((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm, m = [], h = "", i = c || {}, d = 0;
|
||||
function f(n2) {
|
||||
var r2 = e[n2[1] || ""], t2 = m[m.length - 1] == n2;
|
||||
return r2 ? r2[1] ? (t2 ? m.pop() : m.push(n2), r2[0 | t2]) : r2[0] : n2;
|
||||
}
|
||||
function $() {
|
||||
for (var e2 = ""; m.length; )
|
||||
e2 += f(m[m.length - 1]);
|
||||
return e2;
|
||||
}
|
||||
for (a = a.replace(/^\[(.+?)\]:\s*(.+)$/gm, function(e2, n2, r2) {
|
||||
return i[n2.toLowerCase()] = r2, "";
|
||||
}).replace(/^\n+|\n+$/g, ""); g = u.exec(a); )
|
||||
l = a.substring(d, g.index), d = u.lastIndex, o = g[0], l.match(/[^\\](\\\\)*\\$/) || ((p = g[3] || g[4]) ? o = '<pre class="code ' + (g[4] ? "poetry" : g[2].toLowerCase()) + '"><code' + (g[2] ? ' class="language-' + g[2].toLowerCase() + '"' : "") + ">" + n(r(p).replace(/^\n+|\n+$/g, "")) + "</code></pre>" : (p = g[6]) ? (p.match(/\./) && (g[5] = g[5].replace(/^\d+/gm, "")), s = t(n(g[5].replace(/^\s*[>*+.-]/gm, ""))), ">" == p ? p = "blockquote" : (p = p.match(/\./) ? "ol" : "ul", s = s.replace(/^(.*)(\n|$)/gm, "<li>$1</li>")), o = "<" + p + ">" + s + "</" + p + ">") : g[8] ? o = '<img src="' + r(g[8]) + '" alt="' + r(g[7]) + '">' : g[10] ? (h = h.replace("<a>", '<a href="' + r(g[11] || i[l.toLowerCase()]) + '">'), o = $() + "</a>") : g[9] ? o = "<a>" : g[12] || g[14] ? o = "<" + (p = "h" + (g[14] ? g[14].length : g[13] > "=" ? 1 : 2)) + ">" + t(g[12] || g[15], i) + "</" + p + ">" : g[16] ? o = "<code>" + r(g[16]) + "</code>" : (g[17] || g[1]) && (o = f(g[17] || "--"))), h += l, h += o;
|
||||
return (h + a.substring(d) + $()).replace(/^\n+|\n+$/g, "");
|
||||
}
|
||||
export {
|
||||
t as default
|
||||
};
|
||||
//# sourceMappingURL=snarkdown.js.map
|
||||
Reference in New Issue
Block a user