Skip to content

fix(docs): correct code block indentation in core_compatibility.rst #11471

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eMUQI
Copy link

@eMUQI eMUQI commented Jun 15, 2025

By completing this PR sufficiently, you help us to review this Pull Request quicker and also help improve the quality of Release Notes

Checklist

  1. Please provide specific title of the PR describing the change, including the component name (eg. „Update of Documentation link on Readme.md“)
  2. Please provide related links (eg. Issue which will be closed by this Pull Request)
    https://docs.espressif.com/projects/arduino-esp32/en/latest/guides/core_compatibility.html
  3. Please update relevant Documentation if applicable
  4. Please check Contributing guide
  5. Please confirm option to "Allow edits and access to secrets by maintainers" when opening a Pull Request

This entire section above can be deleted if all items are checked.


Description of Change

This Pull Request fixes indentation issues in the core_compatibility.rst documentation file, specifically within .. code-block:: cpp sections. These formatting issues previously caused the code blocks to be rendered incorrectly in the generated documentation.

No functionality or logic is changed — this is a documentation-only fix.

@eMUQI eMUQI requested a review from pedrominatel as a code owner June 15, 2025 11:23
@CLAassistant
Copy link

CLAassistant commented Jun 15, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

github-actions bot commented Jun 15, 2025

Messages
📖 🎉 Good Job! All checks are passing!

👋 Hello eMUQI, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 789258d

@P-R-O-C-H-Y P-R-O-C-H-Y added Type: Documentation Issue pertains to Documentation of Arduino ESP32 Status: Review needed Issue or PR is awaiting review labels Jun 16, 2025
@pedrominatel
Copy link
Member

Hi @eMUQI, please check the issue:

en/generic: /home/runner/work/arduino-esp32/arduino-esp32/docs/en/guides/core_compatibility.rst:18: ERROR: Unexpected indentation.

@eMUQI
Copy link
Author

eMUQI commented Jun 16, 2025

Hi @eMUQI, please check the issue:

en/generic: /home/runner/work/arduino-esp32/arduino-esp32/docs/en/guides/core_compatibility.rst:18: ERROR: Unexpected indentation.

I just tested it locally and encountered the same issue:

Snipaste_2025-06-16_22-07-35

Honestly, I'm not sure how to resolve this error because I don't think there is one.

I copied the same code block below, sphinx didn't report an error and displayed it normally.

image

This confuses me. I'm unsure if it's an ESP Docs or a sphinx error. I'll test it in a pure sphinx environment when I have time.

@pedrominatel
Copy link
Member

Please try this:

.. code-block:: cpp

    #ifdef ESP_ARDUINO_VERSION_MAJOR
    #if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
        // Code for version 3.x
    #else
        // Code for version 2.x
    #endif
    #else
        // Code for version 1.x
    #endif

@@ -11,26 +11,26 @@ Code Adaptations

To ensure compatibility with both versions of the ESP32 Arduino core, developers should utilize conditional compilation directives in their code. Below is an example of how to conditionally include code based on the ESP32 Arduino core version::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, remove the :: from the ESP32 Arduino core version::.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! I tested it again — turns out the issue was caused by the extra colon (::). Removing just one : fixes the rendering, even with 3-space indentation. I'll update the PR accordingly.

@lucasssvaz lucasssvaz added Status: Pending Merge Pull Request is ready to be merged and removed Status: Review needed Issue or PR is awaiting review labels Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Pending Merge Pull Request is ready to be merged Type: Documentation Issue pertains to Documentation of Arduino ESP32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants