#css #style #web #wasm

macro example-html-highlight-macro

macro for embedding syntax highlighted copies of code in the binary

1 unstable release

0.1.0 Dec 2, 2024

#445 in Procedural macros

Download history 135/week @ 2024-12-02

135 downloads per month

MIT license

7KB
115 lines

example-html-highlight-macro

This crate provides a macro to embed highlighted HTML versions of your tagged code into your binary. Useful for providing in-browser highlighted code examples that doesn't run stale!

Usage

#[example_html(themes = ["base16-ocean.dark"])]
fn variants() -> Dom {
    html!("div", {
        .text("Hello, world!")
    })
}

Dependencies

~2.2–9.5MB
~85K SLoC