tweak notes on ignore/compile_fail examples

This commit is contained in:
QuietMisdreavus 2017-11-06 15:10:58 -06:00
parent dcd343bfbc
commit 1ec9b3b750
2 changed files with 5 additions and 5 deletions

View file

@ -42,7 +42,7 @@ pub fn render_with_highlighting(src: &str, class: Option<&str>, id: Option<&str>
let mut out = Vec::new();
if let Some((tooltip, class)) = tooltip {
write!(out, "<div class='information'><div class='tooltip {}'><span \
write!(out, "<div class='information'><div class='tooltip {}'><span \
class='tooltiptext'>{}</span></div></div>",
class, tooltip).unwrap();
}

View file

@ -228,9 +228,9 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'a, I> {
))
});
let tooltip = if ignore {
Some(("Be careful when using this code, it's not being tested!", "ignore"))
Some(("This example is not tested", "ignore"))
} else if compile_fail {
Some(("This code doesn't compile so be extra careful!", "compile_fail"))
Some(("This example deliberately fails to compile", "compile_fail"))
} else {
None
};
@ -639,9 +639,9 @@ pub fn render(w: &mut fmt::Formatter,
))
});
let tooltip = if ignore {
Some(("Be careful when using this code, it's not being tested!", "ignore"))
Some(("This example is not tested", "ignore"))
} else if compile_fail {
Some(("This code doesn't compile so be extra careful!", "compile_fail"))
Some(("This example deliberately fails to compile", "compile_fail"))
} else {
None
};