diff options
author | Titus Wormer <tituswormer@gmail.com> | 2022-09-12 13:50:48 +0200 |
---|---|---|
committer | Titus Wormer <tituswormer@gmail.com> | 2022-09-12 13:54:43 +0200 |
commit | 2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe (patch) | |
tree | e462579538174cb983dcc2be4b0418b8c5077050 /src/compiler.rs | |
parent | 640c103c0a2b92f7f2a49cfc0721577f40aa90e0 (diff) | |
download | markdown-rs-2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe.tar.gz markdown-rs-2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe.tar.bz2 markdown-rs-2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe.zip |
Fix whitespace in GFM footnote definition identifiers
* Fix a crash on line endings in footnote definitions
* Fix to match spaces and tabs in identifiers to `cmark-gfm`
* Fix order of one attribute
Diffstat (limited to 'src/compiler.rs')
-rw-r--r-- | src/compiler.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler.rs b/src/compiler.rs index 1f029f5..397e96f 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -1828,15 +1828,13 @@ fn generate_footnote_item(context: &mut CompileContext, index: usize) { backreferences.push('-'); backreferences.push_str(&(reference_index + 1).to_string()); } - backreferences.push_str( - "\" data-footnote-backref=\"\" class=\"data-footnote-backref\" aria-label=\"", - ); + backreferences.push_str("\" data-footnote-backref=\"\" aria-label=\""); if let Some(ref value) = context.options.gfm_footnote_back_label { backreferences.push_str(&encode(value, context.encode_html)); } else { backreferences.push_str("Back to content"); } - backreferences.push_str("\">↩"); + backreferences.push_str("\" class=\"data-footnote-backref\">↩"); if reference_index != 0 { backreferences.push_str("<sup>"); backreferences.push_str(&(reference_index + 1).to_string()); |