Skip to content

fix(build-cli): preserve valid admonition line breaks - #28230

Draft
shlevari wants to merge 3 commits into
microsoft:mainfrom
shlevari:fix/build-cli-admonition-handling
Draft

shlevari wants to merge 3 commits into
microsoft:mainfrom
shlevari:fix/build-cli-admonition-handling

Conversation

@shlevari

Copy link
Copy Markdown
Contributor

Description

Fix stripSoftBreaks so it preserves the structural newline after a valid GitHub admonition marker without introducing newlines for marker-like text elsewhere.

Previously, soft breaks were removed before admonition markers were examined, which erased whether [!NOTE] appeared on its own source line. The transform then reconstructed line breaks from the flattened text, incorrectly treating same-line content as an admonition and inserting breaks before marker-like text in blockquote bodies.

The new test suite covers all supported admonition types, trailing whitespace, block content, body normalization, same-line markers, later markers, and unsupported marker forms.

Reviewer Guidance

The review process is outlined in the pull request guidelines.

The key behavior to review is that admonition recognition now uses the original Markdown AST structure before soft-break normalization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added area: tools area: build Build related issues area: repo Repo related work area: website base: main PRs targeted against main branch labels Sep 15, 2026
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (205 lines, 3 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Fleet Review — Clean

No issues found across the reviewer fleet for this run.

View run

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

Labels

area: build Build related issues area: repo Repo related work area: tools area: website base: main PRs targeted against main branch changeset-present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant