aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/paragraph.zig5
-rw-r--r--src/testing.zig2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/paragraph.zig b/src/paragraph.zig
index ce2d123..5b13cf2 100644
--- a/src/paragraph.zig
+++ b/src/paragraph.zig
@@ -41,6 +41,7 @@ pub fn parseLine(alloc: Allocator, l: *Lexer) Error!Element {
}
fn doTestMath(parent: Allocator, t: []const u8, v: []const u8) !void {
+ if (@import("config").short) return;
var arena = std.heap.ArenaAllocator.init(parent);
defer arena.deinit();
var alloc = arena.allocator();
@@ -54,10 +55,10 @@ fn doTestMath(parent: Allocator, t: []const u8, v: []const u8) !void {
var v_iter = std.mem.splitSequence(u8, v, " ");
while (g_iter.next()) |g_it| {
const v_it = v_iter.next() orelse break :brk false;
- if ((std.mem.startsWith(u8, g_it, "xlink:href=") and std.mem.startsWith(u8, g_it, "xlink:href")) or
+ if ((std.mem.startsWith(u8, g_it, "xlink:href=") and std.mem.startsWith(u8, g_it, "xlink:href")) or
(std.mem.startsWith(u8, g_it, "id=") and std.mem.startsWith(u8, v_it, "id="))) continue;
if (!std.mem.eql(u8, g_it, v_it)) {
- std.debug.print("not the same: {s} vs {s}", .{g_it, v_it});
+ std.debug.print("not the same: {s} vs {s}", .{ g_it, v_it });
break :brk false;
}
}
diff --git a/src/testing.zig b/src/testing.zig
index 4ed071f..21fb4fd 100644
--- a/src/testing.zig
+++ b/src/testing.zig
@@ -14,7 +14,7 @@ pub fn do(comptime parse: fn (Allocator, *Lexer) parser.Error!Element, parent: A
const g = try p.renderHTML(alloc);
defer alloc.free(g);
std.testing.expect(std.mem.eql(u8, g, v)) catch |err| {
- std.debug.print("got: {s}\nwanted: {s}\n", .{g, v});
+ std.debug.print("got: {s}\nwanted: {s}\n", .{ g, v });
return err;
};
}