Skip to content

Commit 0099ec3

Browse files
Remove weird handling of ## in code examples
1 parent 6f40082 commit 0099ec3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/librustdoc/html/markdown.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,7 @@ impl<'a> Line<'a> {
168168
// then reallocate to remove it; which would make us return a String.
169169
fn map_line(s: &str) -> Line<'_> {
170170
let trimmed = s.trim();
171-
if trimmed.starts_with("##") {
172-
Line::Shown(Cow::Owned(s.replacen("##", "#", 1)))
173-
} else if let Some(stripped) = trimmed.strip_prefix("# ") {
171+
if let Some(stripped) = trimmed.strip_prefix("# ") {
174172
// # text
175173
Line::Hidden(stripped)
176174
} else if trimmed == "#" {

0 commit comments

Comments
 (0)