Skip to content

Commit 51f1367

Browse files
authored
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
1 parent f788911 commit 51f1367

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/en/guides/core_compatibility.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,28 @@ Welcome to the compatibility guide for library developers aiming to support mult
99
Code Adaptations
1010
----------------
1111

12-
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::
12+
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:
1313

14-
.. code-block:: cpp
14+
.. code-block:: cpp
1515
16-
#ifdef ESP_ARDUINO_VERSION_MAJOR
17-
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
18-
// Code for version 3.x
19-
#else
20-
// Code for version 2.x
21-
#endif
22-
#else
23-
// Code for version 1.x
24-
#endif
16+
#ifdef ESP_ARDUINO_VERSION_MAJOR
17+
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
18+
// Code for version 3.x
19+
#else
20+
// Code for version 2.x
21+
#endif
22+
#else
23+
// Code for version 1.x
24+
#endif
2525
2626
Version Print
2727
-------------
2828

29-
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::
29+
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:
3030

31-
.. code-block:: cpp
31+
.. code-block:: cpp
3232
33-
Serial.printf(" ESP32 Arduino core version: %s\n", ESP_ARDUINO_VERSION_STR);
33+
Serial.printf(" ESP32 Arduino core version: %s\n", ESP_ARDUINO_VERSION_STR);
3434
3535
API Differences
3636
---------------

0 commit comments

Comments
 (0)