File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,6 +322,25 @@ with [`extend-include`](settings.md#extend-include) in your project settings:
322322 extend-include = ["docs/*.md"]
323323 ```
324324
325+ To format Markdown files with extensions other than ` .md ` , configure custom
326+ [ ` extension ` ] ( settings.md#extension ) mappings. Ruff will automatically include
327+ these mapped extensions in file discovery:
328+
329+ === "pyproject.toml"
330+
331+ ```toml
332+ [tool.ruff]
333+ # Treat `.mdx` and `.qmd` files as Markdown
334+ extension = { mdx = "markdown", qmd = "markdown" }
335+ ```
336+
337+ === "ruff.toml"
338+
339+ ```toml
340+ # Treat `.mdx` and `.qmd` files as Markdown
341+ extension = {mdx="markdown", qmd="markdown"}
342+ ```
343+
325344If you run Ruff via [ ` ruff-pre-commit ` ] ( https://github.com/astral-sh/ruff-pre-commit ) , Markdown
326345support needs to be explicitly included by adding it to ` types_or ` :
327346
You can’t perform that action at this time.
0 commit comments