-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Context
A content field was added to the Compat struct early on (2024-05-19), allowing browser_compat sections to contain content. However, prose content before a compat marker is intentionally split into a separate section to match Yari's behavior.
The original TODO noted this with "?!" — suggesting it was an observation about Yari's quirky behavior rather than a clear feature request.
Current behavior
In crates/rari-doc/src/html/sections.rs, when prose exists before a compat section, rari splits them into separate sections. A comment in the code says:
We have already something in body. Yari does something weird so we do that too: We push compat section and put prose after that 🤷.
Question
Should this behavior be preserved as-is (matching Yari), documented, or changed?
References
crates/rari-doc/src/html/sections.rs(section splitting logic)crates/rari-doc/src/pages/json.rs(Compat struct withcontentfield)crates/rari-doc/src/pages/build.rs(content serialization)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels