Skip to main content

Crate quillmark_core

Crate quillmark_core 

Source
Expand description

§Quillmark Core Overview

Core types and functionality for the Quillmark format-first Markdown rendering system.

§Features

This crate provides the foundational types and traits for Quillmark:

  • Parsing: YAML frontmatter extraction with Extended YAML Metadata Standard support
  • Format model: QuillSource type for managing format bundles with in-memory file system
  • Backend trait: Extensible interface for implementing output format backends
  • Error handling: Structured diagnostics with source location tracking
  • Utilities: TOML⇄YAML conversion helpers

§Quick Start

use quillmark_core::Document;

// Parse markdown with frontmatter
let markdown = "---\nQUILL: my_quill\ntitle: Example\n---\n\n# Content";
let doc = Document::from_markdown(markdown).unwrap();
let title = doc.main()
    .frontmatter()
    .get("title")
    .and_then(|v| v.as_str())
    .unwrap_or("Untitled");
assert_eq!(title, "Example");

§Architecture

The crate is organized into modules:

  • document: Markdown parsing with YAML frontmatter support
  • backend: Backend trait for output format implementations
  • error: Structured error handling and diagnostics
  • types: Core rendering types (OutputFormat, Artifact, RenderOptions)
  • quill: QuillSource bundle and related types

§Further Reading

Re-exports§

pub use document::Card;
pub use document::Document;
pub use document::EditError;
pub use document::Frontmatter;
pub use document::FrontmatterItem;
pub use document::ParseOutput;
pub use document::Sentinel;
pub use backend::Backend;
pub use error::Diagnostic;
pub use error::Location;
pub use error::ParseError;
pub use error::RenderError;
pub use error::RenderResult;
pub use error::Severity;
pub use types::Artifact;
pub use types::OutputFormat;
pub use types::RenderOptions;
pub use session::RenderSession;
pub use quill::FileTreeNode;
pub use quill::QuillIgnore;
pub use quill::QuillSource;
pub use value::QuillValue;
pub use normalize::normalize_document;
pub use normalize::normalize_fields;
pub use normalize::normalize_markdown;
pub use normalize::strip_bidi_formatting;
pub use normalize::NormalizationError;
pub use version::QuillReference;
pub use version::Version;
pub use version::VersionSelector;

Modules§

backend
Backend trait for output backends.
document
Document Module
error
Error Handling
normalize
Input Normalization
quill
Quill source bundle types and implementations.
session
types
Core types for rendering and output formats.
value
Value type for unified representation of TOML/YAML/JSON values.
version
Version Management