From 51f1367d57e07f6dd68b400771b354b501e1844f Mon Sep 17 00:00:00 2001 From: Wulu Date: Fri, 20 Jun 2025 17:22:01 +0800 Subject: [PATCH] fix(docs): correct code block indentation in core_compatibility.rst (#11471) * fix(docs): correct code block indentation in core compatibility guide * fix(docs): remove extra colon causing rendering error in core_compatibility.rst --- docs/en/guides/core_compatibility.rst | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/en/guides/core_compatibility.rst b/docs/en/guides/core_compatibility.rst index cb530ac5e..8b6a8e79d 100644 --- a/docs/en/guides/core_compatibility.rst +++ b/docs/en/guides/core_compatibility.rst @@ -9,28 +9,28 @@ Welcome to the compatibility guide for library developers aiming to support mult 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:: +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: - .. code-block:: cpp +.. 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 + #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 Version Print ------------- -To easily print the ESP32 Arduino core version at runtime, developers can use the `ESP_ARDUINO_VERSION_STR` macro. Below is an example of how to print the ESP32 Arduino core version:: +To easily print the ESP32 Arduino core version at runtime, developers can use the `ESP_ARDUINO_VERSION_STR` macro. Below is an example of how to print the ESP32 Arduino core version: - .. code-block:: cpp +.. code-block:: cpp - Serial.printf(" ESP32 Arduino core version: %s\n", ESP_ARDUINO_VERSION_STR); + Serial.printf(" ESP32 Arduino core version: %s\n", ESP_ARDUINO_VERSION_STR); API Differences ---------------