-
-
Notifications
You must be signed in to change notification settings - Fork 744
Support %-( ... %) and add documentation. #573
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
Conversation
@@ -387,6 +387,26 @@ void main() { | |||
[4 5 6] | |||
[7 8 9]] | |||
</pre> | |||
|
|||
Inside compound format specifier, strings and characters are escaped | |||
automatically. If you want to stop it, add $(B '-') flag to |
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.
specifier -> specifiers and If you want to stop it, add -> To disable this behavior/avoid this/…, add the? But since I'm not a native speaker either…
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.
In the documentation of std.format, it seems to me that "a compound format specifier" equals to "a pair of two specifiers, %( and %)".
Then, in this case, specifier is better, IMO.
If you wan to stop it -> To avoid this behavior : This is good. Thanks.
add $(B '-') flag -> add the $(B '-') flag : This is difficult... I can't decide which is better...
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.
Then I guess it should rather say: »Inside a compound format specifier«… ;)
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.
You are right. Thanks!
Support %-( ... %) and add documentation.
Merged. |
Good. |
Yay. |
By the way, what's the state of the undocumented |
What? I'm not the only one who needs this functionality?! |
At the time I had added As I thought, today it is used in std.typecons.Tuple.toString. So, I think that changing |
I've stumbled over these issues when formatting mixin code. |
@dawgfoto, have you seen NG threads mentioned in pull description? Making |
Original threads:
http://forum.dlang.org/thread/jn3ibu$tp7$1@digitalmars.com
http://forum.dlang.org/thread/jo5ltv$18d3$1@digitalmars.com