Don't generate doc if doc comments only filled with 'white' characters

This commit is contained in:
Guillaume Gomez 2017-01-27 16:59:35 +01:00
parent 8430042a49
commit 460a3b20aa

View File

@ -237,8 +237,9 @@ pub fn render(w: &mut fmt::Formatter,
let my_opaque: &MyOpaque = &*((*opaque).opaque as *const MyOpaque);
let text = (*orig_text).as_bytes();
let origtext = str::from_utf8(text).unwrap();
let origtext = origtext.trim_left();
debug!("docblock: ==============\n{:?}\n=======", text);
let rendered = if lang.is_null() {
let rendered = if lang.is_null() || origtext.is_empty() {
false
} else {
let rlang = (*lang).as_bytes();