summaryrefslogtreecommitdiff
path: root/isabelle2unicode/src/main.rs
blob: 4670b38de98bb23c2380ab20f4d4d764caeb6a4b (plain)
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));

}