Skip to main content

Crate quillmark_core

Crate quillmark_core 

Source
Expand description

§Quillmark Core

Foundational types for the Quillmark document framework: the document::Document model and its ~~~ card-yaml blocks, the quill::Quill document format, the backend::Backend seam output backends implement, and structured diagnostics carrying source locations.

The markdown grammar is specified in markdown-spec.md.

use quillmark_core::document::Document;

let markdown = "~~~\n$quill: my_quill\n$kind: main\ntitle: Example\n~~~\n\n# Content";
let doc = Document::parse(markdown).unwrap().document;
let title = doc.main()
    .payload()
    .get("title")
    .and_then(|v| v.as_str())
    .unwrap_or("Untitled");
assert_eq!(title, "Example");

Modules§

backend
Backend trait for output backends.
document
Parsing and typed in-memory model for Quillmark card-yaml documents.
error
Error types and diagnostics for parsing and rendering.
normalize
Post-parse normalization of a Document: payload field names to Unicode NFC, so composed "café" and decomposed "cafe\u{0301}" compare equal. Field values pass through verbatim, and bodies are already normalized at import.
path
Canonical document-model paths.
quill
The Quill type: portable, validated quill data.
reader
Schema-bound typed reader: the read twin of TypedWriter.
region
Schema-field geometry, queried from a compiled LiveSession via regions and field_at.
session
types
value
Value type for unified representation of YAML/JSON values.
version
Quill versions (MAJOR.MINOR.PATCH) and the $quill references that select them.
writer
Schema-bound typed writer: the front door for typed field writes.

Structs§

Content
The content model: the value every body and content field holds, and what every content read answers and every content write takes. One content field.