r9825 Discussion
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
3 posts
• Page 1 of 1
r9825 Discussion
by Braids » 20 Aug 2011, 18:42
@Dave, i think this pattern allows spaces in blank lines. should it not be the following instead?
from
<property name="format" value="[^\*]\s+$"/>
to
<property name="format" value="(^|[^\*])\s+$"/>
from
<property name="format" value="[^\*]\s+$"/>
to
<property name="format" value="(^|[^\*])\s+$"/>
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: r9825 Discussion
by jendave » 20 Aug 2011, 22:32
Good catch. Checked in patch r9833.Braids wrote:@Dave, i think this pattern allows spaces in blank lines. should it not be the following instead?
from
<property name="format" value="[^\*]\s+$"/>
to
<property name="format" value="(^|[^\*])\s+$"/>
Re: r9825 Discussion
by Braids » 20 Aug 2011, 23:08
edit: thank you.
i was just thinking, it still ignores spaces after any asterisk, not just one in javadoc. . . but then i realized. last time i used CheckStyle, it didn't like lines ending with operators like multiplication asterisk. so i don't think we need to change it.
yes, it definitely works:
oh, wow! your pattern only allows one space after an asterisk. i wonder why? oh, because in "whatever*{space}{space}", the first space matches the [^\*] in the pattern, and the second one matches the \s+. i like it this way. . . Eclipse only puts one space there, anyway.

i was just thinking, it still ignores spaces after any asterisk, not just one in javadoc. . . but then i realized. last time i used CheckStyle, it didn't like lines ending with operators like multiplication asterisk. so i don't think we need to change it.
yes, it definitely works:
- Code: Select all
int x = 2 *{space}
2;

oh, wow! your pattern only allows one space after an asterisk. i wonder why? oh, because in "whatever*{space}{space}", the first space matches the [^\*] in the pattern, and the second one matches the \s+. i like it this way. . . Eclipse only puts one space there, anyway.
- Code: Select all
1:/*
2: *{space}
3: *{space}{space}
4: */

"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 46 guests