Skip to content

Commit

Permalink
fix issue #38
Browse files Browse the repository at this point in the history
  • Loading branch information
msrd0 committed Apr 19, 2021
1 parent 11ce958 commit 954cc37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/readme/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Processor {

pub fn process_line(&mut self, mut line: String) -> Option<String> {
// Skip lines that should be hidden in docs
if self.section == Section::CodeRust && line.starts_with("# ") {
if self.section == Section::CodeRust && (line.starts_with("# ") || line == "#") {
return None;
}

Expand Down Expand Up @@ -104,6 +104,7 @@ mod tests {
"```",
"#[visible]",
"let visible = \"visible\";",
"#",
"# let hidden = \"hidden\";",
"```",
];
Expand Down

0 comments on commit 954cc37

Please sign in to comment.