Hey there!
I am doing this right now:
use typst::syntax::highlight_html;
use typst::syntax::parse;
let sn = parse(&code);
let html = highlight_html(&sn);
My problem: if the typst code contains errors, the html doesn't contain any errors.
My assumption, that's because ```rust
fn highlight_html_impl(html: &mut String, node: &LinkedNode) {
let mut span = false;
if let Some(tag) = highlight(node) {
if tag != Tag::Error {
span = true;
html.push_str("<span class="");
html.push_str(tag.css_class());
html.push_str("">");
}
}
...
Error explicitly doesn't return any html-tag.
So, how can I get the error like in `typst.app`?