2 releases
0.1.1 | Jan 1, 2025 |
---|---|
0.1.0 | Jan 1, 2025 |
#1688 in Parser implementations
276 downloads per month
7KB
markdown-it-lazyload
A markdown-it.rs plugin to add lazy
to loading
property in <img>
tag.
Usage
let mut parser = markdown_it::MarkdownIt::new();
markdown_it::plugins::cmark::add(parser);
markdown_it_lazyload::add(parser);
md.parse("![Rust](https://example.com/example.png)").render();
// <p><img src="https://example.com/example.png" alt="Rust" loading="lazy"></p>
See the tests for more examples.
Specification
Dependencies
~5–14MB
~190K SLoC