mirror of
https://github.com/lexmount/moli.git
synced 2026-10-05 08:00:56 +00:00
Revert "Preserve literal characters in adjacent code HTML fallback"
This reverts commit 9359650240.
This commit is contained in:
@@ -465,6 +465,10 @@ impl<'a> Writer<'a> {
|
||||
'&' => self.output.push_str("&"),
|
||||
'<' => self.output.push_str("<"),
|
||||
'>' => self.output.push_str(">"),
|
||||
'\\' | '`' | '*' | '_' | '[' | ']' | '|' | '~' => {
|
||||
self.output.push('\\');
|
||||
self.output.push(ch);
|
||||
}
|
||||
_ => self.output.push(ch),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,24 +82,6 @@ fn inline_code_breaks_keep_separation_at_code_span_edges() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn adjacent_code_html_fallback_keeps_literal_code_text() {
|
||||
let source = r"<code>a*b_`\[x] & <tag></code><code>z</code>";
|
||||
for preformatted_code in [false, true] {
|
||||
let output = markdown_with(
|
||||
source,
|
||||
Options {
|
||||
preformatted_code,
|
||||
..Options::default()
|
||||
},
|
||||
);
|
||||
assert_eq!(
|
||||
rendered_html(&output),
|
||||
"<p><code>a*b_`\\[x] & <tag></code><code>z</code></p>\n"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn inline_code_breaks_obey_the_depth_limit() {
|
||||
let html = "<code>git<span><br></span>status</code>";
|
||||
|
||||
Reference in New Issue
Block a user