feat: module domain avec trait MarkdownRenderer et RenderOptions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 14:01:41 +02:00
parent 2df558e10f
commit ec239bb42e
3 changed files with 32 additions and 0 deletions
+27
View File
@@ -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);
}
}
+4
View File
@@ -0,0 +1,4 @@
mod markdown;
#[allow(unused_imports)]
pub use markdown::{MarkdownRenderer, RenderOptions};
+1
View File
@@ -1,4 +1,5 @@
mod core; mod core;
mod domain;
mod watcher; mod watcher;
use std::sync::Mutex; use std::sync::Mutex;