Skip to content

[#1653, #1654] docs: fix code block formatting in router.rst#1666

Merged
JrooTJunior merged 2 commits intoaiogram:dev-3.xfrom
Vadim-Khristenko:docs-fix-1
Apr 5, 2025
Merged

[#1653, #1654] docs: fix code block formatting in router.rst#1666
JrooTJunior merged 2 commits intoaiogram:dev-3.xfrom
Vadim-Khristenko:docs-fix-1

Conversation

@Vadim-Khristenko
Copy link
Contributor

Description

This pull request fixes issue #1653, where code blocks in the documentation were broken due to incorrect indentation. The affected syntax was:

.. code-block:: python
    :caption: module_1.py
:name: module_1

The issue was caused by a missing indentation for the :name: directive, which broke Sphinx rendering. The fix was straightforward and involved properly aligning directive options under the .. code-block:: line.

Additionally, this PR supersedes #1654, which aimed to fix the same issue but has been inactive for over three weeks.

Fixes #1653
Closes #1654

Type of change

  • Documentation (typos, code examples or any documentation update)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Tested by cloning the repository and building the documentation locally using Sphinx. The affected code blocks now render correctly without any warnings or formatting issues.

Test Configuration:

  • Operating System: Ubuntu 24.04 LTS
  • Python version: 3.12.9

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@github-actions github-actions bot added the 3.x Issue or PR for stable 3.x version label Apr 4, 2025
@github-actions
Copy link

github-actions bot commented Apr 4, 2025

✔️ Changelog found.

Thank you for adding a description of the changes

@JrooTJunior JrooTJunior merged commit 25e9127 into aiogram:dev-3.x Apr 5, 2025
2 checks passed
@Vadim-Khristenko Vadim-Khristenko deleted the docs-fix-1 branch April 5, 2025 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3.x Issue or PR for stable 3.x version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: broken formatting

2 participants