From 6798b6eadfa263ab74509aedf87d04ccf6a87165 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 22 Sep 2024 15:13:06 +0200 Subject: [PATCH] remove square brackets --- components/markdown/src/markdown.rs | 4 ++-- .../markdown__markdown__tests__def_before_use.snap | 2 +- ..._markdown__tests__footnote_inside_footnote.snap | 4 ++-- .../markdown__markdown__tests__multiple_refs.snap | 2 +- ...down__markdown__tests__reordered_footnotes.snap | 2 +- ...markdown__markdown__tests__single_footnote.snap | 2 +- .../markdown__github_style_footnotes.snap | 14 +++++++------- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/components/markdown/src/markdown.rs b/components/markdown/src/markdown.rs index 8bdc778e22..41a59a7795 100644 --- a/components/markdown/src/markdown.rs +++ b/components/markdown/src/markdown.rs @@ -277,7 +277,7 @@ fn convert_footnotes_to_github_style(old_events: &mut Vec) { // nr is a number of references to this footnote let (n, nr) = footnote_numbers.entry(name.clone()).or_insert((n, 0usize)); *nr += 1; - let reference = Event::Html(format!(r##"[{n}]"##).into()); + let reference = Event::Html(format!(r##"{n}"##).into()); if footnote_bodies_stack.is_empty() { // we are in the main text, just output the reference @@ -341,7 +341,7 @@ fn convert_footnotes_to_github_style(old_events: &mut Vec) { // // HTML: // - //

five [1].

+ //

five 1.

// //
    //
  1. diff --git a/components/markdown/src/snapshots/markdown__markdown__tests__def_before_use.snap b/components/markdown/src/snapshots/markdown__markdown__tests__def_before_use.snap index 57e3a922ad..698d689fcd 100644 --- a/components/markdown/src/snapshots/markdown__markdown__tests__def_before_use.snap +++ b/components/markdown/src/snapshots/markdown__markdown__tests__def_before_use.snap @@ -2,7 +2,7 @@ source: components/markdown/src/markdown.rs expression: html --- -

    There is footnote definition?[1]

    +

    There is footnote definition?1


    1. It's before the reference.

      diff --git a/components/markdown/src/snapshots/markdown__markdown__tests__footnote_inside_footnote.snap b/components/markdown/src/snapshots/markdown__markdown__tests__footnote_inside_footnote.snap index 6b5e28d476..58a2d9b224 100644 --- a/components/markdown/src/snapshots/markdown__markdown__tests__footnote_inside_footnote.snap +++ b/components/markdown/src/snapshots/markdown__markdown__tests__footnote_inside_footnote.snap @@ -2,10 +2,10 @@ source: components/markdown/src/markdown.rs expression: html --- -

      This text has a footnote[1]

      +

      This text has a footnote1


      1. -

        But the footnote has another footnote[2].

        +

        But the footnote has another footnote2.

      2. That's it.

        diff --git a/components/markdown/src/snapshots/markdown__markdown__tests__multiple_refs.snap b/components/markdown/src/snapshots/markdown__markdown__tests__multiple_refs.snap index 1f7eaff186..d53e9ee335 100644 --- a/components/markdown/src/snapshots/markdown__markdown__tests__multiple_refs.snap +++ b/components/markdown/src/snapshots/markdown__markdown__tests__multiple_refs.snap @@ -2,7 +2,7 @@ source: components/markdown/src/markdown.rs expression: html --- -

        This text has two[1] identical footnotes[1]

        +

        This text has two1 identical footnotes1


        1. So one is present. ↩2

          diff --git a/components/markdown/src/snapshots/markdown__markdown__tests__reordered_footnotes.snap b/components/markdown/src/snapshots/markdown__markdown__tests__reordered_footnotes.snap index 865a344e5c..9fddfea392 100644 --- a/components/markdown/src/snapshots/markdown__markdown__tests__reordered_footnotes.snap +++ b/components/markdown/src/snapshots/markdown__markdown__tests__reordered_footnotes.snap @@ -2,7 +2,7 @@ source: components/markdown/src/markdown.rs expression: html --- -

          This text has two[1] footnotes[2]

          +

          This text has two1 footnotes2


          1. But they are

            diff --git a/components/markdown/src/snapshots/markdown__markdown__tests__single_footnote.snap b/components/markdown/src/snapshots/markdown__markdown__tests__single_footnote.snap index 34a7f2d3e6..604489ab7f 100644 --- a/components/markdown/src/snapshots/markdown__markdown__tests__single_footnote.snap +++ b/components/markdown/src/snapshots/markdown__markdown__tests__single_footnote.snap @@ -2,7 +2,7 @@ source: components/markdown/src/markdown.rs expression: html --- -

            This text has a footnote[1]

            +

            This text has a footnote1


            1. But it is meaningless.

              diff --git a/components/markdown/tests/snapshots/markdown__github_style_footnotes.snap b/components/markdown/tests/snapshots/markdown__github_style_footnotes.snap index de55e63fb7..07d7fc5f63 100644 --- a/components/markdown/tests/snapshots/markdown__github_style_footnotes.snap +++ b/components/markdown/tests/snapshots/markdown__github_style_footnotes.snap @@ -2,12 +2,12 @@ source: components/markdown/tests/markdown.rs expression: body --- -

              This text has a footnote[1]

              -

              This text has two[2] footnotes[3].

              -

              There is footnote definition?[4]

              -

              This text has two[5] identical footnotes[5]

              -

              This text has a footnote[6]

              -

              Footnotes can also be referenced with identifiers[8].

              +

              This text has a footnote1

              +

              This text has two2 footnotes3.

              +

              There is footnote definition?4

              +

              This text has two5 identical footnotes5

              +

              This text has a footnote6

              +

              Footnotes can also be referenced with identifiers8.


              1. But it is meaningless.

                @@ -25,7 +25,7 @@ expression: body

                So one is present. ↩2

              2. -

                But the footnote has another footnote[7].

                +

                But the footnote has another footnote7.

              3. That's it.