mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-04 23:50:57 +00:00
Avoid removing newlines between docstring headers and rST blocks (#11609)
Given: ```python def func(): """ Example: .. code-block:: python import foo """ ``` Removing the newline after the `Example:` header breaks Sphinx rendering. See: https://github.com/astral-sh/ruff/issues/11577
This commit is contained in:
parent
b0a751012e
commit
3aa7e35a4c
4 changed files with 254 additions and 26 deletions
|
@ -46,6 +46,7 @@ mod tests {
|
|||
#[test_case(Rule::BlankLineBeforeClass, Path::new("D.py"))]
|
||||
#[test_case(Rule::NoBlankLineBeforeFunction, Path::new("D.py"))]
|
||||
#[test_case(Rule::BlankLinesBetweenHeaderAndContent, Path::new("sections.py"))]
|
||||
#[test_case(Rule::BlankLinesBetweenHeaderAndContent, Path::new("sphinx.py"))]
|
||||
#[test_case(Rule::OverIndentation, Path::new("D.py"))]
|
||||
#[test_case(Rule::OverIndentation, Path::new("D208.py"))]
|
||||
#[test_case(Rule::NoSignature, Path::new("D.py"))]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue