aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-06-11 00:18:54 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-06-11 00:18:54 +0200
commit96c2cbe1850f95806cccb6f47a7739eb9c2ac860 (patch)
treee3813fc2d7e9c408a66a8e92cfe912a9c1569c23 /src
parent4fb323f69c11557a51c7da0b2031029f63edf789 (diff)
downloadmacroblog.rs-96c2cbe1850f95806cccb6f47a7739eb9c2ac860.tar.gz
macroblog.rs-96c2cbe1850f95806cccb6f47a7739eb9c2ac860.tar.bz2
macroblog.rs-96c2cbe1850f95806cccb6f47a7739eb9c2ac860.zip
fix: Fix blog post timestamps
For some the timestamp got messed up. Now they should be restored properly as well the `locustfile.py` pointing to the right endpoints.
Diffstat (limited to 'src')
-rw-r--r--src/blog.rs4
-rw-r--r--src/router.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/blog.rs b/src/blog.rs
index eaa314a..a1586f8 100644
--- a/src/blog.rs
+++ b/src/blog.rs
@@ -18,7 +18,9 @@ pub fn read_assets() -> Vec<BlogEntry> {
fn get_file_content(path: &str) -> String {
let buffer = PostAsset::get(path).unwrap().data.into_owned();
let md = String::from_utf8(buffer).unwrap();
- let parser = Parser::new_ext(&md, Options::empty());
+ let mut options = Options::empty();
+ options.insert(Options::ENABLE_FOOTNOTES);
+ let parser = Parser::new_ext(&md, options);
let mut html_output = &mut String::new();
html::push_html(&mut html_output, parser);
return html_output.to_string();
diff --git a/src/router.rs b/src/router.rs
index c196ab8..3227d66 100644
--- a/src/router.rs
+++ b/src/router.rs
@@ -1,5 +1,3 @@
-use std::borrow::Borrow;
-
use crate::assets::PostAsset;
use regex::Regex;