marianoguerra/html/error does not have a README file

    HtmlError

    pub(all) suberror HtmlError {
    HtmlError(Diagnostic)
    }

    A markup source was rejected.

    One error type for the whole module, raised only in strict mode. The tolerant path never raises: it puts a Bogus in the tree and a Diagnostic in the list, which is what lets a caller parse a real page and still get a document.

    HtmlError::diagnostic

    fn HtmlError::diagnostic(self : HtmlError) -> Diagnostic

    Diagnostic

    A problem, with the span it was found at.

    Diagnostic::is_error

    fn Diagnostic::is_error(self : Diagnostic) -> Bool

    Whether this diagnostic is severe enough to fail a strict parse.

    Diagnostic::of_kind

    A diagnostic whose severity follows from its kind.

    More of these are warnings than on the CSS side, and that is the shape of the problem rather than laxity: a stray </div> is what a large fraction of the real web looks like, and a library that called it an error would be a library nobody could point at a real page.

    Diagnostic::raise_

    fn[T] Diagnostic::raise_(self : Diagnostic) -> T raise HtmlError

    Diagnostic::to_report

    Turn a diagnostic into a renderable report.

    This is the only function in the module that mentions error-report.

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io