fix: keep a tab after the block quote marker's space literal (#4208)

Co-authored-by: usesprocket[bot] <306702232+usesprocket[bot]@users.noreply.github.com>
This commit is contained in:
Aarav Gupta
2026-11-10 21:11:38 -07:00
committed by GitHub
co-authored by usesprocket[bot]
parent 1ae2ac9d7f
commit 2d3b47fa21
4 changed files with 14 additions and 3 deletions
+3 -2
View File
@@ -234,8 +234,9 @@ export class _Tokenizer<ParserOutput = string, RendererOutput = string> {
const currentRaw = currentLines.join('\n');
const currentText = currentRaw
// a tab after the block quote marker runs to the next tab stop, and
// the marker only consumes one space of it; the rest is content
// a tab right after the block quote marker runs to the next tab stop, and
// the marker only consumes one space of it; the rest is content.
// After a space the marker consumes it whole, so later tabs stay literal.
.replace(
this.rules.other.blockquoteMarkerWhitespace,
(_, marker: string, whitespace: string) => marker + expandTabs(whitespace, marker.length),
+1 -1
View File
@@ -63,7 +63,7 @@ export const other = {
// has to be recognized here or a lazy `===\t` becomes a heading.
blockquoteSetextReplace: /\n {0,3}((?:=+|-+)[ \t]*)(?=\n|$)/g,
blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm,
blockquoteMarkerWhitespace: /^( {0,3}>)([ \t]+)/gm,
blockquoteMarkerWhitespace: /^( {0,3}>)(\t[ \t]*)/gm,
listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g,
listIsTask: /^\[[ xX]\][ \t]+\S/,
listReplaceTask: /^\[[ xX]\][ \t]+/,
@@ -0,0 +1,4 @@
<blockquote>
<pre><code> foo
</code></pre>
</blockquote>
@@ -0,0 +1,6 @@
---
renderExact: true
---
> ```
> foo
> ```