Sublime Forum

Reindent bug

#1

First noticed this while working in PHP, but here’s the same reindent bug in C. Note the mis-aligned second-to-last brace; it doesn’t look so bad on it’s own but if declared inside a class it derails the rest of the file’s indentation.

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    if ("test" == "test" ||
        "another" == "other") {
        printf("Test passed.\n");
}
}
0 Likes