jotdown/src/main.rs

13 lines
319 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
2022-11-20 13:13:48 -05:00
let p = jotdown::Parser::new(&src);
2022-12-06 14:27:15 -05:00
let mut out = std::io::BufWriter::new(std::io::stdout());
jotdown::html::write(&mut out, p).unwrap();
2022-11-12 12:45:17 -05:00
}