Strip last backline from non-rust code examples
This commit is contained in:
parent
da889684c8
commit
7c35266552
2 changed files with 5 additions and 5 deletions
|
@ -261,7 +261,9 @@ impl<'a, I: Iterator<Item = Event<'a>>> Iterator for CodeBlocks<'_, 'a, I> {
|
|||
</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 test_ascii_with_prepending_hashtag() {
|
|||
####.###..#....#....#..#.
|
||||
#..#.#....#....#....#..#.
|
||||
#..#.#....#....#....#..#.
|
||||
#..#.####.####.####..##..
|
||||
</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…
Add table
Add a link
Reference in a new issue