From 5aedb2b84b108af3b85b3ba05416444f09f81ba9 Mon Sep 17 00:00:00 2001
From: Hackerpilot <briancschott@gmail.com>
Date: Fri, 2 Feb 2018 00:52:30 -0800
Subject: [PATCH] Fix #321

---
 src/dfmt/formatter.d         | 2 +-
 tests/allman/issue0321.d.ref | 7 +++++++
 tests/issue0321.d            | 6 ++++++
 tests/otbs/issue0321.d.ref   | 6 ++++++
 4 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 tests/allman/issue0321.d.ref
 create mode 100644 tests/issue0321.d
 create mode 100644 tests/otbs/issue0321.d.ref

diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d
index 760b4f7..08cfb07 100644
--- a/src/dfmt/formatter.d
+++ b/src/dfmt/formatter.d
@@ -313,7 +313,7 @@ private:
                 write(" ");
             }
         }
-        else if (currentIs(tok!"scriptLine"))
+        else if (currentIs(tok!"scriptLine") || currentIs(tok!"specialTokenSequence"))
         {
             writeToken();
             newline();
diff --git a/tests/allman/issue0321.d.ref b/tests/allman/issue0321.d.ref
new file mode 100644
index 0000000..7f891fd
--- /dev/null
+++ b/tests/allman/issue0321.d.ref
@@ -0,0 +1,7 @@
+void test()
+{
+    #line 100
+    int a;
+    #line 200 "anotherfile"
+    int b;
+}
diff --git a/tests/issue0321.d b/tests/issue0321.d
new file mode 100644
index 0000000..51798b6
--- /dev/null
+++ b/tests/issue0321.d
@@ -0,0 +1,6 @@
+void test(){
+  #line 100
+  int a;
+  #line 200 "anotherfile"
+  int b;
+}
diff --git a/tests/otbs/issue0321.d.ref b/tests/otbs/issue0321.d.ref
new file mode 100644
index 0000000..cfb8292
--- /dev/null
+++ b/tests/otbs/issue0321.d.ref
@@ -0,0 +1,6 @@
+void test() {
+    #line 100
+    int a;
+    #line 200 "anotherfile"
+    int b;
+}