From 5dcce6a9655f3579b64404feeb7a41d0f7368394 Mon Sep 17 00:00:00 2001 From: Alexandre Bury Date: Thu, 11 Jan 2018 00:03:42 +0100 Subject: [PATCH] Fix example without markdown feature --- examples/markup.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/markup.rs b/examples/markup.rs index 31dd7c1..b2aabda 100644 --- a/examples/markup.rs +++ b/examples/markup.rs @@ -1,6 +1,7 @@ extern crate cursive; use cursive::Cursive; +#[cfg(feature = "markdown")] use cursive::utils::markup::MarkdownText; use cursive::views::{Dialog, TextView}; @@ -11,8 +12,12 @@ use cursive::views::{Dialog, TextView}; fn main() { let mut siv = Cursive::new(); + #[cfg(feature = "markdown")] let text = MarkdownText("Isn't *that* **cool**?"); + #[cfg(not(feature = "markdown"))] + let text = "Rebuild with --features markdown ;)"; + siv.add_layer( Dialog::around(TextView::styled(text).unwrap()) .button("Hell yeah!", |s| s.quit()),