Debian Codegraph @

test/blockquote-bug.html

raw
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset='utf-8'>
5 <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.css">
6 <link rel="stylesheet" href="../css/texmath.css">
7 <style>blockquote { background-color:#eee;} </style>
8 <script src="https://cdn.jsdelivr.net/npm/markdown-it/dist/markdown-it.min.js"></script>
9 <script src="https://cdn.jsdelivr.net/npm/katex/dist/katex.min.js"></script>
10 <script src="../texmath.js"></script>
11 </head>
12 <body>
13 <div id="out"></div>
14 <script>
15
16 const str = `
17 hello$a+b=c$with
18 >$$
19 > \\frac{1}{2}
20 > $$ (4)
21 > hello`
22 /*
23 const str = `
24 hello
25 >
26 > \`\`\`math
27 x = \\frac{1}{2}
28 \`\`\` (4)
29 hartnäckig
30 hello`
31 */
32 document.addEventListener("DOMContentLoaded", () => {
33 const md = markdownit().use(texmath, {engine:katex, delimiters:'dollars',macros:{"\\RR": "\\mathbb{R}"}});
34 // const md = markdownit().use(texmath, {engine:katex, delimiters:'gitlab',macros:{"\\RR": "\\mathbb{R}"}});
35 out.innerHTML = md.render(str);
36 //console.log(out.innerHTML)
37 //console.log(md)
38 /*
39 md.block.ruler.disable(texmath.blockRuleNames, true);
40 md.inline.ruler.disable(texmath.inlineRuleNames, true);
41 */
42 //console.log(md.render(str))
43 /*
44 md.block.ruler.enable(texmath.blockRuleNames, true);
45 md.inline.ruler.enable(texmath.inlineRuleNames, true);
46
47 console.log(md.render(str))
48 */
49 })
50 </script>
51 </body>
52 </html>