Skip to content

fix(check-md032): indented blockquote inside list-item body is NOT a list terminator (PR #3075 follow-up)#3091

Merged
AceHack merged 2 commits into
mainfrom
fix/b0456-md032-blockquote-indent-false-positive-2026-05-14
May 14, 2026
Merged

fix(check-md032): indented blockquote inside list-item body is NOT a list terminator (PR #3075 follow-up)#3091
AceHack merged 2 commits into
mainfrom
fix/b0456-md032-blockquote-indent-false-positive-2026-05-14

Conversation

@AceHack
Copy link
Copy Markdown
Member

@AceHack AceHack commented May 14, 2026

Summary

PR #3075 merged earlier this session shipped the MD032 helper with a round-15 + round-16 fix that treats a blockquote line as a list-block terminator. Post-merge validation across the full docs/hygiene-history/** corpus (584 files) surfaced 2 false positives on 0645Z.md:24-25:

- bullet describes a thing
  > the thing's exact quoted words      ← indented `>`, not column 0
- next bullet                            ← falsely flagged as new list

The isBlockquoteLine regex (^ {0,3}>) matched both column-0 AND 1-3-space-indented > lines. But an indented > is part of the enclosing list-item body, NOT a new top-level block — it shouldn't terminate the list.

Fix

Tightened isBlockquoteLine to column-0 only (^>). A 2-space-indented > quote is now correctly treated as list-item-body content, and the list continues to the next bullet without firing either MD032 side.

Test plan

  • 76 tests pass (+2): indented blockquote inside list-item body is clean; column-0 blockquote between bullets still terminates (control)
  • Full docs/hygiene-history/** corpus (584 files) now returns clean
  • Round 15/16 tests with column-0 blockquote ("blockquote line after top-level list terminates") still pass unchanged

🤖 Generated with Claude Code

…list terminator (PR #3075 follow-up)

After PR #3075 merged, running the helper across the full
`docs/hygiene-history/**` corpus (584 files) surfaced 2 false
positives on `docs/hygiene-history/ticks/2026/05/13/0645Z.md`
at lines 24-25:

```
- bullet describes a thing
  > the thing's exact quoted words      ← indented `>`, not column 0
- next bullet                            ← falsely flagged as new list
```

The round-15 / round-16 work added "blockquote line terminates a
top-level list" + "after-list MD032 fires on the blockquote line
when no blank separator." The `isBlockquoteLine` regex (`^ {0,3}>`)
matched both column-0 AND 1-3-space-indented `>` lines. But an
indented `>` (1+ spaces) is part of the enclosing list-item body /
continuation indent, NOT a new top-level block — it shouldn't
terminate the list.

Fix: tighten `isBlockquoteLine` to column-0 only (`^>`). A 2-space-
indented `> quote` line is now correctly treated as list-item-body
content, and the list continues to the next bullet without firing
either MD032 side.

Tests: 76 pass (+2). New cases:
- Indented blockquote inside list-item body: clean
- Column-0 blockquote between bullets still terminates (control)

Validation: helper run across the full `docs/hygiene-history/**`
corpus (584 files) now returns clean — confirming the fix is the
correct calibration rather than over-relaxation.

Round 15/16 tests with column-0 blockquote ("blockquote line after
top-level list terminates") still pass unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 14, 2026 03:04
@AceHack AceHack enabled auto-merge (squash) May 14, 2026 03:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR narrows MD032 blockquote termination handling to avoid false positives for blockquote-looking lines inside list-item bodies.

Changes:

  • Updates isBlockquoteLine to match only column-0 > lines.
  • Adds regression coverage for indented blockquotes inside list items and column-0 blockquote controls.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tools/hygiene/check-md032-blanks-around-lists.ts Adjusts blockquote-line detection logic.
tools/hygiene/check-md032-blanks-around-lists.test.ts Adds round-20 regression tests for the MD032 false-positive case.

Comment thread tools/hygiene/check-md032-blanks-around-lists.ts Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 671b60b72a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/hygiene/check-md032-blanks-around-lists.ts Outdated
…20 P1 review on the round-20 fix)

The round-20 commit (this PR's first push) tightened
`isBlockquoteLine` from `^ {0,3}>` to `^>`, which over-corrected.
Per CommonMark, a top-level blockquote can have 0-3 leading
spaces; the round-20 false-positive was specifically about a
2-space-indented `>` being treated as top-level when it was
actually a child block of a list-item body.

The calibration: list-item continuation indent is typically 2
spaces (for `- item` / `* item` / `+ item`); a `>` at 2-3 leading
spaces is therefore usually a child block. A `>` at 0-1 leading
spaces is unambiguously top-level. The new regex `^ {0,1}>`
captures this calibration.

Reviewer rationale (composed):

- Copilot P1: 1-space-indented `>` after `- item` IS still
  top-level per CommonMark; my round-20 `^>` regressed it
- Codex P2: `- a / ` ` > quote / - b` now misses the after-list +
  before-list MD032 findings markdownlint reports

New test asserts the 1-space-indented top-level blockquote
terminates the surrounding list (composing with the existing
column-0 and indented-blockquote-as-child-body tests).

Tests: 77 pass (+1, on stable run; one temp-git-repo test is
timing-flaky at 5s timeout — passes on rerun).

Validation: full `docs/hygiene-history/**` corpus (584 files)
still returns clean.

Co-Authored-By: Claude <noreply@anthropic.com>
@AceHack AceHack merged commit c285255 into main May 14, 2026
25 checks passed
@AceHack AceHack deleted the fix/b0456-md032-blockquote-indent-false-positive-2026-05-14 branch May 14, 2026 03:14
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: afc97c48dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// case and regressed Copilot's `- a / ` `> quote` (one-space-
// indented top-level) case. `^ {0,1}>` is the calibration that
// matches Copilot + Codex round-20 input shapes.
return /^ {0,1}>/.test(line);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Account for ordered-list indent in blockquote termination

isBlockquoteLine now treats any 2+-space-indented > as list-item body, but in ordered lists the continuation indent depends on marker width, so 1. item followed by > quote is a top-level blockquote that terminates the list per markdownlint. In findMd032Violations, this misclassification keeps inList === "top", so the following list item is treated as a continuation and MD032 is missed (false negative) for valid inputs like 1. a / two-space-indented blockquote / 1. b.

Useful? React with 👍 / 👎.

AceHack added a commit that referenced this pull request May 14, 2026
…ded (hook wiring deferred) (#3092)

* chore(tick): 0314Z shard — PR #3091 MERGED; B-0456 arc fully closed; 18 PRs this session

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(tick/0314Z): drop leading `#` from PR references at line start (MD018)

`#3075` at column 0 was parsed by markdownlint as an attempted ATX
heading (MD018: no space after hash). Dropping the `#` prefix on
the wrapped line keeps the meaning ("PR 3075") without triggering
the lint.

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(tick/0314Z): correct relative link + accuracy on B-0456 status

Two Copilot P1 findings:

1. The relative link `../../tools/...` from a shard at depth
   `docs/hygiene-history/ticks/2026/05/14/` did NOT resolve to
   the repo `tools/` directory (it pointed under `docs/hygiene-
   history/ticks/2026/tools/`). Replaced the broken link with an
   inline code-span reference — the path is still readable and
   doesn't drift to a wrong file.

2. The "B-0456 arc fully closed" claim conflicts with the row's
   actual status (`status: open` in
   `docs/backlog/P2/B-0456-...md`) — acceptance criterion #4
   (wire helper into pre-push hook OR tick-close ritual) is
   still deferred. Reworded shard title + body to "implementation
   landed; hook wiring deferred."

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants