mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
add test case for multiple inline math expressions in imported Markdown
This commit is contained in:
parent
8355e02e91
commit
58e53fc8ce
@ -188,6 +188,12 @@ second line 2</code></pre><ul><li>Hello</li><li>world</li></ul><ol><li>Hello</li
|
|||||||
expect(markdownService.renderToHtml(input, "Title")).toStrictEqual(expected);
|
expect(markdownService.renderToHtml(input, "Title")).toStrictEqual(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("converts multiple inline math expressions into Mathtex format", () => {
|
||||||
|
const input = `Energy: $e=mc^{2}$, Force: $F=ma$.`;
|
||||||
|
const expected = /*html*/`<p>Energy: <span class="math-tex">\\(e=mc^{2}\\)</span>, Force: <span class="math-tex">\\(F=ma\\)</span>.</p>`;
|
||||||
|
expect(markdownService.renderToHtml(input, "Title")).toStrictEqual(expected);
|
||||||
|
});
|
||||||
|
|
||||||
it("converts display math expressions into Mathtex format", () => {
|
it("converts display math expressions into Mathtex format", () => {
|
||||||
const input = `$$\sqrt{x^{2}+1}$$`;
|
const input = `$$\sqrt{x^{2}+1}$$`;
|
||||||
const expected = /*html*/`<p><span class="math-tex">\\[\sqrt{x^{2}+1}\\]</span></p>`;
|
const expected = /*html*/`<p><span class="math-tex">\\[\sqrt{x^{2}+1}\\]</span></p>`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user