jotdown/src/main.rs

13 lines
329 B
Rust
Raw Normal View History

2022-11-12 12:45:17 -05:00
use std::io::Read;
fn main() {
let mut src = String::new();
std::io::stdin()
.read_to_string(&mut src)
2022-12-02 02:17:19 -05:00
.expect("failed to read utf-8 file");
2022-11-12 12:45:17 -05:00
2023-02-04 13:37:33 -05:00
let events = jotdown::Parser::new(&src);
2022-12-06 14:27:15 -05:00
let mut out = std::io::BufWriter::new(std::io::stdout());
2023-02-04 13:37:33 -05:00
jotdown::html::write(events, &mut out).unwrap();
2022-11-12 12:45:17 -05:00
}