Story can now be Displayed.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "tavern"
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
edition = "2024"
|
||||
description = "A blogging system that will allow you to write your blog in Markdown and then display it in HTML using Dioxus."
|
||||
repository = "/CyberMages/tavern"
|
||||
|
||||
@ -53,3 +53,17 @@ pub struct Tale
|
||||
#[serde(flatten)]
|
||||
pub story: Story
|
||||
}
|
||||
|
||||
|
||||
|
||||
impl std::fmt::Display for Story
|
||||
{
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
|
||||
{
|
||||
match self
|
||||
{
|
||||
Story::File(path) => { write!(f, "{}", path.display()) }
|
||||
Story::Html(content) => { write!(f, "{}", content) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user