From a3d1ae13c0108bd24250573e0921bc918a9c6051 Mon Sep 17 00:00:00 2001 From: TAKAHASHI Shuuji Date: Tue, 29 Jul 2025 11:28:57 +0900 Subject: [PATCH] test: add test for asterisk pairs in inline code --- tests/nuxt/__snapshots__/content-rich.test.ts.snap | 5 +++++ tests/nuxt/content-rich.test.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/nuxt/__snapshots__/content-rich.test.ts.snap b/tests/nuxt/__snapshots__/content-rich.test.ts.snap index d1ec65b0..645c08ba 100644 --- a/tests/nuxt/__snapshots__/content-rich.test.ts.snap +++ b/tests/nuxt/__snapshots__/content-rich.test.ts.snap @@ -2,6 +2,11 @@ exports[`content-rich > asterisk paris in code block 1`] = `"

1 * 2 * 3

"`; +exports[`content-rich > asterisk paris in inline code 1`] = ` +"

1 * 2 * 3

+" +`; + exports[`content-rich > block with backticks 1`] = `"

[(\`number string) (\`tag string)]

"`; exports[`content-rich > block with injected html, with a known language 1`] = ` diff --git a/tests/nuxt/content-rich.test.ts b/tests/nuxt/content-rich.test.ts index 1a826082..3eb7982f 100644 --- a/tests/nuxt/content-rich.test.ts +++ b/tests/nuxt/content-rich.test.ts @@ -187,6 +187,11 @@ describe('content-rich', () => { expect(formatted).toMatchSnapshot() }) + it ('asterisk paris in inline code', async () => { + const { formatted } = await render('

`1 * 2 * 3`

') + expect(formatted).toMatchSnapshot() + }) + it ('asterisk paris in code block', async () => { const { formatted } = await render('

```
1 * 2 * 3
```

') expect(formatted).toMatchSnapshot()