Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

break in ternary operator that fits into a single line #526

Open
belka-ew opened this issue Nov 30, 2020 · 1 comment
Open

break in ternary operator that fits into a single line #526

belka-ew opened this issue Nov 30, 2020 · 1 comment
Labels

Comments

@belka-ew
Copy link
Collaborator

./dfmt --keep_line_breaks=true test.d | diff -u100rN test.d -

class C
 {
     void f(
     {
         if (true)
         {
             if (true)
             {
                 if (true)
                 {
                     return f(abcdefghijklmnopqrs.uv,
                             abcdefghijklmnopqrs.uvwxyz, abcdefghijklmnopqrs.uv, abcdefghijklmnopqrs.uvwxyzwx,
                             abcdefghijklmnopqrs.uvwxyz,
-                            abcdefghijklmnopqrs.uvwxyzabcde ? Yes.yes: No.yes,
+                            abcdefghijklmnopqrs.uvwxyzabcde ? Yes.yes
+                            : No.yes,
                             abcdefghijklmnopqrs.uvwxy ? Yes.nooo : No.nooo);
                 }
             }
         }
     }
 }
@MWumpusZ
Copy link

MWumpusZ commented Oct 10, 2022

--- src/prognosis/control/Manager.d
+++ dfmt src/prognosis/control/Manager.d
@@ -199,5 +199,6 @@
             VisitLink to = VisitLink(
-                linkScheduled.linkType == LinkType.continuation ? CONTINUE_TRAINID_BEGIN : TURN_BEGIN,
-                fetcher.get,
-                feeder.get.journeyId.trainId
+                linkScheduled.linkType == LinkType.continuation ? CONTINUE_TRAINID_BEGIN
+                    : TURN_BEGIN,
+                    fetcher.get,
+                    feeder.get.journeyId.trainId
             );

⚠️ Note the strange indenting of the lines after the questionable ?: line break.

(dfmt: 0.14.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants