| Crates.io | treelight |
| lib.rs | treelight |
| version | 0.3.2 |
| created_at | 2021-05-18 09:02:47.701746+00 |
| updated_at | 2022-09-09 08:56:01.127917+00 |
| description | A syntax highlighter for the web using tree-sitter. |
| homepage | |
| repository | https://github.com/edg-l/treelight |
| max_upload_size | |
| id | 398915 |
| size | 133,825,395 |
A syntax highlighter for the web using tree-sitter.
use treelight::*;
let code = r#"
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ResponseError {
#[error("api error {0}")]
ApiError(#[from] PaypalError),
#[error("http error {0}")]
HttpError(#[from] reqwest::Error)
}
"#;
let result = highlight_to_html(Language::Rust, code);
println!("{}", result);
License: MIT