






















@@ -93,7 +93,7 @@ describe("blockquote spacing", () => {
9393const result = markdownToIR(input);
94949595// Each nested level is a new paragraph
96-expect(result.text).not.toContain("\n\n\n");
96+expect(result.text).toBe("level 1\n\nlevel 2\n\nlevel 3");
9797});
9898});
9999@@ -120,16 +120,14 @@ describe("blockquote spacing", () => {
120120const result = markdownToIR(input);
121121122122// Code blocks preserve their trailing newline
123-expect(result.text.startsWith("quote\n\ncode")).toBe(true);
124-expect(result.text).not.toContain("\n\n\n");
123+expect(result.text).toBe("quote\n\ncode\n");
125124});
126125127126it("should have double newline between blockquote and horizontal rule", () => {
128127const input = "> quote\n\n---\n\nparagraph";
129128const result = markdownToIR(input);
130129131-// HR just adds a newline in IR, but should not create triple newlines
132-expect(result.text).not.toContain("\n\n\n");
130+expect(result.text).toBe("quote\n\n───\n\nparagraph");
133131});
134132});
135133@@ -140,8 +138,7 @@ describe("blockquote spacing", () => {
140138141139// Multi-paragraph blockquote should have proper internal spacing
142140// AND proper spacing with following content
143-expect(result.text).toContain("first paragraph\n\nsecond paragraph");
144-expect(result.text).not.toContain("\n\n\n");
141+expect(result.text).toBe("first paragraph\n\nsecond paragraph\n\nfollowing paragraph");
145142});
146143});
147144@@ -161,15 +158,14 @@ describe("blockquote spacing", () => {
161158const input = ">\n\nparagraph";
162159const result = markdownToIR(input);
163160164-expect(result.text).not.toContain("\n\n\n");
161+expect(result.text).toBe("paragraph");
165162});
166163167164it("should handle blockquote at end of document", () => {
168165const input = "paragraph\n\n> quote";
169166const result = markdownToIR(input);
170167171-// No trailing triple newlines
172-expect(result.text).not.toContain("\n\n\n");
168+expect(result.text).toBe("paragraph\n\nquote");
173169});
174170175171it("should handle multiple blockquotes with paragraphs between", () => {
@@ -196,8 +192,7 @@ describe("comparison with other block elements (control group)", () => {
196192const result = markdownToIR(input);
197193198194// Lists already work correctly
199-expect(result.text).toContain("• item 2\n\nparagraph");
200-expect(result.text).not.toContain("\n\n\n");
195+expect(result.text).toBe("• item 1\n• item 2\n\nparagraph");
201196});
202197203198it("heading followed by paragraph should have double newline", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。