reference-en icon indicating copy to clipboard operation
reference-en copied to clipboard

Incorrect indentation in rendered code examples

Open edgar-bonet opened this issue 1 year ago • 0 comments

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.

edgar-bonet avatar Oct 15 '24 10:10 edgar-bonet