Skip to content

stripHtmlTags silently swallows allocation errors #12

Description

@calin-marian

Problem

stripHtmlTags in formatter.zig uses catch {} on result.append(allocator, ...) calls, silently discarding allocation failures. Since the function returns ![]u8 (can propagate errors), these should use try instead. Silent failures can produce truncated or corrupted output without any indication.

Fix

Changed all catch {} on append calls in stripHtmlTags to try, so allocation errors propagate to the caller.

References

Fixed in PR #7 (commit 1e12dd1). Also affects PRs #8 and #9 via rebase.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions