Improve > handling in blockquote in Markdown (#19802)

Co-authored-by: codex <codex@openai.com>
Co-authored-by: fisker Cheung <lionkay@gmail.com>
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
authored and GitHub committed 2026-08-17 14:21:57 +08:00
1 parent 16239f3673
commit 24f4220b9f
10 files changed
+304 -13

No files matched your search

@@ -0,0 +1,162 @@
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
exports[`encoded-greater-than.md - {"proseWrap":"always"} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
proseWrap: "always"
printWidth: 80 (default) |
=====================================input======================================
> > a
> &gt; b
> > a
> &#62; b
> > a
> &#x3e; b
> > a
> &GT; b
> > a
> &#062; b
> > a
> &#x3E; b
=====================================output=====================================
> > a &gt; b
> > a &#62; b
> > a &#x3e; b
> > a &GT; b
> > a &#062; b
> > a &#x3E; b
================================================================================
`;
exports[`encoded-newline.md - {"proseWrap":"always"} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
proseWrap: "always"
printWidth: 80 (default) |
=====================================input======================================
> a &#10; b
> &gt; c
> a &#xA; b
> &#62; c
> a &NewLine; b
> \\> c
> a &#10; b
> c
> a &newline; b
> \\> c
> a \\&NewLine; b
> \\> c
> a \\\\&NewLine; b
> \\> c
=====================================output=====================================
> a &#10; b &gt; c
> a &#xA; b &#62; c
> a &NewLine; b \\> c
> a &#10; b > c
> a &newline; b \\> c
> a \\&NewLine; b \\> c
> a \\\\&NewLine; b \\> c
================================================================================
`;
exports[`escaped-greater-than.md - {"proseWrap":"always"} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
proseWrap: "always"
printWidth: 80 (default) |
=====================================input======================================
> \\>
> \\>
> *text* > \\>
> abc
> \\> abc
=====================================output=====================================
> \\> \\>
> _text_ > \\>
> abc \\> abc
================================================================================
`;
exports[`indented-greater-than.md - {"proseWrap":"always"} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
proseWrap: "always"
printWidth: 80 (default) |
=====================================input======================================
> first
> second
> first
> second
> > first
> second
> first
>> second
=====================================output=====================================
> first > second
> first > second
> > first > second
> first >> second
================================================================================
`;
exports[`issue-19528.md - {"proseWrap":"always"} format 1`] = `
====================================options=====================================
parsers: ["markdown"]
proseWrap: "always"
printWidth: 80 (default) |
=====================================input======================================
> test\\>
> **test**\\>
> \\>
=====================================output=====================================
> test\\>
> **test**\\>
> \\>
================================================================================
`;
@@ -0,0 +1,17 @@
> > a
> &gt; b
> > a
> &#62; b
> > a
> &#x3e; b
> > a
> &GT; b
> > a
> &#062; b
> > a
> &#x3E; b
@@ -0,0 +1,20 @@
> a &#10; b
> &gt; c
> a &#xA; b
> &#62; c
> a &NewLine; b
> \> c
> a &#10; b
> c
> a &newline; b
> \> c
> a \&NewLine; b
> \> c
> a \\&NewLine; b
> \> c
@@ -0,0 +1,7 @@
> \>
> \>
> *text* > \>
> abc
> \> abc
@@ -0,0 +1 @@
runFormatTest(import.meta, ["markdown"], { proseWrap: "always" });
@@ -0,0 +1,11 @@
> first
> second
> first
> second
> > first
> second
> first
>> second
@@ -0,0 +1,5 @@
> test\>
> **test**\>
> \>