limn-pulldown-cmark 0.6.0

Stream-highlight fenced code blocks in pulldown-cmark Markdown events with limn
Documentation
# limn-pulldown-cmark

[`pulldown-cmark`](https://crates.io/crates/pulldown-cmark) event adapter for [`limn-hl`](https://github.com/ekesti/limn). Replaces fenced code blocks with highlighted HTML while passing all other events through unchanged.

## Install

```sh
cargo add limn-pulldown-cmark
```

## Usage

```rust
use limn_pulldown_cmark::Highlighter;
use limn_pulldown_cmark::limn::{lang, render::HtmlOptions, theme};

let hl = Highlighter::new(
    lang::all(),
    HtmlOptions {
        theme: Some(&theme::TOKYO_NIGHT),
        line_numbers: true,
        ..Default::default()
    },
)
.with_auto_detect(true);

let html = hl.render_html("```rs\nfn main() {}\n```\n");
```

To use custom `pulldown_cmark::Parser` flags or inspect events, wrap any `Event` iterator with `hl.events(parser)`. See [`docs/integrations.md`](https://github.com/ekesti/limn/blob/main/docs/integrations.md) for more details.