fix inconsistent use of tabs and spaces in indentation

Mon, 03 Feb 2025 23:17:05 +0100

author
Mike Becker <universe@uap-core.de>
date
Mon, 03 Feb 2025 23:17:05 +0100
changeset 22
a9230f197e61
parent 21
bc8b76ca9ee9
child 23
b4979c194dc8

fix inconsistent use of tabs and spaces in indentation

src/html.cpp file | annotate | diff | comparison | revisions
--- a/src/html.cpp	Mon Feb 03 23:14:11 2025 +0100
+++ b/src/html.cpp	Mon Feb 03 23:17:05 2025 +0100
@@ -32,10 +32,10 @@
     static constexpr const char* weekdays[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};
 
     static unsigned indentation;
-    static const char *tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
+    static const char *tabs = "                                ";
     static void indent(int change = 0) {
         indentation += change;
-        fwrite(tabs, 1, indentation, stdout);
+        fwrite(tabs, 4, indentation, stdout);
     }
 
     static std::string encode(const std::string &data) {
@@ -129,7 +129,7 @@
     if (fragment) {
         puts("</div>");
     } else {
-        puts("\t\t</div>\n\t</body>\n</html>");
+        puts("        </div>\n    </body>\n</html>");
     }
 }
 

mercurial