From: Fletcher T. Penney Date: Sun, 5 Mar 2017 05:10:32 +0000 (-0500) Subject: ADDED: Keep working on Abbreviations/Glossaries X-Git-Tag: 0.4.2-b^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce86b2867694d2270c53c488040e37c5a8a927ba;p=multimarkdown ADDED: Keep working on Abbreviations/Glossaries --- diff --git a/Sources/libMultiMarkdown/odf.c b/Sources/libMultiMarkdown/odf.c index 36dc77f..7d170bc 100644 --- a/Sources/libMultiMarkdown/odf.c +++ b/Sources/libMultiMarkdown/odf.c @@ -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: diff --git a/Sources/libMultiMarkdown/writer.c b/Sources/libMultiMarkdown/writer.c index cd83168..e7ce8fc 100644 --- a/Sources/libMultiMarkdown/writer.c +++ b/Sources/libMultiMarkdown/writer.c @@ -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; diff --git a/tests/MMD6Tests/Abbreviations.text b/tests/MMD6Tests/Abbreviations.text index 641d7ca..03308c6 100644 --- a/tests/MMD6Tests/Abbreviations.text +++ b/tests/MMD6Tests/Abbreviations.text @@ -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 diff --git a/tests/MMD6Tests/Integrated.fodt b/tests/MMD6Tests/Integrated.fodt index a7faf0a..de11329 100644 --- a/tests/MMD6Tests/Integrated.fodt +++ b/tests/MMD6Tests/Integrated.fodt @@ -386,6 +386,14 @@ draw:z-index="0" draw:style-name="fr1" svg:width="40pt"> Horizontal Rules + +Glossary + +termA term to be defined. + +Abbreviations + +MMDMultiMarkdown diff --git a/tests/MMD6Tests/Integrated.html b/tests/MMD6Tests/Integrated.html index 8ccd2c3..083e26b 100644 --- a/tests/MMD6Tests/Integrated.html +++ b/tests/MMD6Tests/Integrated.html @@ -115,6 +115,14 @@ code
+

Glossary

+ +

term

+ +

Abbreviations

+ +

MMD

+

    @@ -130,6 +138,17 @@ code
+
+
+
    + +
  1. +term:

    A term to be defined.  ↩

    +
  2. + +
+
+

    diff --git a/tests/MMD6Tests/Integrated.htmlc b/tests/MMD6Tests/Integrated.htmlc index 3b3cd7a..90a2915 100644 --- a/tests/MMD6Tests/Integrated.htmlc +++ b/tests/MMD6Tests/Integrated.htmlc @@ -106,3 +106,13 @@ bar

    Horizontal Rules


    + +

    Glossary

    + +

    [?term]

    + +

    [?term]: A term to be defined.

    + +

    Abbreviations

    + +

    >MMD

    diff --git a/tests/MMD6Tests/Integrated.text b/tests/MMD6Tests/Integrated.text index 4e2fb24..20de986 100644 --- a/tests/MMD6Tests/Integrated.text +++ b/tests/MMD6Tests/Integrated.text @@ -118,3 +118,16 @@ bar ---- + +# Glossary # + +[?term] + +[?term]: A term to be defined. + +# Abbreviations + +[>MMD] + +[>MMD]: MultiMarkdown +