colored_markup

Crates.iocolored_markup
lib.rscolored_markup
version0.1.1
sourcesrc
created_at2023-08-12 23:01:14.857176
updated_at2023-08-13 01:28:23.990728
descriptionA library for parsing and rendering colored markup with CSS style rules.
homepagehttps://github.com/schwa/colored_markup
repositoryhttps://github.com/schwa/colored_markup.
max_upload_size
id943030
size35,756
Jonathan Wight (schwa)

documentation

README

colored_markup

A rust library for parsing and rendering coloured markup with CSS style rules.

Usage

use colored_markup::{println_markup, StyleSheet};

let style_sheet =
    StyleSheet::parse("red { foreground: bright-red; styles: underline }").unwrap();
println_markup!(&style_sheet, "The next word is <red>{}</red>", "red");

See examples for more.

License

MIT. See LICENSE.txt for details.

TODO

  • RGB colour codes in CSS.
  • Better CSS parsing error handling.
  • Allow changing markup characters.
  • CLI tool.
  • Better documentation.
  • Get rid of re-exports?
Commit count: 0

cargo fmt