Saw ? in state TagOpen
Author: nazar-pcCreated Jan 12, 2026Updated Aug 27, 2026
LabelsC-bug
Problem
When using https://github.com/danieleades/mdbook-d2, rendering results in a lot of warnings due to inline SVG like this:
WARN html parse error in `Execution_environment/Contracts_overview.md`: Saw ? in state TagOpen
Html text was:
<pre><?xml version="1.0" encoding="utf-8"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" d2Version="v0.6.8" preserveAspectRatio="xMinYMin meet" viewBox="0 0 1153 388"><svg id="d2-svg" class="d2-243733403" width="1153" height="388" viewBox="10 11 1153 388"><rect x="10.000000" y="11.000000" width="1153.000000" height="388.000000" rx="0.000000" class=" fill-N7" stroke-width="0" /><style type="text/css"><![CDATA[
...
Steps
- Install https://github.com/danieleades/mdbook-d2
- Clone https://github.com/nazar-pc/abundance/commits/0cc616fdcdc2e0275375ed9eae38686f660f1d72
cd website/bookmdbook serve- See a bunch of warnings
Possible Solution(s)
I think the HTML parser should be updated so support inline SVG
Notes
No response
Version
v0.5.2
Source: rust-lang/mdBook