arduino / reference-en

Editable source for the Arduino Reference
https://www.arduino.cc/reference/en/
Other
165 stars 732 forks source link

Incorrect indentation in rendered code examples #994

Open edgar-bonet opened 1 month ago

edgar-bonet commented 1 month ago

On the rendered documentation, all the code examples have an extra indentation of four spaces, in all the lines but the first one. This spurious indentation is only present in the rendered version.

For example, the example code for digitalRead(), in source form, starts with:

int ledPin = 13;  // LED connected to digital pin 13
int inPin = 7;    // pushbutton connected to digital pin 7
int val = 0;      // variable to store the read value

whereas the rendered version starts with:

int ledPin = 13;  // LED connected to digital pin 13
    int inPin = 7;    // pushbutton connected to digital pin 7
    int val = 0;      // variable to store the read value

This makes the indentation inconsistent, the code harder to read, and increases the risk of the code HTML element overflowing to the right in small browser windows.