]> granicus.if.org Git - multimarkdown/commitdiff
CHANGED: Change HTML output for footnotes and citations
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 29 Apr 2017 20:21:51 +0000 (16:21 -0400)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sat, 29 Apr 2017 20:21:51 +0000 (16:21 -0400)
12 files changed:
Sources/libMultiMarkdown/html.c
tests/MMD6Tests/Citations.html
tests/MMD6Tests/Dutch.html
tests/MMD6Tests/English.html
tests/MMD6Tests/French.html
tests/MMD6Tests/German Guillemets.html
tests/MMD6Tests/German.html
tests/MMD6Tests/Inline Footnotes.html
tests/MMD6Tests/Integrated.html
tests/MMD6Tests/Reference Footnotes.html
tests/MMD6Tests/Spanish.html
tests/MMD6Tests/Swedish.html

index d8baea84d038b43c5ae508f8594e2ff21845079b..69c0be5a077647f85b2889bae9ee571bae90948f 100644 (file)
@@ -1239,11 +1239,11 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
                                
                                                if (temp_short2 == scratch->used_citations->size) {
                                                        // This is a re-use of a previously used note
-                                                       printf("<a href=\"#cn:%d\" title=\"%s\" class=\"citation\">[%d]</a>",
+                                                       printf("<a href=\"#cn:%d\" title=\"%s\" class=\"citation\">(%d)</a>",
                                                                        temp_short, LC("see citation"), temp_short);
                                                } else {
                                                        // This is the first time this note was used
-                                                       printf("<a href=\"#cn:%d\" id=\"cnref:%d\" title=\"%s\" class=\"citation\">[%d]</a>",
+                                                       printf("<a href=\"#cn:%d\" id=\"cnref:%d\" title=\"%s\" class=\"citation\">(%d)</a>",
                                                                        temp_short, temp_short, LC("see citation"), temp_short);
                                                }
                                        } else {
@@ -1251,11 +1251,11 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
 
                                                if (temp_short2 == scratch->used_citations->size) {
                                                        // This is a re-use of a previously used note
-                                                       printf("<a href=\"#cn:%d\" title=\"%s\" class=\"citation\">[%s, %d]</a>",
+                                                       printf("<a href=\"#cn:%d\" title=\"%s\" class=\"citation\">(%s, %d)</a>",
                                                                        temp_short, LC("see citation"), temp_char, temp_short);
                                                } else {
                                                        // This is the first time this note was used
-                                                       printf("<a href=\"#cn:%d\" id=\"cnref:%d\" title=\"%s\" class=\"citation\">[%s, %d]</a>",
+                                                       printf("<a href=\"#cn:%d\" id=\"cnref:%d\" title=\"%s\" class=\"citation\">(%s, %d)</a>",
                                                                        temp_short, temp_short, LC("see citation"), temp_char, temp_short);
                                                }
                                        }
@@ -1301,7 +1301,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
                                                temp_short3 = temp_short;
                                        }
 
-                                       printf("<a href=\"#fn:%d\" title=\"%s\" class=\"footnote\">[%d]</a>",
+                                       printf("<a href=\"#fn:%d\" title=\"%s\" class=\"footnote\"><sup>%d</sup></a>",
                                                temp_short3, LC("see footnote"), temp_short);
                                } else {
                                        // This is the first time this note was used
@@ -1313,7 +1313,7 @@ void mmd_export_token_html(DString * out, const char * source, token * t, scratc
                                                temp_short3 = temp_short;
                                        }
 
-                                       printf("<a href=\"#fn:%d\" id=\"fnref:%d\" title=\"%s\" class=\"footnote\">[%d]</a>",
+                                       printf("<a href=\"#fn:%d\" id=\"fnref:%d\" title=\"%s\" class=\"footnote\"><sup>%d</sup></a>",
                                                temp_short3, temp_short3, LC("see footnote"), temp_short);
                                }
                        } else {
index b41cdac41c1b7e5df0f0155cf5a2bab6624e775a..4f8cc6a033cc10e48b9b93d8c38e24c63eeee3ac 100644 (file)
@@ -8,31 +8,31 @@
 
 <h1 id="citep">citep </h1>
 
-<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">(1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a>[]</p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a>[]</p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[p. 123, 1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(p. 123, 1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[foo\]\[bar, 1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(foo\]\[bar, 1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a><a href="#cn:2" id="cnref:2" title="see citation" class="citation">[2]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a><a href="#cn:2" id="cnref:2" title="see citation" class="citation">(2)</a></p>
 
 <h1 id="citet">citet </h1>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a>[]</p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a>[]</p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[p. 123, 1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(p. 123, 1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[foo\]\[bar, 1]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(foo\]\[bar, 1)</a></p>
 
-<p><a href="#cn:1" title="see citation" class="citation">[1]</a><a href="#cn:2" title="see citation" class="citation">[2]</a></p>
+<p><a href="#cn:1" title="see citation" class="citation">(1)</a><a href="#cn:2" title="see citation" class="citation">(2)</a></p>
 
 <p></p>
 
index 4157180ac85df6ad4a4dbe3536cd9ee300ce8591..2b1ec51157ebae1cd5ae51eedc32d5313f6dac95 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />
index 69bb6424ba0568fcd708298f6a30e98f2d4d0cbd..62dddf4ce9dd177f7efdc5826d01caae08872229 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />
index daaa86106ed41dc7221732221a3deaae7194e8ff..9808b43323b6e8f2f261ee5cae36e11150eaf35d 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="Voir note de bas de page" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="Voir note de bas de page" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="Voir citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Voir citation" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />
index f31baec3dca91df10ea21a6db0a38eb7da5af493..99bac49812dbba8bffe5f9ed88f02a297465c080 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="Siehe Fußnote" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="Siehe Fußnote" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="Siehe Zitat" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Siehe Zitat" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />
index c0ee276feba2708725b7ea4e25f37826a48bd60e..64f5c6497a00e1e3dea3af57f667c5b777121a3d 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="Siehe Fußnote" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="Siehe Fußnote" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="Siehe Zitat" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Siehe Zitat" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />
index 9c07f175b136e9fb837a6f84a195765927c0566e..994877c028a45be64411a8cefa8467f36431ba17 100644 (file)
@@ -6,11 +6,11 @@
 </head>
 <body>
 
-<p>Inline.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p>Inline.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
 
-<p>Inline.<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote">[2]</a></p>
+<p>Inline.<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote"><sup>2</sup></a></p>
 
-<p>Inline.<a href="#fn:3" id="fnref:3" title="see footnote" class="footnote">[3]</a></p>
+<p>Inline.<a href="#fn:3" id="fnref:3" title="see footnote" class="footnote"><sup>3</sup></a></p>
 
 <div class="footnotes">
 <hr />
index 4b12ab6d6fbfe5e516867cbd631dc4e48309371f..3ad5e365c886fb5d40e6c2229bf4992c131eb513 100644 (file)
@@ -48,13 +48,13 @@ code
 
 <h1 id="footnotes">Footnotes </h1>
 
-<p>Foo.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p>Foo.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
 
-<p>Bar.<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote">[2]</a></p>
+<p>Bar.<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote"><sup>2</sup></a></p>
 
-<p>Cite.<a href="#cn:1" id="cnref:1" title="see citation" class="citation">[1]</a></p>
+<p>Cite.<a href="#cn:1" id="cnref:1" title="see citation" class="citation">(1)</a></p>
 
-<p>Cite.<a href="#cn:2" id="cnref:2" title="see citation" class="citation">[2]</a></p>
+<p>Cite.<a href="#cn:2" id="cnref:2" title="see citation" class="citation">(2)</a></p>
 
 <h1 id="linksandimages">Links and Images </h1>
 
index 23c93a69b7deecceb51da948063da02c14ead716..2398902615640b5925cf3263e0333e354735c652 100644 (file)
@@ -6,13 +6,13 @@
 </head>
 <body>
 
-<p>foo.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p>foo.<a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
 
-<p>foo.<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote">[2]</a></p>
+<p>foo.<a href="#fn:2" id="fnref:2" title="see footnote" class="footnote"><sup>2</sup></a></p>
 
-<p>foo.<a href="#fn:3" id="fnref:3" title="see footnote" class="footnote">[3]</a></p>
+<p>foo.<a href="#fn:3" id="fnref:3" title="see footnote" class="footnote"><sup>3</sup></a></p>
 
-<p>foo.<a href="#fn:3" title="see footnote" class="footnote">[3]</a></p>
+<p>foo.<a href="#fn:3" title="see footnote" class="footnote"><sup>3</sup></a></p>
 
 <div class="footnotes">
 <hr />
index 55fd08a8a69e4182a142864bc6fc8fe7bacab228..d17d5f6d039be07e5f53d362531fc080e314a3ff 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="Ver nota a pie de página" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="Ver nota a pie de página" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="Ver referencia" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="Ver referencia" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />
index d1d9e0975fe3a7b10107fe516717b3642aa45e08..cb52d6caca80efc76c9207fc90bc13ca651fa04b 100644 (file)
@@ -20,9 +20,9 @@
 
 <p>foo&#8230;</p>
 
-<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote">[1]</a></p>
+<p><a href="#fn:1" id="fnref:1" title="see footnote" class="footnote"><sup>1</sup></a></p>
 
-<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">[1]</a></p>
+<p><a href="#cn:1" id="cnref:1" title="see citation" class="citation">(1)</a></p>
 
 <div class="footnotes">
 <hr />