diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-15 20:26:52 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-15 20:26:52 +0300 |
commit | 077dd667659cc1e579977d1cca0d4fe6934b6dad (patch) | |
tree | 62f7889a648d1b5dbe5a95ca9da320e75d73cf30 /src | |
parent | c1eb3cbc47d65e5f4e7c92e0c039c7206911cb73 (diff) | |
download | jt2-077dd667659cc1e579977d1cca0d4fe6934b6dad.tar.gz |
fix: allow topic pages to contain dots
Previously, a topic of lars.wirzenius would be stored in lars.mdwn,
which is wrong. Now it's stored in lars.wirzenius.mdwn.
Sponsored-by: author
Diffstat (limited to 'src')
-rw-r--r-- | src/journal.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/journal.rs b/src/journal.rs index c12ebfa..a48a63d 100644 --- a/src/journal.rs +++ b/src/journal.rs @@ -223,9 +223,7 @@ fn is_dir(path: &Path) -> bool { } fn topic_path(dirname: &Path, topic: &Path) -> PathBuf { - let mut path = dirname.join(topic); - path.set_extension("mdwn"); - path + dirname.join(&format!("{}.mdwn", topic.display())) } fn current_timestamp() -> String { |