From: Fletcher T. Penney Date: Sun, 12 Feb 2017 18:30:05 +0000 (-0500) Subject: FIXED: Fix bug in citation links X-Git-Tag: 0.3.0a^2~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1baffe745f14f0330298ee3b7e6f83a18b026031;p=multimarkdown FIXED: Fix bug in citation links --- diff --git a/src/html.c b/src/html.c index cda764f..6d08ee7 100644 --- a/src/html.c +++ b/src/html.c @@ -1530,6 +1530,7 @@ void mmd_export_footnote_list_html(DString * out, const char * source, scratch_p pad(out, 2, scratch); print("\n"); scratch->padded = 0; + scratch->footnote_being_printed = 0; } } @@ -1577,6 +1578,7 @@ void mmd_export_citation_list_html(DString * out, const char * source, scratch_p pad(out, 2, scratch); print("\n"); scratch->padded = 0; + scratch->citation_being_printed = 0; } } diff --git a/tests/MMD6Tests/Dutch.html b/tests/MMD6Tests/Dutch.html index bf86374..ccb0e22 100644 --- a/tests/MMD6Tests/Dutch.html +++ b/tests/MMD6Tests/Dutch.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    bar  ↩

diff --git a/tests/MMD6Tests/English.html b/tests/MMD6Tests/English.html index 40c4da4..5af9347 100644 --- a/tests/MMD6Tests/English.html +++ b/tests/MMD6Tests/English.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    bar  ↩

diff --git a/tests/MMD6Tests/French.html b/tests/MMD6Tests/French.html index 3046b5e..b27c02c 100644 --- a/tests/MMD6Tests/French.html +++ b/tests/MMD6Tests/French.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    bar  ↩

diff --git a/tests/MMD6Tests/German Guillemets.html b/tests/MMD6Tests/German Guillemets.html index 05627f6..e9965fd 100644 --- a/tests/MMD6Tests/German Guillemets.html +++ b/tests/MMD6Tests/German Guillemets.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    bar  ↩

diff --git a/tests/MMD6Tests/German.html b/tests/MMD6Tests/German.html index 4b468a1..26c893a 100644 --- a/tests/MMD6Tests/German.html +++ b/tests/MMD6Tests/German.html @@ -32,7 +32,7 @@
  1. -

    bar  ↩

    +

    bar  ↩

diff --git a/tests/MMD6Tests/Integrated.html b/tests/MMD6Tests/Integrated.html index f9aca9a..0b22f41 100644 --- a/tests/MMD6Tests/Integrated.html +++ b/tests/MMD6Tests/Integrated.html @@ -38,12 +38,25 @@ code
  • [

  • +

    Footnotes

    +

    Foo.[1]

    Bar.[2]

    +

    Cite.[1]

    + +

    Links and Images

    +

    link and link

    +
    +test +
    test
    +
    + +

    Math

    +

    math \({e}^{i\pi }+1=0\)

    Smart Quotes

    @@ -72,6 +85,10 @@ code
    baz bat*
    +

    Horizontal Rules

    + +
    +

      @@ -86,3 +103,14 @@ code
    + +
    +
    +
      + +
    1. +

      Inline Citation  ↩

      +
    2. + +
    +
    diff --git a/tests/MMD6Tests/Integrated.htmlc b/tests/MMD6Tests/Integrated.htmlc index e1f71c0..e58e714 100644 --- a/tests/MMD6Tests/Integrated.htmlc +++ b/tests/MMD6Tests/Integrated.htmlc @@ -37,16 +37,26 @@ code
  • [

  • +

    Footnotes

    +

    Foo.[^This is an inline footnote]

    Bar.[^foot]

    [^foot]: And a reference footnote.

    +

    Cite.[#Inline Citation]

    + +

    Links and Images

    +

    link and [link]

    [link]: http://bar.net "title" class="custom"

    +

    ![test](http://foo.bar/ "title" width="40px" height=400px)

    + +

    Math

    +

    math ${e}^{i\pi }+1=0$

    Smart Quotes

    @@ -71,3 +81,7 @@ code bar : foo bar : baz bat

    + +

    Horizontal Rules

    + +
    diff --git a/tests/MMD6Tests/Integrated.tex b/tests/MMD6Tests/Integrated.tex index 2c79737..84dde23 100644 --- a/tests/MMD6Tests/Integrated.tex +++ b/tests/MMD6Tests/Integrated.tex @@ -47,12 +47,24 @@ blockquote \end{enumerate} +\part{Footnotes } +\label{footnotes} + Foo.\footnote{This is an inline footnote} Bar.\footnote{And a reference footnote.} +Cite.\citesyntax TBD + +\part{Links and Images } +\label{linksandimages} + \href{http://foo.net/}{link}\footnote{\href{http://foo.net/}{http:/\slash foo.net\slash }} and \href{http://bar.net}{link}\footnote{\href{http://bar.net}{http:/\slash bar.net}} + +\part{Math } +\label{math} + math ${e}^{i\pi }+1=0$ \part{Smart Quotes } @@ -78,8 +90,15 @@ math ${e}^{i\pi }+1=0$ \begin{description} \item[foo] + \item[bar] + *foo bar baz bat* \end{description} + +\part{Horizontal Rules } +\label{horizontalrules} + +\begin{center}\rule{3in}{0.4pt}\end{center} diff --git a/tests/MMD6Tests/Integrated.text b/tests/MMD6Tests/Integrated.text index 30fd280..089e875 100644 --- a/tests/MMD6Tests/Integrated.text +++ b/tests/MMD6Tests/Integrated.text @@ -36,22 +36,37 @@ Escapes [escaped] 3. \[ + +# Footnotes # + Foo.[^This is an inline footnote] Bar.[^foot] [^foot]: And a reference footnote. +Cite.[#Inline Citation] + + +# Links and Images # + [link](http://foo.net/) and [link] [link]: http://bar.net "title" class="custom" +![test](http://foo.bar/ "title" width="40px" height=400px) + + +# Math # + math ${e}^{i\pi }+1=0$ + # Smart Quotes # "foo" and 'bar' -- with --- dashes... + # CriticMarkup # {++foo++} @@ -64,9 +79,16 @@ math ${e}^{i\pi }+1=0$ {==bar==} + # Definition Lists # foo bar : *foo bar : baz bat* + + +# Horizontal Rules # + +---- + diff --git a/tests/MMD6Tests/Swedish.html b/tests/MMD6Tests/Swedish.html index 07a918c..4f4cf74 100644 --- a/tests/MMD6Tests/Swedish.html +++ b/tests/MMD6Tests/Swedish.html @@ -32,7 +32,7 @@
    1. -

      bar  ↩

      +

      bar  ↩