diff options
Diffstat (limited to 'codegen/dwp.zig')
| -rw-r--r-- | codegen/dwp.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/codegen/dwp.zig b/codegen/dwp.zig index 8189ad8..75ac68e 100644 --- a/codegen/dwp.zig +++ b/codegen/dwp.zig | |||
| @@ -34,7 +34,8 @@ pub fn main() anyerror!void { | |||
| 34 | // Process DerivedEastAsianWidth.txt | 34 | // Process DerivedEastAsianWidth.txt |
| 35 | var deaw_reader = std.io.Reader.fixed(@embedFile("DerivedEastAsianWidth.txt")); | 35 | var deaw_reader = std.io.Reader.fixed(@embedFile("DerivedEastAsianWidth.txt")); |
| 36 | 36 | ||
| 37 | while (deaw_reader.takeDelimiterExclusive('\n')) |line| { | 37 | while (deaw_reader.takeDelimiterInclusive('\n')) |took| { |
| 38 | const line = std.mem.trimRight(u8, took, "\n"); | ||
| 38 | if (line.len == 0) continue; | 39 | if (line.len == 0) continue; |
| 39 | 40 | ||
| 40 | // @missing ranges | 41 | // @missing ranges |
| @@ -92,7 +93,8 @@ pub fn main() anyerror!void { | |||
| 92 | // Process DerivedGeneralCategory.txt | 93 | // Process DerivedGeneralCategory.txt |
| 93 | var dgc_reader = std.io.Reader.fixed(@embedFile("DerivedGeneralCategory.txt")); | 94 | var dgc_reader = std.io.Reader.fixed(@embedFile("DerivedGeneralCategory.txt")); |
| 94 | 95 | ||
| 95 | while (dgc_reader.takeDelimiterExclusive('\n')) |line| { | 96 | while (dgc_reader.takeDelimiterInclusive('\n')) |took| { |
| 97 | const line = std.mem.trimRight(u8, took, "\n"); | ||
| 96 | if (line.len == 0 or line[0] == '#') continue; | 98 | if (line.len == 0 or line[0] == '#') continue; |
| 97 | const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; | 99 | const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; |
| 98 | 100 | ||