Skip to content

Commit

Permalink
fix carriage return line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed May 10, 2023
1 parent 83d9059 commit 2274ebd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/sdlfmt.d
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ string format(SdlFmtConfig config, scope const(char)[] sdl, string filename = ""
multiLineIndent = 0;
break;
case TokenType.blockClose:
if (ret.data.length && !(ret.data[$ - 1] == '\n' || ret.data[$ - 1] == 'r'))
if (ret.data.length && !(ret.data[$ - 1] == '\n' || ret.data[$ - 1] == '\r'))
ret ~= config.lineEnding;
indent--;
multiLineIndent = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/results/cr/many_things.sdl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
name "vibe-d"description "Event driven web and concurrency framework"homepage "https://vibed.org/"license "MIT"copyright "Copyright © 2012-2020 Sönke Ludwig"authors "Sönke Ludwig" "Mathias 'Geod24' Lang" "Etienne Cimon" "Martin Nowak" \ "Mihails 'Dicebot' Strasuns" "150 contributors total"systemDependencies "Optionally OpenSSL 1.1.x"dependency ":redis" version="*"dependency ":data" version="*"dependency ":inet" version="*"targetType "library"targetName "vibed"// NOTE: "lib" is a path with no D sources to work around an issue in DUB 1.0.0// and below that results in the standard "source/" path to be added even// if an explicit "sourcePaths" directive is given.sourcePaths "lib"sourceFiles "source/vibe/d.d" "source/vibe/vibe.d"x:ddoxFilterArgs "--unittest-examples" "--min-protection=Protected" \ "--ex" "vibe.core.drivers." "--ex" "vibe.internal." "--ex" "vibe.web.internal." \ "--ex" "diet.internal" "--ex" "stdx." "--ex" "eventcore.internal." "--ex" "eventcore.drivers." \ "--ex" "mir." "--ex" "openssl_version"configuration "unittest" { targetPath "bin" targetName "ut" dflags "-preview=dip1000" sourcePaths "source" "test/ut" importPaths "source" "test" stringImportPaths "test/testFiles" foo { bar { "" } } versions "unitUnthreaded" dependency "unit-threaded" version="*" dependency "unit-threaded:autorunner" version="*"}// cool beans/* foo */foo { // ok bar { // xd x { d } }}subPackage "utils"subPackage "data"subPackage "stream"
name "vibe-d"description "Event driven web and concurrency framework"homepage "https://vibed.org/"license "MIT"copyright "Copyright © 2012-2020 Sönke Ludwig"authors "Sönke Ludwig" "Mathias 'Geod24' Lang" "Etienne Cimon" "Martin Nowak" \ "Mihails 'Dicebot' Strasuns" "150 contributors total"systemDependencies "Optionally OpenSSL 1.1.x"dependency ":redis" version="*"dependency ":data" version="*"dependency ":inet" version="*"targetType "library"targetName "vibed"// NOTE: "lib" is a path with no D sources to work around an issue in DUB 1.0.0// and below that results in the standard "source/" path to be added even// if an explicit "sourcePaths" directive is given.sourcePaths "lib"sourceFiles "source/vibe/d.d" "source/vibe/vibe.d"x:ddoxFilterArgs "--unittest-examples" "--min-protection=Protected" \ "--ex" "vibe.core.drivers." "--ex" "vibe.internal." "--ex" "vibe.web.internal." \ "--ex" "diet.internal" "--ex" "stdx." "--ex" "eventcore.internal." "--ex" "eventcore.drivers." \ "--ex" "mir." "--ex" "openssl_version"configuration "unittest" { targetPath "bin" targetName "ut" dflags "-preview=dip1000" sourcePaths "source" "test/ut" importPaths "source" "test" stringImportPaths "test/testFiles" foo { bar { "" } } versions "unitUnthreaded" dependency "unit-threaded" version="*" dependency "unit-threaded:autorunner" version="*"}// cool beans/* foo */foo { // ok bar { // xd x { d } }}subPackage "utils"subPackage "data"subPackage "stream"
Expand Down

0 comments on commit 2274ebd

Please sign in to comment.