From dd7924ff1ee1d111bd49e6bff3eaa73a0983f325 Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Fri, 3 Mar 2017 19:48:08 -0500 Subject: [PATCH] ADDED: Continue work on ODF --- Sources/libMultiMarkdown/odf.c | 314 +++++++++++++++- tests/MMD6Tests/Advanced Emph and Strong.fodt | 12 + .../Advanced Fenced Code Blocks.fodt | 12 + tests/MMD6Tests/Advanced Headers.fodt | 12 + tests/MMD6Tests/Amps and Angles.fodt | 12 + tests/MMD6Tests/Automatic Links.fodt | 12 + tests/MMD6Tests/Basic Blocks.fodt | 12 + tests/MMD6Tests/Blockquotes.fodt | 12 + tests/MMD6Tests/Citations.fodt | 302 ++++++++++++++++ tests/MMD6Tests/Code Spans.fodt | 12 + tests/MMD6Tests/CriticMarkup.fodt | 336 ++++++++++++++++++ tests/MMD6Tests/Cross-References.fodt | 12 + tests/MMD6Tests/Dutch.fodt | 290 +++++++++++++++ tests/MMD6Tests/Edge Cases 2.fodt | 12 + tests/MMD6Tests/Edge Cases.fodt | 12 + tests/MMD6Tests/Emph and Strong Star.fodt | 12 + tests/MMD6Tests/Emph and Strong UL.fodt | 12 + tests/MMD6Tests/English.fodt | 290 +++++++++++++++ tests/MMD6Tests/Escapes.fodt | 12 + tests/MMD6Tests/Fenced Code Blocks.fodt | 12 + tests/MMD6Tests/Figure Images.fodt | 12 + tests/MMD6Tests/French.fodt | 290 +++++++++++++++ tests/MMD6Tests/German Guillemets.fodt | 290 +++++++++++++++ tests/MMD6Tests/German.fodt | 290 +++++++++++++++ tests/MMD6Tests/HTML Blocks.fodt | 12 + tests/MMD6Tests/HTML Inline.fodt | 12 + tests/MMD6Tests/Headers.fodt | 12 + tests/MMD6Tests/Horizontal Rules.fodt | 12 + tests/MMD6Tests/Indented Code Blocks.fodt | 12 + tests/MMD6Tests/Inline Footnotes.fodt | 276 ++++++++++++++ tests/MMD6Tests/Inline Images.fodt | 12 + tests/MMD6Tests/Inline Links.fodt | 12 + tests/MMD6Tests/Linebreaks.fodt | 12 + tests/MMD6Tests/Link Attributes.fodt | 12 + tests/MMD6Tests/Math.fodt | 322 +++++++++++++++++ tests/MMD6Tests/Reference Footnotes.fodt | 285 +++++++++++++++ tests/MMD6Tests/Reference Images.fodt | 12 + tests/MMD6Tests/Reference Links.fodt | 12 + tests/MMD6Tests/Setext Headers.fodt | 12 + tests/MMD6Tests/Smart Quotes.fodt | 12 + tests/MMD6Tests/Special Characters.fodt | 12 + tests/MMD6Tests/Superscript.fodt | 12 + tests/MMD6Tests/Swedish.fodt | 290 +++++++++++++++ tests/MMD6Tests/Transclusion.fodt | 12 + tests/MMD6Tests/Variables.fodt | 282 +++++++++++++++ 45 files changed, 4238 insertions(+), 3 deletions(-) create mode 100644 tests/MMD6Tests/Citations.fodt create mode 100644 tests/MMD6Tests/CriticMarkup.fodt create mode 100644 tests/MMD6Tests/Dutch.fodt create mode 100644 tests/MMD6Tests/English.fodt create mode 100644 tests/MMD6Tests/French.fodt create mode 100644 tests/MMD6Tests/German Guillemets.fodt create mode 100644 tests/MMD6Tests/German.fodt create mode 100644 tests/MMD6Tests/Inline Footnotes.fodt create mode 100644 tests/MMD6Tests/Math.fodt create mode 100644 tests/MMD6Tests/Reference Footnotes.fodt create mode 100644 tests/MMD6Tests/Swedish.fodt create mode 100644 tests/MMD6Tests/Variables.fodt diff --git a/Sources/libMultiMarkdown/odf.c b/Sources/libMultiMarkdown/odf.c index a22b683..79e14c4 100644 --- a/Sources/libMultiMarkdown/odf.c +++ b/Sources/libMultiMarkdown/odf.c @@ -473,6 +473,8 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch print_const(""); scratch->padded = 0; break; + case BLOCK_META: + break; case BLOCK_PARA: pad(out, 2, scratch); print_const(""); break; + case PAIR_BRACKET_CITATION: + case PAIR_BRACKET_FOOTNOTE: + print_const(" text:style-name=\"Footnote\">"); + break; default: print_const(" text:style-name=\"Standard\">"); break; @@ -505,9 +511,45 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch case BRACKET_RIGHT: print_const("]"); break; + case BRACKET_VARIABLE_LEFT: + print_const("[\%"); + break; case COLON: print_char(':'); break; + case CRITIC_ADD_OPEN: + print_const("{++"); + break; + case CRITIC_ADD_CLOSE: + print_const("++}"); + break; + case CRITIC_COM_OPEN: + print_const("{>>"); + break; + case CRITIC_COM_CLOSE: + print_const("<<}"); + break; + case CRITIC_DEL_OPEN: + print_const("{--"); + break; + case CRITIC_DEL_CLOSE: + print_const("--}"); + break; + case CRITIC_HI_OPEN: + print_const("{=="); + break; + case CRITIC_HI_CLOSE: + print_const("==}"); + break; + case CRITIC_SUB_OPEN: + print_const("{~~"); + break; + case CRITIC_SUB_DIV: + print_const("~>"); + break; + case CRITIC_SUB_CLOSE: + print_const("~~}"); + break; case DASH_M: if (!(scratch->extensions & EXT_SMART)) { print_token(t); @@ -685,10 +727,13 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch mmd_export_token_tree_odf_raw(out, source, t->child, scratch); print_const(""); break; + case PAIR_BRACES: + mmd_export_token_tree_odf(out, source, t->child, scratch); + break; case PAIR_BRACKET: if ((scratch->extensions & EXT_NOTES) && (t->next && t->next->type == PAIR_BRACKET_CITATION)) { -// goto parse_citation; + goto parse_citation; } case PAIR_BRACKET_IMAGE: @@ -733,9 +778,213 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch // No links exist, so treat as normal mmd_export_token_tree_odf(out, source, t->child, scratch); break; - case PAIR_BRACES: - mmd_export_token_tree_odf(out, source, t->child, scratch); + case PAIR_BRACKET_CITATION: + parse_citation: + temp_bool = true; // Track whether this is a 'not cited' + temp_token = t; // Remember whether we need to skip ahead + + if (scratch->extensions & EXT_NOTES) { + if (t->type == PAIR_BRACKET) { + // This is a locator for subsequent citation (e.g. `[foo][#bar]` + temp_char = text_inside_pair(source, t); + temp_char2 = label_from_string(temp_char); + + if (strcmp(temp_char2, "notcited") == 0) { + free(temp_char); + temp_char = strdup(""); + temp_bool = false; + } + + free(temp_char2); + + // Process the actual citation + t = t->next; + } else { + // This is just a citation (e.g. `[#foo]`) + temp_char = strdup(""); + } + + temp_short3 = scratch->used_citations->size; + + citation_from_bracket(source, scratch, t, &temp_short); + + temp_short2 = scratch->odf_para_type; + scratch->odf_para_type = PAIR_BRACKET_CITATION; + + if (temp_short3 == scratch->used_citations->size) { + // Re-using previous citation + print_const("%d", temp_short, temp_short); + } else { + // New citation + printf("", temp_short); + temp_note = stack_peek_index(scratch->used_citations, temp_short - 1); + + mmd_export_token_tree_odf(out, source, temp_note->content, scratch); + print_const(""); + } + + scratch->odf_para_type = temp_short2; + + if (temp_token != t) { + // Skip citation on next pass + scratch->skip_token = 1; + } + } else { + // Footnotes disabled + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + + free(temp_char); + break; + case PAIR_BRACKET_FOOTNOTE: + if (scratch->extensions & EXT_NOTES) { + footnote_from_bracket(source, scratch, t, &temp_short); + + temp_short2 = scratch->odf_para_type; + scratch->odf_para_type = PAIR_BRACKET_FOOTNOTE; + + if (temp_short < scratch->used_footnotes->size) { + // Re-using previous footnote + print("\\footnote{reuse"); + + print("}"); + } else { + // This is a new footnote + printf("", temp_short); + temp_note = stack_peek_index(scratch->used_footnotes, temp_short - 1); + + mmd_export_token_tree_odf(out, source, temp_note->content, scratch); + print_const(""); + } + + scratch->odf_para_type = temp_short2; + } else { + // Footnotes disabled + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + break; + case PAIR_BRACKET_VARIABLE: + temp_char = text_inside_pair(source, t); + temp_char2 = extract_metadata(scratch, temp_char); + + if (temp_char2) + mmd_print_string_odf(out, temp_char2); + else + mmd_export_token_tree_odf(out, source, t->child, scratch); + + // Don't free temp_char2 (it belongs to meta *) + free(temp_char); + break; + case PAIR_CRITIC_ADD: + // Ignore if we're rejecting + if (scratch->extensions & EXT_CRITIC_REJECT) + break; + if (scratch->extensions & EXT_CRITIC) { + t->child->type = TEXT_EMPTY; + t->child->mate->type = TEXT_EMPTY; + if (scratch->extensions & EXT_CRITIC_ACCEPT) { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } else { + print_const(""); + mmd_export_token_tree_odf(out, source, t->child, scratch); + print_const(""); + } + } else { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + break; + case PAIR_CRITIC_DEL: + // Ignore if we're accepting + if (scratch->extensions & EXT_CRITIC_ACCEPT) + break; + if (scratch->extensions & EXT_CRITIC) { + t->child->type = TEXT_EMPTY; + t->child->mate->type = TEXT_EMPTY; + if (scratch->extensions & EXT_CRITIC_REJECT) { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } else { + print_const(""); + mmd_export_token_tree_odf(out, source, t->child, scratch); + print_const(""); + } + } else { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + break; + case PAIR_CRITIC_COM: + // Ignore if we're rejecting or accepting + if ((scratch->extensions & EXT_CRITIC_REJECT) || + (scratch->extensions & EXT_CRITIC_ACCEPT)) + break; + if (scratch->extensions & EXT_CRITIC) { + t->child->type = TEXT_EMPTY; + t->child->mate->type = TEXT_EMPTY; + print_const(""); + mmd_export_token_tree_odf(out, source, t->child, scratch); + print_const(""); + } else { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + break; + case PAIR_CRITIC_HI: + // Ignore if we're rejecting or accepting + if ((scratch->extensions & EXT_CRITIC_REJECT) || + (scratch->extensions & EXT_CRITIC_ACCEPT)) + break; + if (scratch->extensions & EXT_CRITIC) { + t->child->type = TEXT_EMPTY; + t->child->mate->type = TEXT_EMPTY; + print_const(""); + mmd_export_token_tree_odf(out, source, t->child, scratch); + print_const(""); + } else { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + break; + case CRITIC_SUB_DIV_A: + print_const("~"); + break; + case CRITIC_SUB_DIV_B: + print_const(">"); + break; + case PAIR_CRITIC_SUB_DEL: + if ((scratch->extensions & EXT_CRITIC) && + (t->next->type == PAIR_CRITIC_SUB_ADD)) { + t->child->type = TEXT_EMPTY; + t->child->mate->type = TEXT_EMPTY; + if (scratch->extensions & EXT_CRITIC_ACCEPT) { + + } else if (scratch->extensions & EXT_CRITIC_REJECT) { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } else { + print_const(""); + mmd_export_token_tree_odf(out, source, t->child, scratch); + print_const(""); + } + } else { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } + break; + case PAIR_CRITIC_SUB_ADD: + if ((scratch->extensions & EXT_CRITIC) && + (t->prev->type == PAIR_CRITIC_SUB_DEL)) { + t->child->type = TEXT_EMPTY; + t->child->mate->type = TEXT_EMPTY; + if (scratch->extensions & EXT_CRITIC_REJECT) { + + } else if (scratch->extensions & EXT_CRITIC_ACCEPT) { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } else { + print_const(""); + mmd_export_token_tree_odf(out, source, t->child, scratch); + print_const(""); + } + } else { + mmd_export_token_tree_odf(out, source, t->child, scratch); + } break; + case PAIR_MATH: case PAIR_PAREN: case PAIR_QUOTE_DOUBLE: case PAIR_QUOTE_SINGLE: @@ -752,6 +1001,9 @@ void mmd_export_token_odf(DString * out, const char * source, token * t, scratch case PIPE: print_token(t); break; + case PLUS: + print_char('+'); + break; case QUOTE_SINGLE: if ((t->mate == NULL) || (!(scratch->extensions & EXT_SMART))) print_const("'"); @@ -1053,6 +1305,18 @@ void mmd_start_complete_odf(DString * out, const char * source, scratch_pad * sc " \n" \ " \n" \ " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ "\n" \ " \n" \ "\n" \ @@ -1186,7 +1450,51 @@ void mmd_start_complete_odf(DString * out, const char * source, scratch_pad * sc " \n" \ " \n"); + // Iterate over metadata keys + meta * m; + + if (scratch->meta_hash) + print_const("\n"); + + for (m = scratch->meta_hash; m != NULL; m = m->hh.next) { + if (strcmp(m->key, "baseheaderlevel") == 0) { + } else if (strcmp(m->key, "bibtex") == 0) { + } else if (strcmp(m->key, "css") == 0) { + } else if (strcmp(m->key, "htmlfooter") == 0) { + } else if (strcmp(m->key, "htmlheader") == 0) { + } else if (strcmp(m->key, "htmlheaderlevel") == 0) { + } else if (strcmp(m->key, "lang") == 0) { + } else if (strcmp(m->key, "language") == 0) { + } else if (strcmp(m->key, "latexbegin") == 0) { + } else if (strcmp(m->key, "latexconfig") == 0) { + } else if (strcmp(m->key, "latexfooter") == 0) { + } else if (strcmp(m->key, "latexheaderlevel") == 0) { + } else if (strcmp(m->key, "latexinput") == 0) { + } else if (strcmp(m->key, "latexleader") == 0) { + } else if (strcmp(m->key, "latexmode") == 0) { + } else if (strcmp(m->key, "mmdfooter") == 0) { + } else if (strcmp(m->key, "mmdheader") == 0) { + } else if (strcmp(m->key, "quoteslanguage") == 0) { + } else if (strcmp(m->key, "title") == 0) { + print_const("\t"); + mmd_print_string_odf(out, m->value); + print_const("\n"); + } else if (strcmp(m->key, "transcludebase") == 0) { + } else if (strcmp(m->key, "xhtmlheader") == 0) { + print(m->value); + print_char('\n'); + } else if (strcmp(m->key, "xhtmlheaderlevel") == 0) { + } else { + print_const("\tkey); + print_const("\">"); + mmd_print_string_odf(out, m->value); + print_const("\n"); + } + } + if (scratch->meta_hash) + print_const("\n"); print_const("\n\n"); } diff --git a/tests/MMD6Tests/Advanced Emph and Strong.fodt b/tests/MMD6Tests/Advanced Emph and Strong.fodt index 84bac2e..421c51b 100644 --- a/tests/MMD6Tests/Advanced Emph and Strong.fodt +++ b/tests/MMD6Tests/Advanced Emph and Strong.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Advanced Fenced Code Blocks.fodt b/tests/MMD6Tests/Advanced Fenced Code Blocks.fodt index 8ef1242..b9a4141 100644 --- a/tests/MMD6Tests/Advanced Fenced Code Blocks.fodt +++ b/tests/MMD6Tests/Advanced Fenced Code Blocks.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Advanced Headers.fodt b/tests/MMD6Tests/Advanced Headers.fodt index a104bda..9b83c1f 100644 --- a/tests/MMD6Tests/Advanced Headers.fodt +++ b/tests/MMD6Tests/Advanced Headers.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Amps and Angles.fodt b/tests/MMD6Tests/Amps and Angles.fodt index 4e0062c..971eeca 100644 --- a/tests/MMD6Tests/Amps and Angles.fodt +++ b/tests/MMD6Tests/Amps and Angles.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Automatic Links.fodt b/tests/MMD6Tests/Automatic Links.fodt index 1c698cb..d9956ae 100644 --- a/tests/MMD6Tests/Automatic Links.fodt +++ b/tests/MMD6Tests/Automatic Links.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Basic Blocks.fodt b/tests/MMD6Tests/Basic Blocks.fodt index 10fab23..193b13a 100644 --- a/tests/MMD6Tests/Basic Blocks.fodt +++ b/tests/MMD6Tests/Basic Blocks.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Blockquotes.fodt b/tests/MMD6Tests/Blockquotes.fodt index 6340496..d39f22f 100644 --- a/tests/MMD6Tests/Blockquotes.fodt +++ b/tests/MMD6Tests/Blockquotes.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Citations.fodt b/tests/MMD6Tests/Citations.fodt new file mode 100644 index 0000000..0556572 --- /dev/null +++ b/tests/MMD6Tests/Citations.fodt @@ -0,0 +1,302 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + +citep + +John Doe. A Totally Fake Book. Vanity Press, 2006. + + +1[] + +1 + +1 + +1 + +1John Doe. A Totally Fake Book. Vanity Press, 2006. + + +citet + +1 + +1[] + +1 + +1 + +1 + +12 + +2 + + + diff --git a/tests/MMD6Tests/Code Spans.fodt b/tests/MMD6Tests/Code Spans.fodt index b44ab31..e7cc070 100644 --- a/tests/MMD6Tests/Code Spans.fodt +++ b/tests/MMD6Tests/Code Spans.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/CriticMarkup.fodt b/tests/MMD6Tests/CriticMarkup.fodt new file mode 100644 index 0000000..6102946 --- /dev/null +++ b/tests/MMD6Tests/CriticMarkup.fodt @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + +foo + +bar + +foobar + +foo + +bar + +5 + +foo bar + +foo bar + +foo foobar + +foo bar + +foo bar + +10 + +foo bar + +foo bar + +foo barbar + +foo bar + +foo bar + +15 + +foo bar + +foo bar + +foo foobar + +foo bar + +foo bar + +20 + +foo **bar** + +foo **bar** + +foo **foo**bar** + +foo **bar** + +foo **bar** + +25 + +foo bar + +foo bar + +foo bar + + + diff --git a/tests/MMD6Tests/Cross-References.fodt b/tests/MMD6Tests/Cross-References.fodt index da489de..d902c5b 100644 --- a/tests/MMD6Tests/Cross-References.fodt +++ b/tests/MMD6Tests/Cross-References.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Dutch.fodt b/tests/MMD6Tests/Dutch.fodt new file mode 100644 index 0000000..9378619 --- /dev/null +++ b/tests/MMD6Tests/Dutch.fodt @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + + + +‘foo’ + +„foo” + +foo’s + +foo — bar + +foo – bar + +5 + +foo… + +foo + +foo + + + diff --git a/tests/MMD6Tests/Edge Cases 2.fodt b/tests/MMD6Tests/Edge Cases 2.fodt index f9f28ba..17bb7e7 100644 --- a/tests/MMD6Tests/Edge Cases 2.fodt +++ b/tests/MMD6Tests/Edge Cases 2.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Edge Cases.fodt b/tests/MMD6Tests/Edge Cases.fodt index bd4c8f2..ea21ffa 100644 --- a/tests/MMD6Tests/Edge Cases.fodt +++ b/tests/MMD6Tests/Edge Cases.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Emph and Strong Star.fodt b/tests/MMD6Tests/Emph and Strong Star.fodt index b0cfde0..1af889b 100644 --- a/tests/MMD6Tests/Emph and Strong Star.fodt +++ b/tests/MMD6Tests/Emph and Strong Star.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Emph and Strong UL.fodt b/tests/MMD6Tests/Emph and Strong UL.fodt index bb56c4b..4e17e33 100644 --- a/tests/MMD6Tests/Emph and Strong UL.fodt +++ b/tests/MMD6Tests/Emph and Strong UL.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/English.fodt b/tests/MMD6Tests/English.fodt new file mode 100644 index 0000000..1f02187 --- /dev/null +++ b/tests/MMD6Tests/English.fodt @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + + + +‘foo’ + +“foo” + +foo’s + +foo — bar + +foo – bar + +5 + +foo… + +foo + +foo + + + diff --git a/tests/MMD6Tests/Escapes.fodt b/tests/MMD6Tests/Escapes.fodt index 471c686..182ab81 100644 --- a/tests/MMD6Tests/Escapes.fodt +++ b/tests/MMD6Tests/Escapes.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Fenced Code Blocks.fodt b/tests/MMD6Tests/Fenced Code Blocks.fodt index 4936dd6..baa1b9c 100644 --- a/tests/MMD6Tests/Fenced Code Blocks.fodt +++ b/tests/MMD6Tests/Fenced Code Blocks.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Figure Images.fodt b/tests/MMD6Tests/Figure Images.fodt index e420bbb..757e57b 100644 --- a/tests/MMD6Tests/Figure Images.fodt +++ b/tests/MMD6Tests/Figure Images.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/French.fodt b/tests/MMD6Tests/French.fodt new file mode 100644 index 0000000..0b81ce4 --- /dev/null +++ b/tests/MMD6Tests/French.fodt @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + + + +'foo’ + +«foo» + +foo’s + +foo — bar + +foo – bar + +5 + +foo… + +foo + +foo + + + diff --git a/tests/MMD6Tests/German Guillemets.fodt b/tests/MMD6Tests/German Guillemets.fodt new file mode 100644 index 0000000..bff55c5 --- /dev/null +++ b/tests/MMD6Tests/German Guillemets.fodt @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + + + +›foo‹ + +»foo« + +foo’s + +foo — bar + +foo – bar + +5 + +foo… + +foo + +foo + + + diff --git a/tests/MMD6Tests/German.fodt b/tests/MMD6Tests/German.fodt new file mode 100644 index 0000000..c5ced57 --- /dev/null +++ b/tests/MMD6Tests/German.fodt @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + + + +‚foo‘ + +„foo“ + +foo’s + +foo — bar + +foo – bar + +5 + +foo… + +foo + +foo + + + diff --git a/tests/MMD6Tests/HTML Blocks.fodt b/tests/MMD6Tests/HTML Blocks.fodt index 7ac1ca7..b5540b5 100644 --- a/tests/MMD6Tests/HTML Blocks.fodt +++ b/tests/MMD6Tests/HTML Blocks.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/HTML Inline.fodt b/tests/MMD6Tests/HTML Inline.fodt index 5f512e3..a222978 100644 --- a/tests/MMD6Tests/HTML Inline.fodt +++ b/tests/MMD6Tests/HTML Inline.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Headers.fodt b/tests/MMD6Tests/Headers.fodt index 97f2c01..06ecf91 100644 --- a/tests/MMD6Tests/Headers.fodt +++ b/tests/MMD6Tests/Headers.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Horizontal Rules.fodt b/tests/MMD6Tests/Horizontal Rules.fodt index 0d0cbb1..8d3b5cb 100644 --- a/tests/MMD6Tests/Horizontal Rules.fodt +++ b/tests/MMD6Tests/Horizontal Rules.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Indented Code Blocks.fodt b/tests/MMD6Tests/Indented Code Blocks.fodt index 90c4bf7..74918e7 100644 --- a/tests/MMD6Tests/Indented Code Blocks.fodt +++ b/tests/MMD6Tests/Indented Code Blocks.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Inline Footnotes.fodt b/tests/MMD6Tests/Inline Footnotes.fodt new file mode 100644 index 0000000..6c94be3 --- /dev/null +++ b/tests/MMD6Tests/Inline Footnotes.fodt @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + +Inline.foo bar + +Inline.foo bar +foo +foo. + + + diff --git a/tests/MMD6Tests/Inline Images.fodt b/tests/MMD6Tests/Inline Images.fodt index 669424c..6dba02b 100644 --- a/tests/MMD6Tests/Inline Images.fodt +++ b/tests/MMD6Tests/Inline Images.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Inline Links.fodt b/tests/MMD6Tests/Inline Links.fodt index 7e8d93b..c7dcfa2 100644 --- a/tests/MMD6Tests/Inline Links.fodt +++ b/tests/MMD6Tests/Inline Links.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Linebreaks.fodt b/tests/MMD6Tests/Linebreaks.fodt index e1c12a1..bf03ed2 100644 --- a/tests/MMD6Tests/Linebreaks.fodt +++ b/tests/MMD6Tests/Linebreaks.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Link Attributes.fodt b/tests/MMD6Tests/Link Attributes.fodt index 51011fb..19fba0d 100644 --- a/tests/MMD6Tests/Link Attributes.fodt +++ b/tests/MMD6Tests/Link Attributes.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Math.fodt b/tests/MMD6Tests/Math.fodt new file mode 100644 index 0000000..a090829 --- /dev/null +++ b/tests/MMD6Tests/Math.fodt @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + +foo \({e}^{i\pi }+1=0\) bar + +\[ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} \] + +foo \({e}^{i\pi }+1=0\) bar + +foo \({e}^{i\pi }+1=0\), bar + +\[{x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}\] + +5 + +foo $ {e}^{i\pi }+1=0$ bar + +$$ {x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$$ + +foo ${e}^{i\pi }+1=0 $ bar + +$${x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a} $$ + +foo a${e}^{i\pi }+1=0$ bar + +10 + +a$${x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$$ + +foo ${e}^{i\pi }+1=0$b bar + +$${x}_{1,2}=\frac{-b\pm \sqrt{{b}^{2}-4ac}}{2a}$$b + +\(\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\) + +\[\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\] + +15 + +\(\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\) + +\[\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\] + +\(\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}\) + +\[\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}\] + +\(\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}\) + +20 + +\[\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation}\] + +\begin{equation}\nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{equation} + + + diff --git a/tests/MMD6Tests/Reference Footnotes.fodt b/tests/MMD6Tests/Reference Footnotes.fodt new file mode 100644 index 0000000..dc90fb2 --- /dev/null +++ b/tests/MMD6Tests/Reference Footnotes.fodt @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + +foo.foo + +foo.foo +bar + +foo.foo + +bar + + + +bat + + + + + diff --git a/tests/MMD6Tests/Reference Images.fodt b/tests/MMD6Tests/Reference Images.fodt index ec4dfd3..7d42d69 100644 --- a/tests/MMD6Tests/Reference Images.fodt +++ b/tests/MMD6Tests/Reference Images.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Reference Links.fodt b/tests/MMD6Tests/Reference Links.fodt index 003c175..2255e08 100644 --- a/tests/MMD6Tests/Reference Links.fodt +++ b/tests/MMD6Tests/Reference Links.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Setext Headers.fodt b/tests/MMD6Tests/Setext Headers.fodt index 110fba9..d86d90b 100644 --- a/tests/MMD6Tests/Setext Headers.fodt +++ b/tests/MMD6Tests/Setext Headers.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Smart Quotes.fodt b/tests/MMD6Tests/Smart Quotes.fodt index 9495eb3..b569547 100644 --- a/tests/MMD6Tests/Smart Quotes.fodt +++ b/tests/MMD6Tests/Smart Quotes.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Special Characters.fodt b/tests/MMD6Tests/Special Characters.fodt index 66c8f3e..4f3e14b 100644 --- a/tests/MMD6Tests/Special Characters.fodt +++ b/tests/MMD6Tests/Special Characters.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Superscript.fodt b/tests/MMD6Tests/Superscript.fodt index 9b59f7d..65d2dde 100644 --- a/tests/MMD6Tests/Superscript.fodt +++ b/tests/MMD6Tests/Superscript.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Swedish.fodt b/tests/MMD6Tests/Swedish.fodt new file mode 100644 index 0000000..aa4c500 --- /dev/null +++ b/tests/MMD6Tests/Swedish.fodt @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + + + +’foo’ + +”foo” + +foo’s + +foo — bar + +foo – bar + +5 + +foo… + +foo + +foo + + + diff --git a/tests/MMD6Tests/Transclusion.fodt b/tests/MMD6Tests/Transclusion.fodt index d96c1f0..763b02f 100644 --- a/tests/MMD6Tests/Transclusion.fodt +++ b/tests/MMD6Tests/Transclusion.fodt @@ -120,6 +120,18 @@ + + + + + + + + + + + + diff --git a/tests/MMD6Tests/Variables.fodt b/tests/MMD6Tests/Variables.fodt new file mode 100644 index 0000000..2bdf7ae --- /dev/null +++ b/tests/MMD6Tests/Variables.fodt @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bibliography + + + + bar foo bar foo bar + **foo** + + + +foo:bar + +bar foo bar foo bar + +[%bar] + +**foo** + + + -- 2.40.0