[][src]Crate struckdown

struckdown is a text processing system based on markdown/commonmark with structured extensions inspired by reStructuredText. It parses commonmark with structural extensions (roles and directives) into an event stream.

This event stream can be processed before rendering.

Example

use struckdown::pipeline::Pipeline;
use struckdown::processors::{AutoAnchors, Syntect};
use struckdown::html::to_html;

// create a default pipeline
let mut pipeline = Pipeline::default();

// add a processor for anchors and syntax highlighting.
pipeline.add_processor(AutoAnchors::default());
pipeline.add_processor(Syntect::default());

// parse and process into a final event stream.
let stream = pipeline.process(r#"
```python
print("Hello World!");
```"#);

// render to html
let html = to_html(stream, &Default::default());

Modules

event

Implements all types emitted from an event.

html

Implements an HTML renderer.

parser

Gives access to the stream parser.

pipeline

Abstracts event stream modifications.

processors

Stream processors for struckdown.

value

Gives access to serde_json value functionality.