ruff/docs
Auguste Lalande a5f41e8d63
Add a formatting step using `mdformat` as part of `generate_mkdocs.py` (#10484)
## Summary

The purpose of this change is mainly to address one of the issues
outlined in #10427. Namely, some lists in the docs were not rendering
properly when preceded by a text block without a newline character. This
PR adds `mdformat` as a final step to the rule documentation script, so
that any missing newlines will be added.

NB: The default behavior of `mdformat` is to escape markdown special
characters found in text such as `<`. This resulted in some misformatted
docs. To address this I implemented an ad-hoc mdformat plugin to
override the behavior. This may be considered a bit 'hacky', but I think
it's a good solution. Nevertheless, if someone has a better idea, let me
know.

## Test Plan

This change is hard to test systematically, however, I tried my best to
look at the before and after diffs to ensure no unwanted changes were
made to the docs.
2024-03-21 00:37:40 +00:00
..
.overrides/partials/integrations/analytics Move some MkDocs responsibilities around (#5542) 2023-07-05 22:06:01 +00:00
assets Update docs to match updated logo and color palette (#5283) 2023-06-22 11:19:34 -04:00
formatter Move deviations from formatter README to documentation (#10444) 2024-03-18 08:22:28 +00:00
stylesheets fix(docs): admonition in dark mode (#9502) 2024-01-13 07:43:13 -05:00
.gitignore Fix gitignore to not ignore files that are required (#7538) 2023-09-21 21:33:09 +02:00
configuration.md `ruff server` - A new built-in LSP for Ruff, written in Rust (#10158) 2024-03-08 20:57:23 -08:00
faq.md Fix broken documentation links affected by namespace changes in lint rules (#10182) 2024-03-01 12:35:29 +01:00
formatter.md `docs`: remove `.` from check and format commands (#10217) 2024-03-13 10:10:48 -05:00
installation.md `docs`: remove `.` from check and format commands (#10217) 2024-03-13 10:10:48 -05:00
integrations.md Bump version to 0.3.3 (#10425) 2024-03-15 12:51:49 -05:00
linter.md `docs`: remove `.` from check and format commands (#10217) 2024-03-13 10:10:48 -05:00
preview.md Spellcheck & grammar (#10375) 2024-03-13 02:34:23 +00:00
requirements-insiders.txt Add a formatting step using `mdformat` as part of `generate_mkdocs.py` (#10484) 2024-03-21 00:37:40 +00:00
requirements.txt Add a formatting step using `mdformat` as part of `generate_mkdocs.py` (#10484) 2024-03-21 00:37:40 +00:00
tutorial.md `docs`: remove `.` from check and format commands (#10217) 2024-03-13 10:10:48 -05:00
versioning.md Spellcheck & grammar (#10375) 2024-03-13 02:34:23 +00:00