Skip to content

Sync with the upstream JSON formatΒ #15

@YDX-2147483647

Description

@YDX-2147483647

The docs.json format was changed in typst/typst#7011, which has just been merged.

  1. The fields details: Html and example: Option<Html> of FuncModel/ParamModel are combined into a new field details: Vec<DetailsBlock>.
  2. Example can have an optional title now.
/// A block-level segment in a function's or parameters documentation.
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
#[serde(tag = "kind", content = "content")]
pub enum DetailsBlock {
    /// A block of HTML.
    Html(Html),
    /// An example with an optional title.
    Example { body: Html, title: Option<EcoString> },
}

Update: https://github.com/typst-community/dev-builds/releases/tag/docs-v0.14.0-rc.1 is ready now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions