-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Qute - remove standalone lines by default #10305
Conversation
mkouba
commented
Jun 26, 2020
- resolves Qute: remove whitespace around type declarations #8753
2 fast 2 furious @mkouba 😂 🍻 that's awesome... I'll have a look on monday if you don't mind? |
Ah, I forgot that |
I have an error, I am rebuilding everything to make sure it's not due to my env.. |
@ia3andy no problem. Let me know if you hit a problem... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except docs which can be confusing to people like me.
public void testRemoveStandaloneLines() { | ||
Engine engine = Engine.builder().addDefaults().removeStandaloneLines(true).build(); | ||
String content = "{@java.lang.String foo}\n" // -> standalone | ||
+ "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this appears to validate that the description:
A standalone line is a line that contains only section tags (e.g.
{#each}
and{/each}
), parameter declarations (e.g.{@org.acme.Foo foo}
) and whitespace characters.
has a confusing and
. I initially thought this applied to empty lines as well, but this test says it does not.
Perhaps the following is less confusing for people like me?
A standalone line is a line that contains at least one of: section tags (e.g.
{#each}
and{/each}
) or parameter declarations (e.g.{@org.acme.Foo foo}
), ignoring any whitespace characters on the same line.
It's not perfect yet, though so if you find better, I'll take it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, as I read it it's confusing... let's fix it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool !!
The only thing to fix would be with the include inner blocks (which still generate new lines) as we discussed on zulip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, clearer, thanks!
@mkouba all good no more line with the include inner block 🍻 |
@mkouba ready to merge :) |