Skip to content

Report Typst's warnings from render #8

Description

@luiswirth

Renderer::render returns only the HTML, and drops the warnings Typst reports
alongside it.
A warning about a fragment belongs in the rustdoc build's output, where the rest
of that crate's diagnostics go.

Two of them are not about the fragment and have to be dropped rather than
reported.
HTML export warns once per compilation that it is under development, and it does
so for every fragment.
The equivalent holds for anything else the compiler says about the document
typstdoc wraps a fragment in rather than about the fragment itself.

A warning also carries a span into the wrapped source, which is not where the
author wrote it.
Mapping one back to an offset in the doc comment needs the wrapping and the
scanning to be undone together, so this waits on #2.

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