Skip to content

feat(md): formatter plumbing#9331

Merged
ematipico merged 12 commits intomainfrom
feat/markdown-formatting
Mar 6, 2026
Merged

feat(md): formatter plumbing#9331
ematipico merged 12 commits intomainfrom
feat/markdown-formatting

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Mar 4, 2026

Summary

Part of #3718

This PR finishes the plumbing of the markdown formatter. What's been changed

  • Shorter names e.g. MarkdownLanguage -> MdLanguage, like JS
  • Updated all snapshots to use the new version of insta
  • Gate the experimental feature via biome_service/biome_configuration -> feature markdown. With this, we can use markdown without exposing things to the user

Added formatting for headers, so that we can start seeing some formatting and usage.

To notice the formatting of MdHardLine, which is formatted with format_removed and then by formatting with hard_line_break

cc @tidefield

Test Plan

Added new test, updated the snapshots.

Docs

@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2026

⚠️ No Changeset found

Latest commit: 04edd02

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added A-Project Area: project A-Parser Area: parser A-Formatter Area: formatter L-CSS Language: CSS and super languages labels Mar 4, 2026
@ematipico ematipico requested review from a team March 4, 2026 18:21
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 4, 2026

Merging this PR will not alter performance

✅ 29 untouched benchmarks
⏩ 187 skipped benchmarks1


Comparing feat/markdown-formatting (04edd02) with main (64ce544)

Open in CodSpeed

Footnotes

  1. 187 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 4, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds a gated markdown Cargo feature and exposes a markdown: Option<MarkdownConfiguration> field on the root Configuration. Introduces markdown feature wiring in dev-dependencies. Renames many public formatter types and options from Markdown*Md* (context, options, language, generated impls, tests). Extends the Markdown formatter with new formatting primitives (removed/replaced token formatting, format_removed/format_replaced), adds trailing_newline and line_ending options, refactors numerous format rules from verbatim/syntax-based rendering to field-based rendering, and adds spec tests and fixtures.

Possibly related PRs

Suggested labels

A-Tooling

Suggested reviewers

  • dyc3
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(md): formatter plumbing' clearly summarises the main change—completing the markdown formatter implementation with type renames and feature gating.
Description check ✅ Passed The description is well-related to the changeset, explaining the motivation (finishing markdown formatter plumbing), key changes (shorter type names, feature gating, header formatting), and testing approach.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/markdown-formatting

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_markdown_formatter/src/context.rs (1)

120-129: ⚠️ Potential issue | 🟠 Major

Return the stored source_map from the FormatContext implementation.

Line 128 always returns None, so the value set via with_source_map() is never exposed through the trait. This differs from biome_js_formatter, biome_grit_formatter, and biome_html_formatter, which all return self.source_map.as_ref().

Proposed fix
 impl FormatContext for MdFormatContext {
     type Options = MdFormatOptions;

     fn options(&self) -> &Self::Options {
         &self.options
     }

     fn source_map(&self) -> Option<&TransformSourceMap> {
-        None
+        self.source_map.as_ref()
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/src/context.rs` around lines 120 - 129, The
FormatContext implementation for MdFormatContext incorrectly returns None from
fn source_map(&self) -> Option<&TransformSourceMap>, so the source_map set via
with_source_map() is never exposed; change the implementation of
MdFormatContext::source_map to return the stored Option by returning
self.source_map.as_ref() (matching the pattern used in
biome_js_formatter/biome_grit_formatter/biome_html_formatter) so callers of
FormatContext can access the underlying TransformSourceMap.
🧹 Nitpick comments (2)
crates/biome_markdown_formatter/src/lib.rs (1)

220-255: Add a focused suppression regression spec.

This default path now drives suppression and comment output for every Markdown node; a dedicated spec for local + global suppression would make future changes safer.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/src/lib.rs` around lines 220 - 255, The
default formatting path now defers to format_suppressed_node when a node is
locally or globally suppressed (see fmt implementation that calls
is_suppressed/is_global_suppressed and write!(f,
[format_suppressed_node(node.syntax())])), so add a focused regression spec that
covers both local suppression and global suppression: create tests that exercise
is_suppressed and is_global_suppressed behavior by feeding nodes with local
suppression comments, nodes with global suppression markers, and combinations
(local + global) and assert the output is identical to the source (comments
preserved) and that normal formatting paths
(fmt_leading_comments/fmt_fields/fmt_dangling_comments/fmt_trailing_comments)
are skipped; target the tests at the MarkdownFormatter entrypoint used in other
specs so they fail if the suppression checks or format_suppressed_node handling
regress.
crates/biome_markdown_formatter/tests/spec_test.rs (1)

54-54: Remove or address commented-out code.

This commented line appears to be leftover from development. Either remove it or implement the source type handling if needed.

🧹 Suggested cleanup
-    // let source_type: MdFileSource = test_file.input_file().as_path().try_into().unwrap();
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/tests/spec_test.rs` at line 54, The
commented-out line with MdFileSource in the test indicates dead or unfinished
code; either delete the commented line or implement proper source type handling
by converting the test file path into an MdFileSource using
test_file.input_file().as_path().try_into().unwrap() (or a fallible conversion
with expect/error handling) and then use that MdFileSource in the test flow
(locate the commented token referencing MdFileSource and
test_file.input_file().as_path().try_into().unwrap() to update or remove
accordingly).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/biome_configuration/src/markdown.rs`:
- Line 65: The doc comment in markdown.rs currently says "The type of line
ending applied to JSON (and its super languages) files." — change that wording
to refer to Markdown instead (e.g., "The type of line ending applied to Markdown
(and its super languages) files" or similar) so the documentation matches the
Markdown configuration item; update the docstring where this text appears in
markdown.rs (the doc comment for the line-ending option) to replace "JSON" with
"Markdown".

In `@crates/biome_markdown_formatter/src/markdown/auxiliary/hard_line.rs`:
- Line 7: The code currently strips the backslash with
format_removed(&node.value_token()?) but never emits a newline, losing hard line
breaks; update the hard_line.rs handling so after calling
format_removed(&node.value_token()?).fmt(f) you also emit the explicit break
(e.g. call hard_line_break().fmt(f) or line().fmt(f) as appropriate) to preserve
the Markdown hard line semantics for the node returned by node.value_token().

In `@crates/biome_markdown_formatter/tests/spec_test.rs`:
- Around line 13-29: The top-level doc comment in tests/spec_test.rs incorrectly
references CSS formatter files and examples (e.g., `css/null`,
`{spec_name}.css`, `tests/specs/css/null.css.snap`); update all occurrences to
refer to Markdown instead (e.g., `{spec_name}.md`, `tests/specs/md/null.md`,
`tests/specs/md/null.md.snap` or simply `md/null` as the example) so the
documentation matches the Markdown formatter tests and paths used by this crate.

---

Outside diff comments:
In `@crates/biome_markdown_formatter/src/context.rs`:
- Around line 120-129: The FormatContext implementation for MdFormatContext
incorrectly returns None from fn source_map(&self) ->
Option<&TransformSourceMap>, so the source_map set via with_source_map() is
never exposed; change the implementation of MdFormatContext::source_map to
return the stored Option by returning self.source_map.as_ref() (matching the
pattern used in biome_js_formatter/biome_grit_formatter/biome_html_formatter) so
callers of FormatContext can access the underlying TransformSourceMap.

---

Nitpick comments:
In `@crates/biome_markdown_formatter/src/lib.rs`:
- Around line 220-255: The default formatting path now defers to
format_suppressed_node when a node is locally or globally suppressed (see fmt
implementation that calls is_suppressed/is_global_suppressed and write!(f,
[format_suppressed_node(node.syntax())])), so add a focused regression spec that
covers both local suppression and global suppression: create tests that exercise
is_suppressed and is_global_suppressed behavior by feeding nodes with local
suppression comments, nodes with global suppression markers, and combinations
(local + global) and assert the output is identical to the source (comments
preserved) and that normal formatting paths
(fmt_leading_comments/fmt_fields/fmt_dangling_comments/fmt_trailing_comments)
are skipped; target the tests at the MarkdownFormatter entrypoint used in other
specs so they fail if the suppression checks or format_suppressed_node handling
regress.

In `@crates/biome_markdown_formatter/tests/spec_test.rs`:
- Line 54: The commented-out line with MdFileSource in the test indicates dead
or unfinished code; either delete the commented line or implement proper source
type handling by converting the test file path into an MdFileSource using
test_file.input_file().as_path().try_into().unwrap() (or a fallible conversion
with expect/error handling) and then use that MdFileSource in the test flow
(locate the commented token referencing MdFileSource and
test_file.input_file().as_path().try_into().unwrap() to update or remove
accordingly).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e46f6d63-0fcd-4619-b3e0-50dd97ae3135

📥 Commits

Reviewing files that changed from the base of the PR and between c3ec092 and 2cb1670.

⛔ Files ignored due to path filters (261)
  • crates/biome_markdown_factory/src/generated/node_factory.rs is excluded by !**/generated/**, !**/generated/** and included by **
  • crates/biome_markdown_formatter/tests/specs/markdown/headers.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/code.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/ignore-code.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/nested.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/notext-end.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/break/simple.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/break/wrap.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/broken-plugins/missing-comments.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/0-indent-js.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/additional-space.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/angular/angular-html.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/angular/angular-ts.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/backtick.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/indent.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-auth-api.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-3.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-4.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-5.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-6.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-7.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-8.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-9.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-filter-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-filter-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-font-face-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-font-face-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-grid-auto-columns.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-import.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-mask-image.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-padding-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-padding-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-transform.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-unicode-range.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/cursor/17227.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/emphasis/asterisk.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/emphasis/complex.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/emphasis/special.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/long.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/multiline.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/sibling.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/front-matter/custom-parser.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/front-matter/empty.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/heading/setext.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/html/multiline-with-trailing-space.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/html/multiline.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/ignore/top-level-range.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/indentation/example.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/inlineCode/backtick.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/link/encodedLink.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/link/title.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/case-and-space/case-and-space.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/case-and-space/issue-7118.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/definition.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/title.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-mismatched-braces.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-object-close-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-object-open-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-template-close-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-template-open-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/align.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/codeblock.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/combined-lists.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/git-diff-friendly.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/indent.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/interrupt.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/issue-17652.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/issue-7846.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/loose.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/nested-checkbox.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/nested-tab.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/start.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/tab.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/unordered.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/long-table/long-table.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/markdown/real-world-case.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/markdown/test-case.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/math/math-like.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/math/remark-math.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/multiparser-js/jsx-comment.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/multiparser-js/meta-in-code-block.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/multiparser-json/invalid-json.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/paragraph/inline-nodes.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/paragraph/lorem.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/paragraph/special-prefix.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/commonmark-0.30-example-329.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/commonmark-0.30-example-335.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/commonmark-0.30-example-336.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/commonmark-0.30-example-337.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-100.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-102.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-103.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-104.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-105.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-106.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-107.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-108.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-11.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-110.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-111.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-112.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-113.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-117.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-120.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-132.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-133.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-14.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-140.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-141.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-149.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-15.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-152.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-157.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-158.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-159.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-162.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-17.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-170.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-176.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-177.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-18.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-181.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-182.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-183.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-184.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-185.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-186.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-187.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-188.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-189.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-19.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-190.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-192.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-193.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-194.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-195.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-196.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-197.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-198.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-20.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-200.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-201.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-205.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-206.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-207.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-209.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-21.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-210.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-211.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-212.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-217.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-218.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-219.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-22.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-220.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-222.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-229.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-23.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-232.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-234.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-235.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-236.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-237.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-238.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-240.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-242.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-244.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-245.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-246.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-247.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-249.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-25.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-250.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-251.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-252.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-254.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-255.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-256.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-259.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-26.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-260.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-261.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-262.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-263.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-264.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-265.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-266.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-267.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-268.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-269.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-27.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-272.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-273.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-274.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-276.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-277.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-28.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-282.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-286.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-287.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-288.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-289.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-29.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-292.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-295.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-296.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-297.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-298.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-30.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-305.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-306.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-307.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-311.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-313.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-317.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-325.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-326.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-328.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-33.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-333.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-334.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-336.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-337.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-339.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-340.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-341.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-346.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-347.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-348.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-349.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-35.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-356.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-357.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-358.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-359.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-36.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-360.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-361.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-362.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-363.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-364.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-367.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-368.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-369.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-37.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-371.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-372.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-373.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-374.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-375.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-376.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-377.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-378.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-379.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-380.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-381.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-382.md.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (39)
  • crates/biome_configuration/Cargo.toml
  • crates/biome_configuration/src/lib.rs
  • crates/biome_configuration/src/markdown.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_markdown_factory/src/lib.rs
  • crates/biome_markdown_formatter/Cargo.toml
  • crates/biome_markdown_formatter/src/comments.rs
  • crates/biome_markdown_formatter/src/context.rs
  • crates/biome_markdown_formatter/src/cst.rs
  • crates/biome_markdown_formatter/src/generated.rs
  • crates/biome_markdown_formatter/src/lib.rs
  • crates/biome_markdown_formatter/src/markdown/any/block.rs
  • crates/biome_markdown_formatter/src/markdown/any/bullet_list_member.rs
  • crates/biome_markdown_formatter/src/markdown/any/code_block.rs
  • crates/biome_markdown_formatter/src/markdown/any/container_block.rs
  • crates/biome_markdown_formatter/src/markdown/any/inline.rs
  • crates/biome_markdown_formatter/src/markdown/any/leaf_block.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/document.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hard_line.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hash.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/header.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/paragraph.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/textual.rs
  • crates/biome_markdown_formatter/src/markdown/lists/block_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/bullet_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/code_name_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/hash_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/indent_token_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/quote_indent_list.rs
  • crates/biome_markdown_formatter/src/prelude.rs
  • crates/biome_markdown_formatter/src/trivia.rs
  • crates/biome_markdown_formatter/src/verbatim.rs
  • crates/biome_markdown_formatter/tests/language.rs
  • crates/biome_markdown_formatter/tests/prettier_tests.rs
  • crates/biome_markdown_formatter/tests/quick_test.rs
  • crates/biome_markdown_formatter/tests/spec_test.rs
  • crates/biome_markdown_formatter/tests/spec_tests.rs
  • crates/biome_markdown_formatter/tests/specs/markdown/headers.md

Copy link
Contributor

@tidefield tidefield left a comment

Choose a reason for hiding this comment

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

Thanks for filling in the gaps I missed

@@ -0,0 +1,48 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this newly coming from prettier repo? I wonder why I didn't have it in the first place.

Copy link
Member Author

Choose a reason for hiding this comment

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

Probably you're still using an old version of insta.

This is a guess, but I think insta starts emitting diagnostics for each snapshots and eventually gives up in there are too many.

FYI try to update the tools (there's a justfile task)

-456
+123456

-123\
Copy link
Contributor

@tidefield tidefield Mar 5, 2026

Choose a reason for hiding this comment

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

I think if what you had for hardline is correct, then we shouldn't have the diff here.

Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm reading the snapshot correctly, the backlash is removed. If a user actually relies on that for a hard break, is there a way for the formatter to preserve the backslash intent? https://commonmark.org/help/tutorial/03-paragraphs.html

If we swallow \ without inserting one more new line, the rendered output in HTML will be

123456

where the two lines join together. This changes the document intent.

In other words, when someone writes

123\
456

they expect the rendered output to be

123
456

With

123
456

the lines join together in rendered output.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah we can fix that later. I was more focused on making the tests pass (idempotence check), and implementing something simple enough

The infrastructure we have is solid. Once we match prettier formatting, the snapshot is automatically deleted. The more we delete, the better

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok sounds good then. I just wanted to clarify my understanding.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes you're understanding is correct!

Not sure if you checked my latest changes, you might have noticed how we passed down some options.

I believe we will have to rely on them a lot.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (1)
crates/biome_markdown_formatter/tests/quick_test.rs (1)

13-23: This is currently a debug probe, not a test — make that explicit.

Given it’s #[ignore] and assertion-free, that’s fine for local probing; just switch debug prints to dbg! per repo convention (or add assertions if you want this to catch regressions).

Suggested tweak
-    // Print CST
-    eprintln!("{:#?}", parse.syntax());
+    dbg!(parse.syntax());
@@
-    // Print formatted output
     let formatted = result.unwrap();
-    eprintln!("Formatted:\n{}", formatted.print().unwrap().as_code());
+    dbg!(formatted.print().unwrap().as_code());

As per coding guidelines: **/*.rs: Use the dbg!() macro for debugging output in Rust tests and code.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/tests/quick_test.rs` around lines 13 - 23,
The test is only a debug probe and uses eprintln! for output; replace the debug
prints with dbg! per repo convention or add assertions to make it a real test.
Specifically, change the eprintln!("{:#?}", parse.syntax()) to
dbg!(parse.syntax()), and replace eprintln!("Formatted:\n{}",
formatted.print().unwrap().as_code()) with
dbg!(formatted.print().unwrap().as_code()); keep the existing setup using
MdFormatOptions::default(), biome_formatter::format_node(&parse.syntax(),
MdFormatLanguage::new(options), false), and the formatted/result unwrap logic
unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/biome_markdown_formatter/src/markdown/auxiliary/textual.rs`:
- Around line 6-24: Add inline rustdoc comments for the new formatting rule and
its options: place /// doc comments above the FormatMdTextual struct describing
its purpose (a formatting rule for MdTextual nodes) and behavior, and above the
FormatMdTextualOptions struct describing what the options control; also document
the should_remove option (what true/false does) next to its declaration and add
a short note on fmt_fields (or the rule's formatting behavior) so consumers
understand how the rule operates.

In `@crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs`:
- Around line 41-43: When handling ordinary textual nodes in inline_item_list.rs
(the branch that calls joiner.entry(&text.format())), reset the seen_new_line
flag so subsequent empty text nodes aren't misclassified as post-newline; locate
the variable named seen_new_line and set it to false immediately after
joiner.entry(&text.format()) inside the same branch, ensuring the newline state
reflects that real text was emitted.
- Around line 45-47: AnyMdInline::MdHardLine is currently handled by the generic
branch (calling joiner.entry(&item.format())) which omits emitting the explicit
hard-line break; update the match in inline_item_list.rs to add an explicit arm
for AnyMdInline::MdHardLine that calls the hard_line_break() helper in addition
to formatting the node (i.e., invoke item.format() via joiner.entry or
equivalent and then call hard_line_break()), so callers align with
FormatMdHardLine::fmt_fields which strips the backslash token and expects the
caller to emit the break.

---

Nitpick comments:
In `@crates/biome_markdown_formatter/tests/quick_test.rs`:
- Around line 13-23: The test is only a debug probe and uses eprintln! for
output; replace the debug prints with dbg! per repo convention or add assertions
to make it a real test. Specifically, change the eprintln!("{:#?}",
parse.syntax()) to dbg!(parse.syntax()), and replace eprintln!("Formatted:\n{}",
formatted.print().unwrap().as_code()) with
dbg!(formatted.print().unwrap().as_code()); keep the existing setup using
MdFormatOptions::default(), biome_formatter::format_node(&parse.syntax(),
MdFormatLanguage::new(options), false), and the formatted/result unwrap logic
unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5dfc377a-e77d-4bc9-88e0-5f1cd4b718db

📥 Commits

Reviewing files that changed from the base of the PR and between 3fd76c1 and 002b099.

⛔ Files ignored due to path filters (10)
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/break/simple.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/break/wrap.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/long.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/sibling.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/math/remark-math.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-17.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-182.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-183.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-186.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/spec/example-289.md.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (11)
  • crates/biome_markdown_formatter/src/comments.rs
  • crates/biome_markdown_formatter/src/context.rs
  • crates/biome_markdown_formatter/src/cst.rs
  • crates/biome_markdown_formatter/src/lib.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hard_line.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/textual.rs
  • crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs
  • crates/biome_markdown_formatter/src/trivia.rs
  • crates/biome_markdown_formatter/src/verbatim.rs
  • crates/biome_markdown_formatter/tests/language.rs
  • crates/biome_markdown_formatter/tests/quick_test.rs
🚧 Files skipped from review as they are similar to previous changes (5)
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hard_line.rs
  • crates/biome_markdown_formatter/tests/language.rs
  • crates/biome_markdown_formatter/src/verbatim.rs
  • crates/biome_markdown_formatter/src/context.rs
  • crates/biome_markdown_formatter/src/cst.rs

@ematipico ematipico force-pushed the feat/markdown-formatting branch from d460097 to 5469bb9 Compare March 5, 2026 09:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_markdown_formatter/src/context.rs (1)

120-129: ⚠️ Potential issue | 🟠 Major

Return the stored source map instead of always None.

At Line 128, source_map() discards context state and always returns None. That makes with_source_map ineffective and drops mappings.

Suggested patch
 impl FormatContext for MdFormatContext {
     type Options = MdFormatOptions;

     fn options(&self) -> &Self::Options {
         &self.options
     }

     fn source_map(&self) -> Option<&TransformSourceMap> {
-        None
+        self.source_map.as_ref()
     }
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/src/context.rs` around lines 120 - 129, The
source_map() impl in MdFormatContext currently always returns None, discarding
the stored TransformSourceMap and breaking with_source_map; change source_map()
to return a reference to the stored map (e.g., self.source_map.as_ref()) instead
of None so the context exposes its internal TransformSourceMap; locate
MdFormatContext and update its source_map(&self) -> Option<&TransformSourceMap>
to return the stored option rather than None.
♻️ Duplicate comments (1)
crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs (1)

45-50: ⚠️ Potential issue | 🟡 Minor

Reset newline state after emitting normal text.

At Line 46, regular textual content is emitted, but seen_new_line stays unchanged. If it was true, later empty text can be treated as post-newline incorrectly.

Suggested patch
                 } else {
                     joiner.entry(&text.format().with_options(FormatMdTextualOptions {
                         should_remove: false,
                         trime_start: self.trime_start && index == 0,
                     }));
+                    seen_new_line = false;
                 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs`
around lines 45 - 50, When emitting regular textual content inside the else
branch that calls
joiner.entry(&text.format().with_options(FormatMdTextualOptions { ... })), reset
the newline state so subsequent empty text isn't misclassified; specifically,
after the joiner.entry(...) call set the seen_new_line flag (seen_new_line or
self.seen_new_line used in this module) to false so normal text clears the
post-newline state. Locate the else branch around the joiner.entry invocation in
inline_item_list.rs and add a statement to reset seen_new_line immediately after
emitting the formatted text.
🧹 Nitpick comments (3)
crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs (1)

63-65: Consider renaming trime_start to trim_start before this spreads further.

Line 64’s typo is harmless functionally, but it makes APIs harder to scan and grep over time.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs`
around lines 63 - 65, The struct field name `trime_start` in
FormatMdFormatInlineItemListOptions is a typo; rename it to `trim_start`
(keeping pub(crate) visibility) and update all usages (constructors, struct
literals, field accesses, and pattern matches) to the new name so compilation
succeeds; search for the exact identifier `trime_start` and replace it with
`trim_start` across the crate to avoid breaking references.
crates/biome_markdown_formatter/src/generated.rs (1)

863-864: Please re-run generation/formatting for this generated block.

Line 863 and Line 872 have atypical token spacing in this generated file. It compiles, but it looks like a non-clean codegen/format pass and will create noisy future diffs.

Suggested tidy-up
-        FormatRefWithRule :: new (self , crate :: markdown :: auxiliary :: link_reference_definition :: FormatMdLinkReferenceDefinition :: default ())
+        FormatRefWithRule::new(
+            self,
+            crate::markdown::auxiliary::link_reference_definition::FormatMdLinkReferenceDefinition::default(),
+        )

-        FormatOwnedWithRule :: new (self , crate :: markdown :: auxiliary :: link_reference_definition :: FormatMdLinkReferenceDefinition :: default ())
+        FormatOwnedWithRule::new(
+            self,
+            crate::markdown::auxiliary::link_reference_definition::FormatMdLinkReferenceDefinition::default(),
+        )

As per coding guidelines **/*_formatter/**/*.rs: "Run just gen-formatter <lang> before opening a PR when implementing changes to formatter in *_formatter directories" and **/*.rs: "Always run just f (code formatting) and just l (linting) before committing code".

Also applies to: 872-873

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_markdown_formatter/src/generated.rs` around lines 863 - 864, The
generated block has inconsistent token spacing around the constructor call for
FormatRefWithRule::new and the nested FormatMdLinkReferenceDefinition::default()
invocation; re-run the formatter/generator to normalize spacing by regenerating
this formatter code (run the generation step used for this project, e.g., just
gen-formatter for the language) and then run code formatting and linting (just f
and just l) so the line with FormatRefWithRule::new(self,
crate::markdown::auxiliary::link_reference_definition::FormatMdLinkReferenceDefinition::default())
and the related lines are rewritten with canonical spacing.
crates/biome_configuration/src/markdown.rs (1)

61-67: Optional consistency note: add optional to these two fields for clarity.

Both trailing_newline and line_ending already work fine as optional (bpaf infers it from Option<T>), but the other formatter flags explicitly include optional. Adding it here makes the intent clearer and matches the pattern used elsewhere in the struct.

Consistency tweak
-    #[bpaf(long("md-formatter-trailing-newline"), argument("true|false"))]
+    #[bpaf(long("md-formatter-trailing-newline"), argument("true|false"), optional)]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub trailing_newline: Option<TrailingNewline>,

-    #[bpaf(long("md-formatter-line-ending"), argument("lf|crlf|cr|auto"))]
+    #[bpaf(long("md-formatter-line-ending"), argument("lf|crlf|cr|auto"), optional)]
     #[serde(skip_serializing_if = "Option::is_none")]
     pub line_ending: Option<LineEnding>,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_configuration/src/markdown.rs` around lines 61 - 67, Add the
bpaf attribute flag `optional` to the md formatter fields so their intent as
optional CLI flags is explicit: update the attributes on the struct fields
`trailing_newline` and `line_ending` (currently annotated with
#[bpaf(long("md-formatter-trailing-newline"), argument("true|false"))] and
#[bpaf(long("md-formatter-line-ending"), argument("lf|crlf|cr|auto"))]) to
include optional (e.g. #[bpaf(long(...), argument(...), optional)]), matching
the pattern used by other formatter flags.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@crates/biome_markdown_formatter/src/cst.rs`:
- Around line 11-34: Delete the duplicate impl block implementing
FormatRule<MarkdownSyntaxToken> for FormatMarkdownSyntaxNode (the impl that
defines fn fmt calling track_token and the two format_*_trivia methods); token
formatting is already implemented by FormatMdSyntaxToken in lib.rs, and
FormatMarkdownSyntaxNode should only implement FormatRule<MarkdownSyntaxNode>
(the existing map_syntax_node! implementation). Keep the impl
FormatToken<MarkdownLanguage, MdFormatContext> for FormatMarkdownSyntaxNode if
present, and remove only the redundant FormatRule<MarkdownSyntaxToken> impl to
avoid coherence/compilation errors.

---

Outside diff comments:
In `@crates/biome_markdown_formatter/src/context.rs`:
- Around line 120-129: The source_map() impl in MdFormatContext currently always
returns None, discarding the stored TransformSourceMap and breaking
with_source_map; change source_map() to return a reference to the stored map
(e.g., self.source_map.as_ref()) instead of None so the context exposes its
internal TransformSourceMap; locate MdFormatContext and update its
source_map(&self) -> Option<&TransformSourceMap> to return the stored option
rather than None.

---

Duplicate comments:
In `@crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs`:
- Around line 45-50: When emitting regular textual content inside the else
branch that calls
joiner.entry(&text.format().with_options(FormatMdTextualOptions { ... })), reset
the newline state so subsequent empty text isn't misclassified; specifically,
after the joiner.entry(...) call set the seen_new_line flag (seen_new_line or
self.seen_new_line used in this module) to false so normal text clears the
post-newline state. Locate the else branch around the joiner.entry invocation in
inline_item_list.rs and add a statement to reset seen_new_line immediately after
emitting the formatted text.

---

Nitpick comments:
In `@crates/biome_configuration/src/markdown.rs`:
- Around line 61-67: Add the bpaf attribute flag `optional` to the md formatter
fields so their intent as optional CLI flags is explicit: update the attributes
on the struct fields `trailing_newline` and `line_ending` (currently annotated
with #[bpaf(long("md-formatter-trailing-newline"), argument("true|false"))] and
#[bpaf(long("md-formatter-line-ending"), argument("lf|crlf|cr|auto"))]) to
include optional (e.g. #[bpaf(long(...), argument(...), optional)]), matching
the pattern used by other formatter flags.

In `@crates/biome_markdown_formatter/src/generated.rs`:
- Around line 863-864: The generated block has inconsistent token spacing around
the constructor call for FormatRefWithRule::new and the nested
FormatMdLinkReferenceDefinition::default() invocation; re-run the
formatter/generator to normalize spacing by regenerating this formatter code
(run the generation step used for this project, e.g., just gen-formatter for the
language) and then run code formatting and linting (just f and just l) so the
line with FormatRefWithRule::new(self,
crate::markdown::auxiliary::link_reference_definition::FormatMdLinkReferenceDefinition::default())
and the related lines are rewritten with canonical spacing.

In `@crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs`:
- Around line 63-65: The struct field name `trime_start` in
FormatMdFormatInlineItemListOptions is a typo; rename it to `trim_start`
(keeping pub(crate) visibility) and update all usages (constructors, struct
literals, field accesses, and pattern matches) to the new name so compilation
succeeds; search for the exact identifier `trime_start` and replace it with
`trim_start` across the crate to avoid breaking references.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 760929c6-677e-4a7f-86a0-6a2dd427a050

📥 Commits

Reviewing files that changed from the base of the PR and between 002b099 and 5469bb9.

⛔ Files ignored due to path filters (75)
  • crates/biome_markdown_formatter/tests/specs/markdown/headers.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/code.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/ignore-code.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/nested.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/blockquote/notext-end.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/break/simple.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/break/wrap.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/broken-plugins/missing-comments.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/0-indent-js.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/additional-space.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/angular/angular-html.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/angular/angular-ts.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/backtick.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/indent.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-auth-api.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-3.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-4.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-5.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-6.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-7.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-8.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-background-9.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-filter-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-filter-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-font-face-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-font-face-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-grid-auto-columns.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-import.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-mask-image.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-padding-1.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-padding-2.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-transform.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/code/mdn-unicode-range.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/cursor/17227.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/emphasis/asterisk.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/emphasis/complex.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/emphasis/special.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/long.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/multiline.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/footnoteDefinition/sibling.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/front-matter/custom-parser.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/front-matter/empty.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/heading/setext.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/html/multiline-with-trailing-space.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/html/multiline.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/ignore/top-level-range.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/indentation/example.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/inlineCode/backtick.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/link/encodedLink.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/link/title.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/case-and-space/case-and-space.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/case-and-space/issue-7118.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/definition.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/linkReference/title.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-mismatched-braces.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-object-close-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-object-open-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-template-close-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/liquid/unbalanced-template-open-only.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/align.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/codeblock.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/combined-lists.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/git-diff-friendly.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/indent.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/interrupt.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/issue-17652.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/issue-7846.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/loose.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/nested-checkbox.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/nested-tab.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/start.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/tab.md.snap is excluded by !**/*.snap and included by **
  • crates/biome_markdown_formatter/tests/specs/prettier/markdown/list/unordered.md.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (38)
  • crates/biome_configuration/Cargo.toml
  • crates/biome_configuration/src/lib.rs
  • crates/biome_configuration/src/markdown.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_markdown_formatter/Cargo.toml
  • crates/biome_markdown_formatter/src/comments.rs
  • crates/biome_markdown_formatter/src/context.rs
  • crates/biome_markdown_formatter/src/cst.rs
  • crates/biome_markdown_formatter/src/generated.rs
  • crates/biome_markdown_formatter/src/lib.rs
  • crates/biome_markdown_formatter/src/markdown/any/block.rs
  • crates/biome_markdown_formatter/src/markdown/any/bullet_list_member.rs
  • crates/biome_markdown_formatter/src/markdown/any/code_block.rs
  • crates/biome_markdown_formatter/src/markdown/any/container_block.rs
  • crates/biome_markdown_formatter/src/markdown/any/inline.rs
  • crates/biome_markdown_formatter/src/markdown/any/leaf_block.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/document.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hard_line.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hash.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/header.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/paragraph.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/textual.rs
  • crates/biome_markdown_formatter/src/markdown/lists/block_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/bullet_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/code_name_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/hash_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/indent_token_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/inline_item_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/quote_indent_list.rs
  • crates/biome_markdown_formatter/src/prelude.rs
  • crates/biome_markdown_formatter/src/trivia.rs
  • crates/biome_markdown_formatter/src/verbatim.rs
  • crates/biome_markdown_formatter/tests/language.rs
  • crates/biome_markdown_formatter/tests/prettier_tests.rs
  • crates/biome_markdown_formatter/tests/quick_test.rs
  • crates/biome_markdown_formatter/tests/spec_test.rs
  • crates/biome_markdown_formatter/tests/spec_tests.rs
  • crates/biome_markdown_formatter/tests/specs/markdown/headers.md
🚧 Files skipped from review as they are similar to previous changes (18)
  • crates/biome_markdown_formatter/src/markdown/lists/hash_list.rs
  • crates/biome_markdown_formatter/src/markdown/any/block.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/hash.rs
  • crates/biome_css_formatter/src/lib.rs
  • crates/biome_markdown_formatter/src/markdown/lists/bullet_list.rs
  • crates/biome_markdown_formatter/src/markdown/any/code_block.rs
  • crates/biome_markdown_formatter/tests/prettier_tests.rs
  • crates/biome_markdown_formatter/tests/spec_test.rs
  • crates/biome_markdown_formatter/src/verbatim.rs
  • crates/biome_markdown_formatter/src/markdown/lists/quote_indent_list.rs
  • crates/biome_markdown_formatter/src/markdown/lists/block_list.rs
  • crates/biome_markdown_formatter/src/comments.rs
  • crates/biome_markdown_formatter/tests/specs/markdown/headers.md
  • crates/biome_markdown_formatter/tests/spec_tests.rs
  • crates/biome_markdown_formatter/src/markdown/any/container_block.rs
  • crates/biome_markdown_formatter/src/trivia.rs
  • crates/biome_configuration/src/lib.rs
  • crates/biome_markdown_formatter/src/markdown/auxiliary/textual.rs

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
crates/biome_configuration/src/markdown.rs (1)

32-94: Consider one regression snapshot for CLI visibility.

Given this PR’s goal, a small CLI snapshot test asserting the intended md-formatter-* surface would keep this plumbing future-proof (and save future-you a Friday surprise).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/biome_configuration/src/markdown.rs` around lines 32 - 94, Add a small
CLI snapshot test that verifies the bpaf/CLI exposes the md-formatter-* flags
(md-formatter-enabled, md-formatter-indent-style, md-formatter-indent-width,
md-formatter-line-width, md-formatter-trailing-newline,
md-formatter-line-ending) so future changes to the Markdown config fields
(enabled, indent_style, indent_width, line_width, trailing_newline, line_ending
in markdown.rs) don't regress the CLI surface; implement the test to render the
CLI help/usage output for the crate's argument parser (or the bpaf parser that
wires these fields) and assert it matches a committed snapshot string. Ensure
the test is gated behind the same feature if needed (feature = "markdown") and
placed with other CLI tests so CI will catch any accidental removal or renaming
of those flags.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@crates/biome_configuration/src/markdown.rs`:
- Around line 32-94: Add a small CLI snapshot test that verifies the bpaf/CLI
exposes the md-formatter-* flags (md-formatter-enabled,
md-formatter-indent-style, md-formatter-indent-width, md-formatter-line-width,
md-formatter-trailing-newline, md-formatter-line-ending) so future changes to
the Markdown config fields (enabled, indent_style, indent_width, line_width,
trailing_newline, line_ending in markdown.rs) don't regress the CLI surface;
implement the test to render the CLI help/usage output for the crate's argument
parser (or the bpaf parser that wires these fields) and assert it matches a
committed snapshot string. Ensure the test is gated behind the same feature if
needed (feature = "markdown") and placed with other CLI tests so CI will catch
any accidental removal or renaming of those flags.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f3d24e9a-b8ff-4686-98d6-92d95d74d71d

📥 Commits

Reviewing files that changed from the base of the PR and between 5469bb9 and f09f1f0.

📒 Files selected for processing (1)
  • crates/biome_configuration/src/markdown.rs

Copy link
Contributor

@tidefield tidefield left a comment

Choose a reason for hiding this comment

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

I came back to my comment in simple.md.snap to make sure I understood it correctly.

I wasn't explicitly asked to review the PR but I reviewed for my own sake of learning. Please excuse any mistake or misunderstanding :D.

-456
+123456

-123\
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm reading the snapshot correctly, the backlash is removed. If a user actually relies on that for a hard break, is there a way for the formatter to preserve the backslash intent? https://commonmark.org/help/tutorial/03-paragraphs.html

If we swallow \ without inserting one more new line, the rendered output in HTML will be

123456

where the two lines join together. This changes the document intent.

In other words, when someone writes

123\
456

they expect the rendered output to be

123
456

With

123
456

the lines join together in rendered output.

@github-actions github-actions bot added A-Linter Area: linter A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages labels Mar 6, 2026
@ematipico ematipico force-pushed the feat/markdown-formatting branch from 8d7ef7f to 4984597 Compare March 6, 2026 09:26
@github-actions github-actions bot removed A-Linter Area: linter A-Tooling Area: internal tools labels Mar 6, 2026
@ematipico ematipico merged commit 59c086a into main Mar 6, 2026
17 checks passed
@ematipico ematipico deleted the feat/markdown-formatting branch March 6, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter A-Parser Area: parser A-Project Area: project L-CSS Language: CSS and super languages L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants