Stop dumbindent collapsing consecutive blank lines

This commit is contained in:
Nigel Tao committed 2020-06-10 12:22:41 +10:00
1 parent ed48514f30
commit 58c0862c50
4 files changed
+39 -20

No files matched your search

+2 -2
View File
@@ -44,9 +44,9 @@ func TestFormatBytes(tt *testing.T) {
src: "int x = // comm.\ny;\n",
want: "int x = // comm.\n y;\n",
}, {
// Most blank lines should be dropped.
// Consecutive blank lines.
src: "f {\n\n\ng;\n\n\nh;\n\n\n}\n\n",
want: "f {\n g;\n\n h;\n}\n",
want: "f {\n g;\n\n\n h;\n}\n",
}, {
// Single-quote string.
src: "a = '{'\nb = {\nc = 0\n",