Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/tasks/lossless-envelope-placeholders-read-as-html.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
```fig
title = The lossless envelope's placeholders read as HTML on docs.rs
part_of = [Tasks](/docs/tasks/tasks.md)
status = open
status = done
created = 2026-11-07
updated = 2026-11-07
updated = 2026-11-10
description = fig_core::lossless's module docs write the envelope schema as a two-space-indented paragraph, so rustdoc passes <type>, <extkind> and <text> to the browser as HTML tags: docs.rs shows the schema with its placeholders missing, and cargo doc warns three times
```

# The lossless envelope's placeholders read as HTML on docs.rs

**Status.** Done, in `docs(core): fence the lossless envelope schema in a code
block`. The two schema lines are a fenced `text` block, so rustdoc escapes
`<type>`, `<extkind>` and `<text>`, and `RUSTDOCFLAGS='-D warnings' cargo doc
-p fig-core --no-deps` passes. The docs.rs page shows them from the next
release.

**Where.** `rust/fig-core/src/lossless.rs`, lines 34–39 of the module doc.

The module doc shows the envelope a lossless value travels in:
Expand Down
8 changes: 6 additions & 2 deletions rust/fig-core/src/lossless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@
//! pure node-kind transforms.
//!
//! Envelope schema, as it appears once parsed back into an AST:
//! { "$fig": { "t": "<type>" } } // a null
//! { "$fig": { "t": "<extkind>", "v": "<text>" } } // an extended scalar
//!
//! ```text
//! { "$fig": { "t": "<type>" } } // a null
//! { "$fig": { "t": "<extkind>", "v": "<text>" } } // an extended scalar
//! ```
//!
//! where `<type>` is `"null"` and `<extkind>` is the `ExtKind` field name
//! (`offset_datetime`, `enum_literal`, …). `v` carries the scalar's intrinsic
//! text verbatim (for a char literal, its decimal codepoint, as fig stores it).
Expand Down
Loading