mdx-formatter
GitHub リポジトリ

検索したい単語を入力

いつでも検索バーを開ける

Formatting Rules

このページはまだ翻訳されていません。原文のまま表示しています。

How mdx-formatter formats each type of markdown/MDX content

mdx-formatter uses a hybrid approach: it parses your markdown/MDX into an AST to understand structure, then applies targeted line-based operations to the original source text. This preserves formatting that pure AST round-tripping would destroy.

This section describes how each type of content is formatted.

How It Works

The format() function runs up to 3 iterations until output stabilizes. Most files converge in a single pass. If parsing fails, the original content is returned unchanged.

Revision History

作成更新