Skip to main content

Crate docutils_core

Crate docutils_core 

Source
Expand description

docutils-core: reStructuredText state-machine parser, transforms, and publishers — a Rust port of python/docutils (see NOTICE).

Modules§

core
Publish pipeline: mirrors docutils.core.publish_string / publish_doctree — parse, transform, halt-check, write.
html
HTML5 writer: mirrors docutils.writers.html5_polyglot output shape (full document with <head> metadata, semantic body elements). Byte-parity with CPython output is not claimed; structural parity is tested in tests/parity.rs.
inline
Inline markup parser: mirrors docutils.parsers.rst.states.Body inline processing (patterns.py start-strings, inliner.py) with a pragmatic single-pass scanner.
nodes
Document tree model: mirrors docutils.nodes element names so the full port maps 1:1. Inline content first, then block elements, then Document.
parser
Block-level state machine: mirrors docutils.parsers.rst.states (Body, BulletList, EnumeratedList, DefinitionList, FieldList, BlockQuote, LineBlock, TableParser, ExplicitMarkup) with a line-oriented recursive-descent machine over dedented line runs.
settings
Runtime settings: mirrors the docutils.core.Publisher settings subset the port honors (report_level, halt_level, writer selection).
transforms
Standard transforms: mirrors docutils.transforms (frontmatter excluded, handled in the parser) — references, footnotes, citations, substitutions, contents, and section-id deduplication.