Fix examples and start testing them

This commit is contained in:
Chris Wong 2018-08-13 15:34:08 -07:00
parent d8d5af97f8
commit 0585df11a5

View file

@ -43,7 +43,11 @@ pub use maud_macros::{html, html_debug};
/// ///
/// # Example /// # Example
/// ///
/// ```rust,ignore /// ```rust
/// # #![feature(proc_macro_non_items)]
/// # #![feature(use_extern_macros)]
/// use maud::{html, Markup, Render};
///
/// /// Provides a shorthand for linking to a CSS stylesheet. /// /// Provides a shorthand for linking to a CSS stylesheet.
/// pub struct Stylesheet(&'static str); /// pub struct Stylesheet(&'static str);
/// ///
@ -131,18 +135,20 @@ pub use maud_htmlescape::Escaper;
/// ///
/// A minimal web page: /// A minimal web page:
/// ///
/// ```rust,ignore /// ```rust
/// use maud::DOCTYPE; /// # #![feature(proc_macro_non_items)]
/// # #![feature(use_extern_macros)]
/// use maud::{DOCTYPE, html};
/// ///
/// let markup = html! { /// let markup = html! {
/// (DOCTYPE) /// (DOCTYPE)
/// html { /// html {
/// head { /// head {
/// meta charset="utf-8"; /// meta charset="utf-8";
/// title "Test page" /// title { "Test page" }
/// } /// }
/// body { /// body {
/// p "Hello, world!" /// p { "Hello, world!" }
/// } /// }
/// } /// }
/// }; /// };