Skip to content

Commit 4881da1

Browse files
committed
Support hidden lines.
1 parent c0d8edd commit 4881da1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/semver-check/src/main.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ fn doit() -> Result<(), Box<dyn Error>> {
6262
if line.trim() == "```" {
6363
break;
6464
}
65-
block.push(line);
65+
// Support rustdoc/mdbook hidden lines.
66+
let line = line.strip_prefix("# ").unwrap_or(line);
67+
if line == "#" {
68+
block.push("");
69+
} else {
70+
block.push(line);
71+
}
6672
}
6773
None => {
6874
return Err(format!(

0 commit comments

Comments
 (0)