forked from rust-lang/rustfmt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly align comments in unicode lines
For an end user, the number of characters in a string is most likely interpreted as the number of [grapheme cluster](http://www.unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries)s in the string, which may be different than either the number of unicode codepoints or bytes. Use the number of graphemes to determine list comment alignment rather than the byte length of the line. Closes rust-lang#4151
- Loading branch information
Showing
2 changed files
with
18 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fn main() { | ||
let mappings = [ | ||
("gamma", 'ɡ'), // comment 1 | ||
("sqrt", '√'), // comment 2 | ||
("a", 'a'), // comment 3 | ||
("eye", 'ಠ'), // comment 4 | ||
]; | ||
} |