mirror of https://github.com/astral-sh/ruff
## 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. |
||
|---|---|---|
| .. | ||
| benchmarks | ||
| release | ||
| Dockerfile.ecosystem | ||
| _mdformat_utils.py | ||
| _utils.py | ||
| add_plugin.py | ||
| add_rule.py | ||
| check_docs_formatted.py | ||
| check_ecosystem.py | ||
| ecosystem_all_check.py | ||
| ecosystem_all_check.sh | ||
| ecosystem_all_check_entrypoint.sh | ||
| formatter_ecosystem_checks.sh | ||
| generate_known_standard_library.py | ||
| generate_mkdocs.py | ||
| pyproject.toml | ||
| transform_readme.py | ||
| update_ambiguous_characters.py | ||
| update_schemastore.py | ||