| Crates.io | markdown-it-block-spoiler |
| lib.rs | markdown-it-block-spoiler |
| version | 1.0.2 |
| created_at | 2024-09-12 16:52:49.647391+00 |
| updated_at | 2025-02-22 21:59:24.070979+00 |
| description | A markdown-it plugin for parsing block spoilers |
| homepage | |
| repository | https://github.com/LemmyNet/lemmy-markdown-it-plugins |
| max_upload_size | |
| id | 1372940 |
| size | 59,508 |
A markdown-it plugin to process block spoliers.
To load the plugin:
let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(&mut parser);
markdown_it_block_spoiler::add(&mut parser);
let html = parser.parse("::: spoiler _click to see more_\nhow spicy!\n:::\n").xrender();
assert_eq!(html, String::from("<details><summary>_click to see more_</summary>how spicy!\n</details>\n"));