summaryrefslogtreecommitdiff
path: root/subplot
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-07-09 21:23:09 +0300
committerLars Wirzenius <liw@liw.fi>2022-07-10 07:43:55 +0300
commit4fe5701ff70f20c1a74e32dfd38786b91e9b351b (patch)
tree59f64e3bc8b0629287f9270b653c3e9c508accac /subplot
parenta8321113e7e2df4bca0f7c959a6d58c9a4853bec (diff)
downloadriki-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.rs4
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![]);