fixed raw decode warning + updated doc

This commit is contained in:
2025-02-23 14:12:50 +01:00
parent 37dce1f7c9
commit c0a42aa8a6
13 changed files with 88 additions and 78 deletions

View File

@ -2,15 +2,18 @@
/// This function returns a dictionary of structures
///
/// Supported formats: #schema.valid-extensions.map(e => raw("." + e)).join(", ")
/// - path-or-schema (str, raw, dictionary): If it is a string, defines the path to load. \
/// If it is a raw block, its content is directly parsed (the block's language will define the format to use) \
/// If it is a dictionary, it directly defines the schema structure
/// - path-or-schema (str, raw, dictionary):
/// #list(
/// [If it is a string, defines the path to load.\ #emoji.warning Warning: this will only work if this package is part of your project, as packages installed in the `@local` or `@preview` namespace cannot access project files],
/// [If it is a raw block, its content is directly parsed (the block's language will define the format to use)],
/// [If it is a dictionary, it directly defines the schema structure]
/// )
/// -> dictionary
#let load(path-or-schema) = {}
/// Renders the given schema
/// This functions
/// - schema (dictionary): A schema dictionary, as returned by #doc-ref("schema.load")
/// - schema (dictionary): A schema dictionary, as returned by @@load()
/// - config (auto, dictionary): The configuration parameters, as returned by #doc-ref("config.config")
/// - width (ratio, length): The width of the generated figure
#let render(schema, config: auto, width: 100%) = {}