diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-07-09 21:23:09 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-07-10 07:43:55 +0300 |
commit | 4fe5701ff70f20c1a74e32dfd38786b91e9b351b (patch) | |
tree | 59f64e3bc8b0629287f9270b653c3e9c508accac /subplot | |
parent | a8321113e7e2df4bca0f7c959a6d58c9a4853bec (diff) | |
download | riki-4fe5701ff70f20c1a74e32dfd38786b91e9b351b.tar.gz |
feat: parse Markdown directly into an HTML abstraction
The Pandoc AST didn't bring us much benefit and made things harder to
follow. Replace it with our own HTML abstraction.
Sponsored-by: author
Diffstat (limited to 'subplot')
-rw-r--r-- | subplot/riki.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/subplot/riki.rs b/subplot/riki.rs index f00c0ac..722b597 100644 --- a/subplot/riki.rs +++ b/subplot/riki.rs @@ -51,6 +51,10 @@ fn ast<P: AsRef<Path>>(filename: P) -> Pandoc { let filename = filename.as_ref(); assert!(filename.exists()); + let data = std::fs::read(filename).unwrap(); + let data = String::from_utf8_lossy(&data); + println!("{}: {:?}", filename.display(), data); + let mut pandoc = pandoc::new(); pandoc.add_input(&filename); pandoc.set_output_format(pandoc::OutputFormat::Json, vec![]); |