Skip to content

chore(docs): pad admonitions with blank lines - #4676

Open
thetaPC wants to merge 1 commit into
mainfrom
admonition
Open

chore(docs): pad admonitions with blank lines#4676
thetaPC wants to merge 1 commit into
mainfrom
admonition

Conversation

@thetaPC

@thetaPC thetaPC commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Issue URL:

What is the current behavior?

Admonition content sits flush against its fences, with no blank lines:

:::tip
Text here.
:::

Prettier's markdown parser doesn't know ::: is a Docusaurus directive. When a closing fence follows a list item directly, CommonMark reads it as a lazy continuation of that item, so Prettier re-indents it to the item's content column. That's what happened to docs/api/input-otp.md, which came out of .prettierignore in #4670 and got formatted for the first time:

- Use `type="text"` for patterns that include letters to show the alphanumeric keyboard
   :::

What is the new behavior?

Every admonition in docs/ and versioned_docs/version-v8/ is padded, which keeps the closing fence a sibling of the opening one and out of reach of the list:

:::tip

Text here.

:::

904 of the 906 added lines are blank. The only two substantive changes are the dedented ::: in docs/api/input-otp.md and its v8 copy, which is the bug this fixes.

A blank line on its own isn't enough. Indented content after a blank line is still a loose-list continuation, so Prettier kept the two-space indent until the fence was realigned with its opener as well.

Does this introduce a breaking change?

  • Yes
  • No

Admonitions render identically. CommonMark allows up to three spaces of indentation on a block, so even the broken one parsed correctly. This was only ever a source-formatting problem.

Other information

N/A

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ionic-docs Ready Ready Preview Aug 27, 2026 10:42pm

Request Review

@thetaPC
thetaPC marked this pull request as ready for review August 27, 2026 22:44
@thetaPC
thetaPC requested a review from a team as a code owner August 27, 2026 22:44
@thetaPC
thetaPC requested a review from ShaneK August 27, 2026 22:44
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.

1 participant