test: add test for asterisk pairs in inline code

pull/3326/head
TAKAHASHI Shuuji 2025-07-29 11:28:57 +09:00
rodzic 2903ba80b4
commit a3d1ae13c0
2 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -2,6 +2,11 @@
exports[`content-rich > asterisk paris in code block 1`] = `"<p><pre class="code-block">1 * 2 * 3</pre></p>"`;
exports[`content-rich > asterisk paris in inline code 1`] = `
"<p><code>1 * 2 * 3</code></p>
"
`;
exports[`content-rich > block with backticks 1`] = `"<p><pre class="code-block">[(\`number string) (\`tag string)]</pre></p>"`;
exports[`content-rich > block with injected html, with a known language 1`] = `

Wyświetl plik

@ -187,6 +187,11 @@ describe('content-rich', () => {
expect(formatted).toMatchSnapshot()
})
it ('asterisk paris in inline code', async () => {
const { formatted } = await render('<p>`1 * 2 * 3`</p>')
expect(formatted).toMatchSnapshot()
})
it ('asterisk paris in code block', async () => {
const { formatted } = await render('<p>```<br />1 * 2 * 3<br />```</p>')
expect(formatted).toMatchSnapshot()