From 64a2c30a75b3f44ee9fbb3dbabf19c1bbfb4d9d6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 5 Jan 2016 15:19:19 +0100 Subject: [PATCH] Add helper to put content into tags --- src/module/helpers/content.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/module/helpers/content.rs b/src/module/helpers/content.rs index 4479a39e..08711368 100644 --- a/src/module/helpers/content.rs +++ b/src/module/helpers/content.rs @@ -79,6 +79,19 @@ pub mod markdown { .unwrap_or("UTF8Error")) } + pub fn to_html_page(self) -> String { + let header = " + + + + + + "; + let content = self.to_html(); + let footer = ""; + format!("{}{}{}", header, content, footer) + } + } }