Skip to content

Commit

Permalink
Don't generate doc if doc comments only filled with 'white' characters
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jan 27, 2017
1 parent 8430042 commit 460a3b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustdoc/html/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 460a3b2

Please sign in to comment.