From b69e966df6e494c024b4a75c0142e9070308c975 Mon Sep 17 00:00:00 2001 From: Stefan Koch Date: Tue, 28 Nov 2017 09:55:42 +0100 Subject: [PATCH] Fix issue #301 By adding private and static as valid import prefix --- src/dfmt/formatter.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 7003bfe..932955a 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -458,7 +458,10 @@ private: else if (currentIs(tok!"{") && config.dfmt_brace_style == BraceStyle.allman) break; else if (t == tok!"import" && !currentIs(tok!"import") - && !currentIs(tok!"}") && !(currentIs(tok!"public") + && !currentIs(tok!"}") + && !((currentIs(tok!"public") + || currentIs(tok!"private") + || currentIs(tok!"static")) && peekIs(tok!"import")) && !indents.topIsOneOf(tok!"if", tok!"debug", tok!"version")) {