Strip last backline from non-rust code examples
This commit is contained in:
parent
da889684c8
commit
7c35266552
@ -261,7 +261,9 @@ fn next(&mut self) -> Option<Self::Item> {
|
||||
</pre>\
|
||||
</div>",
|
||||
added_classes = added_classes.join(" "),
|
||||
text = Escape(&original_text),
|
||||
text = Escape(
|
||||
original_text.strip_suffix('\n').unwrap_or(&original_text)
|
||||
),
|
||||
)
|
||||
.into(),
|
||||
));
|
||||
|
@ -524,15 +524,13 @@ fn t(input: &str, expect: &str) {
|
||||
####.###..#....#....#..#.
|
||||
#..#.#....#....#....#..#.
|
||||
#..#.#....#....#....#..#.
|
||||
#..#.####.####.####..##..
|
||||
</code></pre></div>",
|
||||
#..#.####.####.####..##..</code></pre></div>",
|
||||
);
|
||||
t(
|
||||
r#"```markdown
|
||||
# hello
|
||||
```"#,
|
||||
"<div class=\"example-wrap\"><pre class=\"language-markdown\"><code>\
|
||||
# hello
|
||||
</code></pre></div>",
|
||||
# hello</code></pre></div>",
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user