markdown-it-deflist

Crates.iomarkdown-it-deflist
lib.rsmarkdown-it-deflist
version0.3.0
sourcesrc
created_at2023-06-28 10:17:50.339148
updated_at2023-08-03 16:55:27.5187
descriptionA markdown-it plugin for parsing definition lists
homepage
repositoryhttps://github.com/chrisjsewell/markdown-it-plugins.rs
max_upload_size
id902025
size31,012
Chris Sewell (chrisjsewell)

documentation

README

markdown-it-deflist.rs

crates.io

A markdown-it.rs plugin to process definition lists.

It is based on the pandoc definition:

Term 1

:   Definition 1

Term 2 with *inline markup*

:   Definition 2

        { some code, part of Definition 2 }

    Third paragraph of definition 2.

See the tests for more examples.

Usage

let parser = &mut markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(md);
markdown_it_deflist::add(parser);
parser.parse("term\n: definition").render();
// <dl>\n<dt>term</dt>\n<dd>definition</dd>\n</dl>\n
Commit count: 43

cargo fmt