tui markup ansi macro

crates.io changelog docs.rs deps state

This create provided a macro to generated terminal styled text in ANSI escape sequence format using a markup language.

This macro compile your source at compile time, so it has no runtime overhead.

Example

```rust use tuimarkupansi_macro::ansi;

let generated = ansi!("Press to over the "); let hardcode = "Press \u{001b}[34mSpace\u{001b}[0m to \u{001b}[36mJump\u{001b}[0m over the \u{001b}[3;43mfox\u{001b}[0m"; // Those two are equivalent. assert_eq!(generated, hardcode);

// Use custom tag let generated = ansi!( "Press to over the ", "keyboard" => "blue", "action" => "cyan", "enemy" => "bg:yellow,i", ); assert_eq!(generated, hardcode);

println!("{}", generated); ```

Output:

![example-output]

The markup language used here is my tui markup language, See it's documentation for full syntax and supported style tags.

LICENSE

BSD-3-Clause-Clear, see [LICENSE].