diff --git a/src-tauri/src/domain/markdown.rs b/src-tauri/src/domain/markdown.rs new file mode 100644 index 0000000..098e9a3 --- /dev/null +++ b/src-tauri/src/domain/markdown.rs @@ -0,0 +1,27 @@ +#[allow(dead_code)] +pub trait MarkdownRenderer: Send + Sync { + fn render(&self, content: &str) -> String; +} + +#[derive(Default)] +#[allow(dead_code)] +pub struct RenderOptions { + pub tables: bool, + pub strikethrough: bool, + pub autolink: bool, + pub tasklist: bool, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn render_options_default_all_false() { + let opts = RenderOptions::default(); + assert!(!opts.tables); + assert!(!opts.strikethrough); + assert!(!opts.autolink); + assert!(!opts.tasklist); + } +} diff --git a/src-tauri/src/domain/mod.rs b/src-tauri/src/domain/mod.rs new file mode 100644 index 0000000..307c3b5 --- /dev/null +++ b/src-tauri/src/domain/mod.rs @@ -0,0 +1,4 @@ +mod markdown; + +#[allow(unused_imports)] +pub use markdown::{MarkdownRenderer, RenderOptions}; diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 38b09ab..99a625f 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1,4 +1,5 @@ mod core; +mod domain; mod watcher; use std::sync::Mutex;