Skip to content

Commit

Permalink
fix #182
Browse files Browse the repository at this point in the history
  • Loading branch information
Jintin committed May 13, 2018
1 parent 3ea4367 commit a6544a2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Parser/SwiftParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ class SwiftParser {
indent.inSwitch = true
isNextSwitch = false
}
retString = retString.trim()
if !retString.last.isUpperBlock() {
retString.keepSpace()
}
Expand Down
5 changes: 5 additions & 0 deletions SwimatTests/tests/n-curly-new-line/after.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// #182
if condition
{
expression()
}
5 changes: 5 additions & 0 deletions SwimatTests/tests/n-curly-new-line/before.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// #182
if condition
{
expression()
}
4 changes: 4 additions & 0 deletions SwimatTests/tests/n-curly-new-line/preferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"areParametersAligned": false,
"areSemicolonsRemoved": false
}

0 comments on commit a6544a2

Please sign in to comment.