1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use std::io; use std::io::BufRead; use isabelle_unicode::PrettyUnicode; fn main() { let stdin = io::stdin(); stdin.lock() .lines() .filter_map(|line| match line { Ok(line) if line.trim().is_empty() => Some("\n".to_string()), Ok(line) => line.to_pretty_unicode(), Err(_) => None }) .for_each(|line| print!("{}", line)); }