diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2026-04-28 15:08:02 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2026-04-28 15:08:02 +0200 |
| commit | 3b1e6547d069d7c438af551a4989972802a895ee (patch) | |
| tree | 7c32e8fcac432539888e0cdb598f495316b0772d /src/link.zig | |
| parent | e154408e8ddeaee83242002f4c7af68b29d3a677 (diff) | |
perf(html): reduce memory usage
Diffstat (limited to 'src/link.zig')
| -rw-r--r-- | src/link.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/link.zig b/src/link.zig index 07cbf95..612ee8c 100644 --- a/src/link.zig +++ b/src/link.zig @@ -34,9 +34,9 @@ pub fn parse(alloc: Allocator, l: *Lexer) Error!Element { if (href.kind != .literal) return Error.InvalidLink; const finisher = l.next() orelse return Error.InvalidLink; if (!finisher.equals(.link, ")")) return Error.InvalidLink; - const in: Element = if (el.content.items.len > 0) + const in: Element = if (el.content.items.len > 0) el.element() - else + else (try Element.Literal.init(alloc, href.content)).element(); return (try Link.init(alloc, in, href.content)).element(); } |
