Skip to content

Commit 1768cac

Browse files
committed
fix(docs): correct code block indentation in core compatibility guide
1 parent 422e526 commit 1768cac

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/en/guides/core_compatibility.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ Code Adaptations
1111

1212
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
15-
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
14+
.. code-block:: cpp
15+
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

2929
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)