From b6d9cb83c747f9a021aa277b0c64b5bf3a40bf41 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sun, 26 Jul 2026 19:33:40 +0530 Subject: [PATCH] fix(markdown): remove extra whitespace from container markup --- .../node/markdown/plugins/containers.test.ts | 104 ++++++++++-------- src/node/markdown/plugins/containers.ts | 2 +- 2 files changed, 61 insertions(+), 45 deletions(-) diff --git a/__tests__/unit/node/markdown/plugins/containers.test.ts b/__tests__/unit/node/markdown/plugins/containers.test.ts index f3005c9b8..d84bc6ca4 100644 --- a/__tests__/unit/node/markdown/plugins/containers.test.ts +++ b/__tests__/unit/node/markdown/plugins/containers.test.ts @@ -32,25 +32,25 @@ describe('node/markdown/plugins/containers', () => { .map((t) => `::: ${t}\ncontent of ${t}\n:::`) .join('\n\n') expect(await render(src)).toMatchInlineSnapshot(` - "
TIP
+ "TIP
content of tip
INFO
+INFO
content of info
WARNING
+WARNING
content of warning
DANGER
+DANGER
content of danger
NOTE
+NOTE
content of note
IMPORTANT
+IMPORTANT
content of important
CAUTION
+CAUTION
content of caution
hidden content
-hidden content
+STOP
+ "STOP
Danger zone, do not proceed
A bold title with code
A bold title with code
content
console.log('hi')
See the guide
+ "See the guide
content
提示
+ "提示
提示内容
详情内容
SUCCESS
+ "SUCCESS
You have completed the walkthrough!
content
content
Custom
+Custom
content
Custom
-content
-Custom
+content
+content
content
still needs its summary
content
Outer
+ "Outer
outer content
-inner content
WARNING
-no closing fence
-WARNING
+no closing fence
+TIP
+ "TIP
content
提示
+ "提示
内容
内容
成功
+成功
内容
ROOT TIP
+ "ROOT TIP
content
Custom Title
+ "Custom Title
内容