]> granicus.if.org Git - multimarkdown/commitdiff
ADDED: Keep working on Abbreviations/Glossaries
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 5 Mar 2017 05:10:32 +0000 (00:10 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Sun, 5 Mar 2017 05:10:32 +0000 (00:10 -0500)
Sources/libMultiMarkdown/odf.c
Sources/libMultiMarkdown/writer.c
tests/MMD6Tests/Abbreviations.text
tests/MMD6Tests/Integrated.fodt
tests/MMD6Tests/Integrated.html
tests/MMD6Tests/Integrated.htmlc
tests/MMD6Tests/Integrated.text

index 36dc77f69d613f799264f39f9083f2004bc03f4f..7d170bc049ac8136ff03b51df40b29be895010df 100644 (file)
@@ -587,6 +587,7 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch
                                case BLOCK_DEFINITION:
                                        print_const(" text:style-name=\"Quotations\">");
                                        break;
+                               case PAIR_BRACKET_ABBREVIATION:
                                case PAIR_BRACKET_CITATION:
                                case PAIR_BRACKET_FOOTNOTE:
                                case PAIR_BRACKET_GLOSSARY:
index cd8316808279d0b740cddf9d9deef2bdf6d4b364..e7ce8fcc0f0f34201db5e3c58b80806f228dc588 100644 (file)
@@ -1892,7 +1892,7 @@ size_t extract_footnote_from_stack(scratch_pad * scratch, const char * target) {
 
 
 size_t extract_abbreviation_from_stack(scratch_pad * scratch, const char * target) {
-       char * key = clean_string(target, true);
+       char * key = clean_string(target, false);
 
        fn_holder * h;
 
@@ -1922,7 +1922,7 @@ size_t extract_abbreviation_from_stack(scratch_pad * scratch, const char * targe
 
 
 size_t extract_glossary_from_stack(scratch_pad * scratch, const char * target) {
-       char * key = clean_string(target, true);
+       char * key = clean_string(target, false);
 
        fn_holder * h;
 
index 641d7ca425b9a49c2cab3041d64f7e4346b8d235..03308c6dbb8e280bcc2930a085b1d46711c876ca 100644 (file)
@@ -1,20 +1,20 @@
 Title: Abbreviations
 latex config:  article
 
-foo
+[>foo]
 
-bar
+[>bar]
 
-foo bar
+[>foo] [>bar]
 
-foobar
+[>foobar]
 
-foo
-bar
+[>foo]
+[>bar]
 
 5
 
-*[foo]: FOO
-*[bar]: BAR
-*[foobar]: FOOBAR
-*[foo bar]: FOO BAR
+[>foo]: FOO
+[>bar]: BAR
+[>foobar]: FOOBAR
+[>foo bar]: FOO BAR
index a7faf0a12613e660375134bc7c94cd50bfaf2241..de11329a653fc37bc96c02463fd9a1ca42fa3535 100644 (file)
@@ -386,6 +386,14 @@ draw:z-index="0" draw:style-name="fr1" svg:width="40pt">
 <text:h text:outline-level="1"><text:bookmark text:name="horizontalrules"/>Horizontal Rules <text:bookmark-end text:name="horizontalrules"/></text:h>
 
 <text:p text:style-name="Horizontal_20_Line"/>
+
+<text:h text:outline-level="1"><text:bookmark text:name="glossary"/>Glossary <text:bookmark-end text:name="glossary"/></text:h>
+
+<text:p text:style-name="Standard">term<text:note text:id="gn1" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">A term to be defined.</text:p></text:note-body></text:note></text:p>
+
+<text:h text:outline-level="1"><text:bookmark text:name="abbreviations"/>Abbreviations<text:bookmark-end text:name="abbreviations"/></text:h>
+
+<text:p text:style-name="Standard">MMD<text:note text:id="gn1" text:note-class="glossary"><text:note-body><text:p text:style-name="Footnote">MultiMarkdown</text:p></text:note-body></text:note></text:p>
 </office:text>
 </office:body>
 </office:document>
index 8ccd2c39c7a50f73ffb13e7f3ef6a64bea7c76d0..083e26bad60ed40a5cef82143ee5e4fefc57a83f 100644 (file)
@@ -115,6 +115,14 @@ code
 
 <hr />
 
+<h1 id="glossary">Glossary </h1>
+
+<p><a href="#gn:1" id="gnref:1" title="see glossary" class="glossary">term</a></p>
+
+<h1 id="abbreviations">Abbreviations</h1>
+
+<p><abbr title="MultiMarkdown">MMD</abbr></p>
+
 <div class="footnotes">
 <hr />
 <ol>
@@ -130,6 +138,17 @@ code
 </ol>
 </div>
 
+<div class="glossary">
+<hr />
+<ol>
+
+<li id="gn:1">
+term: <p>A term to be defined. <a href="#gnref:1" title="return to body" class="reverseglossary">&#160;&#8617;</a></p>
+</li>
+
+</ol>
+</div>
+
 <div class="citations">
 <hr />
 <ol>
index 3b3cd7a37bfb9ee3a3f9ac492dc46a8481d60297..90a2915dafe746242c2787c664af642cad566ca2 100644 (file)
@@ -106,3 +106,13 @@ bar
 <h1>Horizontal Rules </h1>
 
 <hr />
+
+<h1>Glossary </h1>
+
+<p>[?term]</p>
+
+<p>[?term]: A term to be defined.</p>
+
+<h1>Abbreviations</h1>
+
+<p><a href="MultiMarkdown">>MMD</a></p>
index 4e2fb243434660983d947f78d2c48376580f6553..20de986d08e5e2d38b6d24602bb3a6cb340af202 100644 (file)
@@ -118,3 +118,16 @@ bar
 
 ----
 
+
+# Glossary #
+
+[?term]
+
+[?term]: A term to be defined.
+
+# Abbreviations
+
+[>MMD]
+
+[>MMD]: MultiMarkdown
+