summaryrefslogtreecommitdiff
path: root/codegen/fold.zig
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/fold.zig')
-rw-r--r--codegen/fold.zig6
1 files changed, 4 insertions, 2 deletions
diff --git a/codegen/fold.zig b/codegen/fold.zig
index d927795..366ed79 100644
--- a/codegen/fold.zig
+++ b/codegen/fold.zig
@@ -13,7 +13,8 @@ pub fn main() anyerror!void {
13 var props_map = std.AutoHashMap(u21, void).init(allocator); 13 var props_map = std.AutoHashMap(u21, void).init(allocator);
14 defer props_map.deinit(); 14 defer props_map.deinit();
15 15
16 props_lines: while (props_reader.takeDelimiterExclusive('\n')) |line| { 16 props_lines: while (props_reader.takeDelimiterInclusive('\n')) |took| {
17 const line = std.mem.trimRight(u8, took, "\n");
17 if (line.len == 0 or line[0] == '#') continue; 18 if (line.len == 0 or line[0] == '#') continue;
18 19
19 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line; 20 const no_comment = if (std.mem.indexOfScalar(u8, line, '#')) |octo| line[0..octo] else line;
@@ -56,7 +57,8 @@ pub fn main() anyerror!void {
56 // Process CaseFolding.txt 57 // Process CaseFolding.txt
57 58
58 var cp_reader = std.io.Reader.fixed(@embedFile("CaseFolding.txt")); 59 var cp_reader = std.io.Reader.fixed(@embedFile("CaseFolding.txt"));
59 while (cp_reader.takeDelimiterExclusive('\n')) |line| { 60 while (cp_reader.takeDelimiterInclusive('\n')) |took| {
61 const line = std.mem.trimRight(u8, took, "\n");
60 if (line.len == 0 or line[0] == '#') continue; 62 if (line.len == 0 or line[0] == '#') continue;
61 63
62 var field_it = std.mem.splitScalar(u8, line, ';'); 64 var field_it = std.mem.splitScalar(u8, line, ';');