From 320c019db7fce4bf83eabd7e20b90533fb1494a3 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 23 Apr 2022 14:42:25 -0700 Subject: [PATCH] Format demo code in reference Some of the library reference pages provide code demonstrating usage. In some places, this code had a very odd formatting where the first indent was three spaces, followed by the standard two space indent for the rest. This made the structure of the code difficult to follow and also results in an unexpected diff when the user runs the formatter on the code in Arduino IDE or Web Editor. It also makes it unfriendly to contributors. All code in the reference is hereby formatted to be compliant with the Arduino IDE 2.x auto formatter (which uses a configuration equivalent that of the formatters in Arduino IDE 1.x and Arduino Web Editor). --- docs/api.md | 96 ++++++++++++++++++++++++++--------------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/api.md b/docs/api.md index e4a4eee..cd81b3a 100644 --- a/docs/api.md +++ b/docs/api.md @@ -669,29 +669,29 @@ void loop() { } void printDirectory(File dir, int numTabs) { - while(true) { - - File entry = dir.openNextFile(); - if (! entry) { - // No more files - // Serial.println("**nomorefiles**"); - break; - } - - for (uint8_t i=0; i