diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d
index 9db9259..12bd8fe 100644
--- a/src/dfmt/formatter.d
+++ b/src/dfmt/formatter.d
@@ -11,7 +11,6 @@ import dparse.parser;
 import dparse.rollback_allocator;
 import dfmt.ast_info;
 import dfmt.config;
-import dfmt.editorconfig : OptionalBoolean;
 import dfmt.indentation;
 import dfmt.tokens;
 import dfmt.wrapping;
@@ -480,8 +479,7 @@ private:
         immutable j = justAddedExtraNewline;
         if (currIsSlashSlash)
         {
-            if (config.dfmt_keep_line_breaks != OptionalBoolean.t)
-                newline();
+            newline();
             justAddedExtraNewline = j;
         }
         else if (hasCurrent)
@@ -588,6 +586,8 @@ private:
     }
     do
     {
+        import dfmt.editorconfig : OptionalBoolean;
+
         immutable p = current.type;
         regenLineBreakHintsIfNecessary(index);
         writeToken();
@@ -765,6 +765,7 @@ private:
         }
         else if (hasCurrent && (currentIs(tok!"@")
                 || isBasicType(tokens[index].type)
+                || currentIs(tok!"invariant")
                 || currentIs(tok!"extern")
                 || currentIs(tok!"identifier"))
                 && !currentIsIndentedTemplateConstraint())
diff --git a/tests/allman/issue0490.d.ref b/tests/allman/issue0490.d.ref
deleted file mode 100644
index 0a25298..0000000
--- a/tests/allman/issue0490.d.ref
+++ /dev/null
@@ -1,6 +0,0 @@
-void foo()
-{
-    afdsafds
-        .asdf // blah
-        .flub;
-}
diff --git a/tests/allman/issue0508.d.ref b/tests/allman/issue0508.d.ref
new file mode 100644
index 0000000..af4c328
--- /dev/null
+++ b/tests/allman/issue0508.d.ref
@@ -0,0 +1,7 @@
+struct S
+{
+    @safe invariant
+    {
+        assert(true);
+    }
+}
diff --git a/tests/issue0490.args b/tests/issue0490.args
deleted file mode 100644
index 7e7e52d..0000000
--- a/tests/issue0490.args
+++ /dev/null
@@ -1 +0,0 @@
---keep_line_breaks=true
diff --git a/tests/issue0490.d b/tests/issue0490.d
deleted file mode 100644
index 0a25298..0000000
--- a/tests/issue0490.d
+++ /dev/null
@@ -1,6 +0,0 @@
-void foo()
-{
-    afdsafds
-        .asdf // blah
-        .flub;
-}
diff --git a/tests/issue0508.d b/tests/issue0508.d
new file mode 100644
index 0000000..d6f1f3d
--- /dev/null
+++ b/tests/issue0508.d
@@ -0,0 +1 @@
+struct S {@safe invariant { assert(true); }}
diff --git a/tests/otbs/issue0490.d.ref b/tests/otbs/issue0490.d.ref
deleted file mode 100644
index 7332368..0000000
--- a/tests/otbs/issue0490.d.ref
+++ /dev/null
@@ -1,5 +0,0 @@
-void foo() {
-    afdsafds
-        .asdf // blah
-        .flub;
-}
diff --git a/tests/otbs/issue0508.d.ref b/tests/otbs/issue0508.d.ref
new file mode 100644
index 0000000..acd5850
--- /dev/null
+++ b/tests/otbs/issue0508.d.ref
@@ -0,0 +1,5 @@
+struct S {
+    @safe invariant {
+        assert(true);
+    }
+}