Skip to content

Commit 510ec9d

Browse files
committed
convert spaces to tabs
1 parent bbc4206 commit 510ec9d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/formatting/languages/python/formatter.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ void pyFormat(std::vector<std::string> &fileContents) {
6262
return;
6363
}
6464
}
65+
for (size_t i = 0; i < fileContents.size(); i++) {
66+
for (int j = spacesVec[i] / indentation; j > 0; j--) {
67+
fileContents[i].replace((indentation * j)-indentation, indentation, "\t");
68+
}
69+
}
6570
}
6671

6772
// replace spaces with tabs

0 commit comments

Comments
 (0)