From 2011d2ea4d6ec9d1bd7409c22e4258aceaaa3afe Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Mon, 12 Sep 2022 13:50:48 +0200 Subject: 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 --- src/compiler.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/compiler.rs') 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(""); backreferences.push_str(&(reference_index + 1).to_string()); -- cgit