diff --git a/src/rendering.rs b/src/rendering.rs index 2e39a14..400e320 100644 --- a/src/rendering.rs +++ b/src/rendering.rs @@ -41,3 +41,22 @@ pub fn render_markdown_for_fts(src: &str) -> String { buf } + +#[cfg(test)] +mod test { + use super::*; + + #[test] + fn slug_link() { + let actual = render_markdown("[Slug link]"); + let expected = "

Slug link

\n"; + assert_eq!(actual, expected); + } + + #[test] + fn footnote_links() { + let actual = render_markdown("[Link]\n\n[Link]: target"); + let expected = "

Link

\n"; + assert_eq!(actual, expected); + } +}