]> granicus.if.org Git - multimarkdown/commitdiff
UPDATED: Keep working on RTF
authorFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 31 Dec 2018 02:18:32 +0000 (21:18 -0500)
committerFletcher T. Penney <fletcher@fletcherpenney.net>
Mon, 31 Dec 2018 02:18:32 +0000 (21:18 -0500)
68 files changed:
Sources/libMultiMarkdown/rtf.c
tests/MMD6Tests/Abbreviations.rtf [new file with mode: 0644]
tests/MMD6Tests/Advanced Emph and Strong.rtf [new file with mode: 0644]
tests/MMD6Tests/Advanced Fenced Code Blocks.rtf [new file with mode: 0644]
tests/MMD6Tests/Advanced Headers.rtf [new file with mode: 0644]
tests/MMD6Tests/Amps and Angles.rtf [new file with mode: 0644]
tests/MMD6Tests/Automatic Links.rtf [new file with mode: 0644]
tests/MMD6Tests/BOM.rtf [new file with mode: 0644]
tests/MMD6Tests/Basic Blocks.rtf [new file with mode: 0644]
tests/MMD6Tests/Basic Lists.rtf [new file with mode: 0644]
tests/MMD6Tests/BibTeX.rtf [new file with mode: 0644]
tests/MMD6Tests/Blockquotes.rtf [new file with mode: 0644]
tests/MMD6Tests/Citations.rtf [new file with mode: 0644]
tests/MMD6Tests/Code Spans.rtf [new file with mode: 0644]
tests/MMD6Tests/CriticMarkup.rtf [new file with mode: 0644]
tests/MMD6Tests/Cross-References.rtf [new file with mode: 0644]
tests/MMD6Tests/Definition Lists.rtf [new file with mode: 0644]
tests/MMD6Tests/Dutch.rtf [new file with mode: 0644]
tests/MMD6Tests/Edge Cases 2.rtf [new file with mode: 0644]
tests/MMD6Tests/Edge Cases.rtf [new file with mode: 0644]
tests/MMD6Tests/Emph and Strong Star.rtf [new file with mode: 0644]
tests/MMD6Tests/Emph and Strong UL.rtf [new file with mode: 0644]
tests/MMD6Tests/Encoding - Western.rtf [new file with mode: 0644]
tests/MMD6Tests/English.rtf [new file with mode: 0644]
tests/MMD6Tests/Escapes.rtf [new file with mode: 0644]
tests/MMD6Tests/Fenced Code Blocks.rtf [new file with mode: 0644]
tests/MMD6Tests/Figure Images.rtf [new file with mode: 0644]
tests/MMD6Tests/French.rtf [new file with mode: 0644]
tests/MMD6Tests/Fuzz.rtf [new file with mode: 0644]
tests/MMD6Tests/German Guillemets.rtf [new file with mode: 0644]
tests/MMD6Tests/German.rtf [new file with mode: 0644]
tests/MMD6Tests/Glossaries.rtf [new file with mode: 0644]
tests/MMD6Tests/HTML Blocks.rtf [new file with mode: 0644]
tests/MMD6Tests/HTML Comments.rtf [new file with mode: 0644]
tests/MMD6Tests/HTML Inline.rtf [new file with mode: 0644]
tests/MMD6Tests/Headers.rtf [new file with mode: 0644]
tests/MMD6Tests/Horizontal Rules.rtf [new file with mode: 0644]
tests/MMD6Tests/Indented Code Blocks.rtf [new file with mode: 0644]
tests/MMD6Tests/Inline Citations.rtf [new file with mode: 0644]
tests/MMD6Tests/Inline Footnotes.rtf [new file with mode: 0644]
tests/MMD6Tests/Inline Images.rtf [new file with mode: 0644]
tests/MMD6Tests/Inline Links.rtf [new file with mode: 0644]
tests/MMD6Tests/Integrated.rtf [new file with mode: 0644]
tests/MMD6Tests/International.rtf [new file with mode: 0644]
tests/MMD6Tests/Linebreaks.rtf [new file with mode: 0644]
tests/MMD6Tests/Link Attributes.rtf [new file with mode: 0644]
tests/MMD6Tests/Link Variations.rtf [new file with mode: 0644]
tests/MMD6Tests/MMD Header and Footer.rtf [new file with mode: 0644]
tests/MMD6Tests/Markdown Syntax.rtf [new file with mode: 0644]
tests/MMD6Tests/Math.rtf [new file with mode: 0644]
tests/MMD6Tests/Metadata YAML.rtf [new file with mode: 0644]
tests/MMD6Tests/Metadata.rtf [new file with mode: 0644]
tests/MMD6Tests/Nested Definition Lists.rtf [new file with mode: 0644]
tests/MMD6Tests/Nested Lists.rtf [new file with mode: 0644]
tests/MMD6Tests/Raw Source.rtf [new file with mode: 0644]
tests/MMD6Tests/Reference Footnotes.rtf [new file with mode: 0644]
tests/MMD6Tests/Reference Images.rtf [new file with mode: 0644]
tests/MMD6Tests/Reference Links.rtf [new file with mode: 0644]
tests/MMD6Tests/Setext Headers.rtf [new file with mode: 0644]
tests/MMD6Tests/Smart Quotes.rtf [new file with mode: 0644]
tests/MMD6Tests/Spanish.rtf [new file with mode: 0644]
tests/MMD6Tests/Special Characters.rtf [new file with mode: 0644]
tests/MMD6Tests/Superscript.rtf [new file with mode: 0644]
tests/MMD6Tests/Swedish.rtf [new file with mode: 0644]
tests/MMD6Tests/Table of Contents.rtf [new file with mode: 0644]
tests/MMD6Tests/Tables.rtf [new file with mode: 0644]
tests/MMD6Tests/Transclusion.rtf [new file with mode: 0644]
tests/MMD6Tests/Variables.rtf [new file with mode: 0644]

index f03c7e196cc69eba58749403b79a687afcd13718..304632f119588b4abfe567293a6887bc58c62273 100644 (file)
@@ -92,6 +92,16 @@ static char * my_strdup(const char * source) {
 }
 
 
+void mmd_print_char_rtf(DString * out, char c, bool obfuscate, bool line_breaks) {
+       switch (c) {
+               default:
+                       print_char(c);
+
+                       break;
+       }
+}
+
+
 void mmd_print_localized_char_rtf(DString * out, unsigned short type, scratch_pad * scratch) {
        switch (type) {
                case DASH_N:
@@ -475,6 +485,25 @@ static void mmd_export_token_rtf(DString * out, const char * source, token * t,
                        print_const("=");
                        break;
 
+               case ESCAPED_CHARACTER:
+                       if (!(scratch->extensions & EXT_COMPATIBILITY) &&
+                                       (source[t->start + 1] == ' ')) {
+                               print_const("\\~");
+                       } else {
+                               mmd_print_char_rtf(out, source[t->start + 1], false, false);
+                       }
+
+                       break;
+
+               case HASH1:
+               case HASH2:
+               case HASH3:
+               case HASH4:
+               case HASH5:
+               case HASH6:
+                       print_token(t);
+                       break;
+
                case NON_INDENT_SPACE:
                        print_char(' ');
                        break;
diff --git a/tests/MMD6Tests/Abbreviations.rtf b/tests/MMD6Tests/Abbreviations.rtf
new file mode 100644 (file)
index 0000000..12ff2c5
--- /dev/null
@@ -0,0 +1,72 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+ \
+ \
+f-o-o f-o-o\
+ \
+fo\'92o fo\'92o\
+5\
+[>bar] [>bar]\
+[>b.a.r.] [>b.a.r.]\
+[>b-a-r] [>b-a-r]\
+[>b a r] [>b a r]\
+[>ba\'92r] [>ba\'92r]\
+10\
+\
+
+\
+ \
+[>(baz) BAZ]\
+\
+15\
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel     \'97  \'97 bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw    []\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo bar 
+\b0\fs24 \
+\
+
+\b\fs28 foo bar 
+\b0\fs24 \
+\
+foo bar\
+![](http://foobar.net/)\
+20\
+[^ and ]\
+[^note]\
+{\listtext     \'95    }\
+
+\
+FOO\
+F.O.O.\
+F-O-O\
+F O O\
+FO\'92O\
+\
+BAR\
+B.A.R.\
+B-A-R\
+B A R\
+BA\'92R\
+\
+FOO BAR\
+\
+foo and bar\
+}
diff --git a/tests/MMD6Tests/Advanced Emph and Strong.rtf b/tests/MMD6Tests/Advanced Emph and Strong.rtf
new file mode 100644 (file)
index 0000000..d012440
--- /dev/null
@@ -0,0 +1,41 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo\i bar\i0 \
+foo*bar**\
+foo*bar***\
+foo**bar*\
+foo\b bar\b0 \
+5\
+foo**bar***\
+foo***bar*\
+foo***bar**\
+foo\b \i bar\i0 \b0 \
+\i foo\i0 bar\
+10\
+*foo**bar\
+\i foo\i0 bar*\
+\i foo**bar\i0 \
+\i foo\i0 \b bar\b0 \
+\i foo****bar\i0 \
+15\
+\i foo\b bar\b0 foo\i0 \
+**foo*bar\
+\b foo*bar\b0 \
+\b foo\b0 bar**\
+\b foo\b0 \i bar\i0 \
+20\
+\b foo****bar\b0 \
+\b foo foo\i bar\i0 foo foo\b0 \
+\b \i foo\i0 bar\b0 \
+\i \b foo\b0 bar\i0 \
+\i ab\i0 duct instead of ab\i duct\i0 \
+25\
+}
diff --git a/tests/MMD6Tests/Advanced Fenced Code Blocks.rtf b/tests/MMD6Tests/Advanced Fenced Code Blocks.rtf
new file mode 100644 (file)
index 0000000..1e20ea2
--- /dev/null
@@ -0,0 +1,39 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+
+foo *2*
+\
+foo *3*
+\
+foo *4*
+\
+foo *5*
+\
+foo *6*
+\
+5\
+
+foo *3*
+
+\
+foo *4*
+\
+foo *5*
+\
+foo \i 6\i0 \
+10\
+perlfoo
+\
+ perlfoo
+\
+ perl rubyfoo
+\
+}
diff --git a/tests/MMD6Tests/Advanced Headers.rtf b/tests/MMD6Tests/Advanced Headers.rtf
new file mode 100644 (file)
index 0000000..0e8c431
--- /dev/null
@@ -0,0 +1,67 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo  
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo [bar][bat]
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo [bar] 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo [bar][bat]
+\b0\fs24 \
+\
+5\
+foo \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 \i foo\i0  bar 
+\b0\fs24 \
+\
+\i foo
+bar\i0 \
+[bar]\
+[foo][bar]\
+10\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 [%baz] 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo  
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo  
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo  
+\b0\fs24 \
+}
diff --git a/tests/MMD6Tests/Amps and Angles.rtf b/tests/MMD6Tests/Amps and Angles.rtf
new file mode 100644 (file)
index 0000000..57a5b0e
--- /dev/null
@@ -0,0 +1,30 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+AT&T has an ampersand in their name.\
+AT&T is another way to write it.\
+This & that.\
+4 < 5.\
+6 > 5.\
+5\
+Here is a [link][1] with an ampersand in the URL.\
+Here is a link with an amersand in the link text: [AT&T][2].\
+Here is an inline [link](/script%20here?foo=1&bar=2).\
+Here is an inline [link](</script%20here?foo=1&bar=2>).\
+& and & and < and > in code block.10\
+\
+[1]: http://example.com/?foo=1&bar=2\
+[2]: http://att.com/ \'93AT&T\'94\
+ \
+ \
+ \
+15\
+& and & and < and > in code span.\
+}
diff --git a/tests/MMD6Tests/Automatic Links.rtf b/tests/MMD6Tests/Automatic Links.rtf
new file mode 100644 (file)
index 0000000..ae8ee18
--- /dev/null
@@ -0,0 +1,14 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+<http://foo.com/>\
+<foo@bar.com>\
+<mailto:foo@bar.com>\
+}
diff --git a/tests/MMD6Tests/BOM.rtf b/tests/MMD6Tests/BOM.rtf
new file mode 100644 (file)
index 0000000..715991b
--- /dev/null
@@ -0,0 +1,12 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+This file leads with a Byte Order Marker (BOM).\
+}
diff --git a/tests/MMD6Tests/Basic Blocks.rtf b/tests/MMD6Tests/Basic Blocks.rtf
new file mode 100644 (file)
index 0000000..ab7dc3e
--- /dev/null
@@ -0,0 +1,28 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Heading \i foo\i0  
+\b0\fs24 \
+\
+
+\b\fs32 Heading 
+\b0\fs24 \
+\
+foo
+bar\
+5\
+foo
+bar\
+foo
+bar\
+}
diff --git a/tests/MMD6Tests/Basic Lists.rtf b/tests/MMD6Tests/Basic Lists.rtf
new file mode 100644 (file)
index 0000000..0300af1
--- /dev/null
@@ -0,0 +1,44 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foofoo{\listtext       \'95    }foo\
+
+bar\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext      \'95    }foo\
+{\listtext     \'95    }foo\
+{\listtext     \'95    }foo\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 bar\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 foo{\listtext   \'95    }foo\
+{\listtext     \'95    }foo\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 5\
+foofoo{\listtext       \'95    }foo\
+bar\
+{\listtext     \'95    }foo\
+{\listtext     \'95    }foo\
+{\listtext     \'95    }foo\
+bar\
+foo{\listtext  \'95    }foo\
+{\listtext     \'95    }foo\
+10\
+foofoo{\listtext       \'95    }foo\
+bar\
+foofoo{\listtext       \'95    }foo\
+bar\
+foo
+barfoo
+bar{\listtext  \'95    }foo
+bar\
+15\
+}
diff --git a/tests/MMD6Tests/BibTeX.rtf b/tests/MMD6Tests/BibTeX.rtf
new file mode 100644 (file)
index 0000000..f92cd2b
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+
+[#Knuth:1968]\
+[#Knuth:1968;]\
+[#Knuth:1981]\
+[#Knuth:1981;]\
+[#Knuth:1968,Knuth:1981]\
+5\
+[#Knuth:1968,Knuth:1981;]\
+[chap. 2][#Knuth:1981]\
+[chap. 2][#Knuth:1981;]\
+}
diff --git a/tests/MMD6Tests/Blockquotes.rtf b/tests/MMD6Tests/Blockquotes.rtf
new file mode 100644 (file)
index 0000000..e19b4a0
--- /dev/null
@@ -0,0 +1,22 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo
+bar\
+foobar
+foo\
+foobar\
+foo\
+foo
+bar
+ foo\
+bar
+foobar\
+}
diff --git a/tests/MMD6Tests/Citations.rtf b/tests/MMD6Tests/Citations.rtf
new file mode 100644 (file)
index 0000000..b59218e
--- /dev/null
@@ -0,0 +1,40 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 citep 
+\b0\fs24 \
+\
+[#foo1]\
+[#foo1][]\
+[p. 123][#foo1]\
+[][#foo1]\
+[foobar][#foo1]\
+[#foo1][#foo2]\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 citet 
+\b0\fs24 \
+\
+[#foo1;]\
+[#foo1;][]\
+[p. 123][#foo1;]\
+[][#foo1;]\
+[foobar][#foo1;]\
+[#foo1;][#foo2;]\
+
+[Not Cited][#foo3]\
+
+\
+John Doe. \i A Totally Fake Book 1\i0 . Vanity Press, 2006.\
+John Doe. \i A Totally Fake Book 2\i0 . Vanity Press, 2006.\
+John Doe. \i A Totally Fake Book 3\i0 . Vanity Press, 2006.}
diff --git a/tests/MMD6Tests/Code Spans.rtf b/tests/MMD6Tests/Code Spans.rtf
new file mode 100644 (file)
index 0000000..e7ec5b3
--- /dev/null
@@ -0,0 +1,34 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo\
+ foo  bar \
+  \
+foobar\
+foo\
+5\
+foo\
+
+foo
+\
+foo bar
+baz\
+foo  bar\
+ foo\
+10\
+ foo bar \
+*foo*\
+[foo]\
+-<>\'96&\'97\'85\
+ foo \
+15\
+foo << bar\
+#foo\
+}
diff --git a/tests/MMD6Tests/CriticMarkup.rtf b/tests/MMD6Tests/CriticMarkup.rtf
new file mode 100644 (file)
index 0000000..53f5923
--- /dev/null
@@ -0,0 +1,56 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+{++foo++}\
+{--bar--}\
+{~~foobar~~}\
+{&gt;&gt;foo&lt;&lt;}\
+{==bar==}\
+5\
+foo{++ bar++}\
+foo{-- bar--}\
+foo {~~foobar~~}\
+foo {&gt;&gt;bar&lt;&lt;}\
+foo {==bar==}\
+10\
+foo{++ \b bar\b0 ++}\
+foo{-- \b bar\b0 --}\
+foo {~~\b bar\b0 \b bar\b0 ~~}\
+foo {&gt;&gt;\b bar\b0 &lt;&lt;}\
+foo {==\b bar\b0 ==}\
+15\
+foo \b {++bar++}\b0 \
+foo \b {--bar--}\b0 \
+foo \b {~~foobar~~}\b0 \
+foo \b {&gt;&gt;bar&lt;&lt;}\b0 \
+foo \b {==bar==}\b0 \
+20\
+foo **{++bar**++}\
+foo **{--bar**--}\
+foo **{~~foo**bar**~~}\
+foo **{&gt;&gt;bar**&lt;&lt;}\
+foo **{==bar**==}\
+25\
+{++foo++}\
+{--bar--}\
+{~~foobar~~}\
+{&gt;&gt;foo&lt;&lt;}\
+{==bar==}\
+30\
+{++foo++}\
+{--bar--}\
+{~~foobar~~}\
+{&gt;&gt;foo&lt;&lt;}\
+{==bar==}\
+35\
+{++foo{++ bar++}++}\
+{--foo{-- bar--}--}\
+{++foo{-- bar--}++}\
+}
diff --git a/tests/MMD6Tests/Cross-References.rtf b/tests/MMD6Tests/Cross-References.rtf
new file mode 100644 (file)
index 0000000..2ece061
--- /dev/null
@@ -0,0 +1,45 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 A Section 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 109&*&#() Can Start With Digit 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Strip out &% characters &* 
+\b0\fs24 \
+\
+[A Section].\
+
+\b\fs32 1 Cross-References: Special Characters!@#%&*()<> 
+\b0\fs24 \
+\
+5\
+And now, link to [1 Cross-References: Special Characters!@#%&*()<>][]\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Заголовок по-русски 
+\b0\fs24 \
+\
+И ссылка на [Заголовок по-русски].\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Test 的 Multibyte 
+\b0\fs24 \
+\
+10\
+}
diff --git a/tests/MMD6Tests/Definition Lists.rtf b/tests/MMD6Tests/Definition Lists.rtf
new file mode 100644 (file)
index 0000000..b696dd9
--- /dev/null
@@ -0,0 +1,20 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foobar*foo barbaz bat*\
+foobar\i foo bar
+bar foo\i0 baz bat\
+bat\i foo\i0 \
+foo*foo bar
+bar foobaz* bat\
+foo\
+:foo
+\
+}
diff --git a/tests/MMD6Tests/Dutch.rtf b/tests/MMD6Tests/Dutch.rtf
new file mode 100644 (file)
index 0000000..d2848e7
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'91foo\'92\
+\'93foo\'94\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/Edge Cases 2.rtf b/tests/MMD6Tests/Edge Cases 2.rtf
new file mode 100644 (file)
index 0000000..c085df6
--- /dev/null
@@ -0,0 +1,82 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 
+\b b\b0 , \i u\i0 , \b v\b0 , \i \b w\b0 \i0 , \i \b x\b0 \i0 , \b \i y\i0 \b0 , \b \i z\i0 \b0 , \i t \b w\b0  t\i0 \
+}
diff --git a/tests/MMD6Tests/Edge Cases.rtf b/tests/MMD6Tests/Edge Cases.rtf
new file mode 100644 (file)
index 0000000..6da01ce
--- /dev/null
@@ -0,0 +1,55 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+{\listtext     \'95    }foo
+bar\
+foo{\listtext  \'95    }bar\
+foo{\listtext  \'95    }bar\
+foo{\listtext  \'95    }bar\
+foobar\
+5\
+foo\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 bar
+\b0\fs24 \
+\
+foo
+bar\
+The \b \i quick\i0 \b0  brown \b \i fox\i0 \b0  jumped\
+The \b \i quick\i0 \b0  brown fox jumped\
+The \i \b quick\b0  brown fox\i0  jumped\
+10\
+The \b \i quick\i0  brown fox\b0  jumped\
+The \b \i quick\i0  brown \i fox\i0 \b0  jumped\
+The \i \b quick\b0  brown \b fox\b0 \i0  jumped\
+This \i should\i0  be parsed \'96 fo***o\
+\i test this\i0 thing\
+15\
+test thisthing\
+\b test this\b0 thing\
+test thisthing\
+\b \i test this\i0 \b0 thing\
+test thisthing\
+20\
+This is \b \i another\i0  test\b0  of \i italics\i0  and \b bold\b0 .\
+This is \b \i another\i0  test\b0  of \b bold\b0  and \i italics\i0 .\
+This is \i \b another\b0  test\i0  of \b bold\b0  and \i italics\i0 .\
+This is \i \b another\b0  test\i0  of \i italics\i0  and \b bold\b0 .\
+This is \b \i another\i0  test\b0  of \i italics\i0  and \b bold\b0 .\
+25\
+This is \b \i another\i0  test\b0  of \b bold\b0  and \i italics\i0 .\
+This is \i \b another\b0  test\i0  of \b bold\b0  and \i italics\i0 .\
+This is \i \b another\b0  test\i0  of \i italics\i0  and \b bold\b0 .\
+*a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a *a\
+[foo *bar] foo* \i bar\i0 \
+30\
+\
+[foo *bar]: http://foo.bar\
+}
diff --git a/tests/MMD6Tests/Emph and Strong Star.rtf b/tests/MMD6Tests/Emph and Strong Star.rtf
new file mode 100644 (file)
index 0000000..dcb2c2b
--- /dev/null
@@ -0,0 +1,150 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\i foo\i0 \
+*\i foo\i0 \
+\i foo\i0 *\
+\i foo bar\i0 \
+\i foo\i0  bar\
+5\
+foo \i bar\i0 \
+\b foo\b0 \
+\b foo bar\b0 \
+\b foo\b0  bar\
+foo \b bar\b0 \
+10\
+\i foo \i bar\i0  foo\i0 \
+\i foo \b bar\b0  foo\i0 \
+\i foo \b \i bar\i0 \b0  foo\i0 \
+\b foo \i bar\i0  foo\b0 \
+\b foo \b bar\b0  foo\b0 \
+15\
+\b foo \b \i bar\i0 \b0  foo\b0 \
+\b \i foo \i bar\i0  foo\i0 \b0 \
+\b \i foo \b bar\b0  foo\i0 \b0 \
+\b \i foo \b \i bar\i0 \b0  foo\i0 \b0 \
+\b \i foo\i0 \b0 \
+20\
+\i \b foo\b0  bar\i0 \
+\b \i foo\i0  bar\b0 \
+\i foo \b bar\b0 \i0 \
+\b foo \i bar\i0 \b0 \
+\i foo\i0 bar*\
+25\
+\i foo \i bar \i foo \i bar\i0 \i0 \i0 \i0 \
+\i \i \i \i foo\i0  bar\i0  foo\i0  bar\i0 \
+\i foo bar\i0 bar\
+\b foo bar\b0 bar\
+\b \i foo bar\i0 \b0 bar\
+30\
+foo\i bar\i0 foo\
+foo\b bar\b0 foo\
+foo\b \i bar\i0 \b0 foo\
+foo\i bar\i0 foo\
+\b foo \i foobarfoo\i0  foo\b0 \
+35\
+foo\b *bar*\b0 \
+*(\i foo\i0 )\
+\i foo\i0 :\
+\b foo\b0 :\
+\b \i foo\i0 \b0 :\
+40\
+foo*bar\
+foo\i bar foo\i0 bar\
+foo**bar\
+foo\b bar foo\b0 bar\
+foo***bar\
+45\
+foo\b \i bar foo\i0 \b0 bar\
+foo \b - bar\b0 \
+foo \b 1. bar\b0 \
+\b foo:\b0  bar\
+\i foo [bar]\i0 \
+50\
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+*foo
+\i foo\i0 \
+}
diff --git a/tests/MMD6Tests/Emph and Strong UL.rtf b/tests/MMD6Tests/Emph and Strong UL.rtf
new file mode 100644 (file)
index 0000000..4dae84c
--- /dev/null
@@ -0,0 +1,150 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\i foo\i0 \
+\i foo\i0 \
+\i foo\i0 \
+\i foo bar\i0 \
+\i foo\i0  bar\
+5\
+foo \i bar\i0 \
+\b foo\b0 \
+\b foo bar\b0 \
+\b foo\b0  bar\
+foo \b bar\b0 \
+10\
+\i foo \i bar\i0  foo\i0 \
+\i foo \b bar\b0  foo\i0 \
+\i foo \b \i bar\i0 \b0  foo\i0 \
+\b foo \i bar\i0  foo\b0 \
+\b foo \b bar\b0  foo\b0 \
+15\
+\b foo \b \i bar\i0 \b0  foo\b0 \
+\b \i foo \i bar\i0  foo\i0 \b0 \
+\b \i foo \b bar\b0  foo\i0 \b0 \
+\b \i foo \b \i bar\i0 \b0  foo\i0 \b0 \
+\b \i foo\i0 \b0 \
+20\
+\i \b foo\b0  bar\i0 \
+\b \i foo\i0  bar\b0 \
+\i foo \b bar\b0 \i0 \
+\b foo \i bar\i0 \b0 \
+\i foobar\i0 \
+25\
+\i foo \i bar \i foo \i bar\i0 \i0 \i0 \i0 \
+\i \i \i \i foo\i0  bar\i0  foo\i0  bar\i0 \
+foo barbar\
+foo barbar\
+foo barbar\
+30\
+foobarfoo\
+foobarfoo\
+foobarfoo\
+foobarfoo\
+\b foo \i foobarfoo\i0  foo\b0 \
+35\
+foobar\
+(\i foo\i0 )\
+\i foo\i0 :\
+\b foo\b0 :\
+\b \i foo\i0 \b0 :\
+40\
+foobar\
+foobar foobar\
+foobar\
+foobar foobar\
+foobar\
+45\
+foobar foobar\
+foo \b - bar\b0 \
+foo \b 1. bar\b0 \
+\b foo:\b0  bar\
+\i foo [bar]\i0 \
+50\
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+foo
+\i foo\i0 \
+}
diff --git a/tests/MMD6Tests/Encoding - Western.rtf b/tests/MMD6Tests/Encoding - Western.rtf
new file mode 100644 (file)
index 0000000..1f0ff85
--- /dev/null
@@ -0,0 +1,12 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\9f \8e ¿ \8d\
+}
diff --git a/tests/MMD6Tests/English.rtf b/tests/MMD6Tests/English.rtf
new file mode 100644 (file)
index 0000000..d2848e7
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'91foo\'92\
+\'93foo\'94\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/Escapes.rtf b/tests/MMD6Tests/Escapes.rtf
new file mode 100644 (file)
index 0000000..6aa6406
--- /dev/null
@@ -0,0 +1,67 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\
+\
+\
+\
+\
+5\
+\
+\
+\
+\
+\
+10\
+\
+\
+\
+\
+\
+15\
+\
+\
+\
+\
+\
+20\
+\
+\
+\
+\
+\
+25\
+\
+\
+\
+\
+\
+30\
+\
+\
+
+
+
+
+    \
+foo\
+35\
+bar\
+foo\
+foo\
+foo\
+foo\
+40\
+foo\
+foobar\
+foo]\
+\
+ \
+}
diff --git a/tests/MMD6Tests/Fenced Code Blocks.rtf b/tests/MMD6Tests/Fenced Code Blocks.rtf
new file mode 100644 (file)
index 0000000..1a203e2
--- /dev/null
@@ -0,0 +1,58 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+*foo*
+\
+*foo*
+
+bar
+\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext      \'95    }foo\
+\i foo\i0 
+\
+{\listtext     \'95    }foo\
+\i foo\i0 
+
+bar
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 \begin{equation}\nabla \times \mathbf{E} = \'96 \frac{\partial \mathbf{B}}{\partial t}\end{equation}
+\
+tex\begin{equation}\nabla \times \mathbf{E} = \'96 \frac{\partial \mathbf{B}}{\partial t}\end{equation}
+\
+5\
+<p>foo</p>\
+foo
+
+bar
+
+ bar
+
+foo
+\
+foo
+bar
+baz
+foo
+ bar
+baz
+
+foo
+bar
+ baz
+\
+foo
+bar
+baz 
+foobar
+baz
+\
+foo}
diff --git a/tests/MMD6Tests/Figure Images.rtf b/tests/MMD6Tests/Figure Images.rtf
new file mode 100644 (file)
index 0000000..5a702f3
--- /dev/null
@@ -0,0 +1,18 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+![foo]\
+![\i bar\i0 ][foo]\
+![\i bar\i0 ][foo] bar\
+![\i foo\i0 ](http://foo.bar/ \'93foo\'94 width=\'9340px\'94 height=\'9320px\'94)\
+![\i foo\i0 ](http://foo.bar/ \'93foo\'94 width=\'9340px\'94)\
+\
+[foo]: http://foo.bar/\'93foo\'94 width=\'9340px\'94 height=\'9320px\'94\
+}
diff --git a/tests/MMD6Tests/French.rtf b/tests/MMD6Tests/French.rtf
new file mode 100644 (file)
index 0000000..266b867
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+'foo\'92\
+\'abfoo\'bb\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/Fuzz.rtf b/tests/MMD6Tests/Fuzz.rtf
new file mode 100644 (file)
index 0000000..05748fd
--- /dev/null
@@ -0,0 +1,36 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Collection of test cases identified by [American fuzzy lop](http://lcamtuf.coredump.cx/afl/).\
+bar~~}\
+list{\listtext \'95    }tems\
+:Escapes \
+[>MM: MultiMarkdown\
+\
+[?term]: A term to be defined.\
+[foo1]\
+[foo2]\
+\
+[foo1]: #ba\
+[foo2]: #bar\
+]: And aÄe footn.IThi1. \
+[MMD]:\
+f  f \
+\
+F O O\
+foo{\listtext  \'95    }foo\
+
+
+(This must be at end of file without trailing newline)\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 A
+\b0\fs24 \
+}
diff --git a/tests/MMD6Tests/German Guillemets.rtf b/tests/MMD6Tests/German Guillemets.rtf
new file mode 100644 (file)
index 0000000..36c41e0
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'9bfoo\'8b\
+\'bbfoo\'ab\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/German.rtf b/tests/MMD6Tests/German.rtf
new file mode 100644 (file)
index 0000000..d2848e7
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'91foo\'92\
+\'93foo\'94\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/Glossaries.rtf b/tests/MMD6Tests/Glossaries.rtf
new file mode 100644 (file)
index 0000000..fcfd15b
--- /dev/null
@@ -0,0 +1,44 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+ \
+ \
+f-o-o f-o-o\
+ \
+fo\'92o fo\'92o\
+5\
+[?] [?]\
+[?] [?]\
+[?b-a-r] [?b-a-r]\
+[?] [?]\
+[?ba\'92r] [?ba\'92r]\
+10\
+\
+
+\
+ \
+[?(baz) BAZ]\
+
+
+\
+FOO\
+F.O.O.\
+F\'96O\'96O\
+F O O\
+FO'O\
+\
+BAR\
+B.A.R.\
+B\'96A\'96R\
+B A R\
+BA'R\
+\
+FOO BAR\
+BAR FOO}
diff --git a/tests/MMD6Tests/HTML Blocks.rtf b/tests/MMD6Tests/HTML Blocks.rtf
new file mode 100644 (file)
index 0000000..e624257
--- /dev/null
@@ -0,0 +1,85 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+<del>\i bar1\i0 </del>\
+<del>
+*bar2*
+</del>\
+foo
+<del>
+\i bar3\i0 
+</del>\
+<del>
+*bar4*\
+</del>\
+
+<del>\
+\i bar5\i0 \
+</del>\
+5\
+<div>*bar1*</div>\
+<div>*bar2*
+</div>\
+foo<div>*bar3*
+</div>\
+<div>*bar4*\
+</div>\
+
+<div>\
+\i bar5\i0 \
+</div>\
+10\
+<div>foo1 
+[foo][foo1]
+</div>\
+<div>\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo2 
+\b0\fs24 \
+\
+[foo][foo2]\
+</div>\
+ This is a *comment* \
+ This is a
+longer
+*comment* \
+
+This
+
+is
+
+a comment
+\
+15\
+ This is not a\
+\i comment\i0  \
+<div><div>**foo1**
+</div></div>\
+
+<div>\
+<div>**foo2**
+</div>\
+</div>\
+
+<div>\
+<div>\
+\b foo3\b0 \
+</div>\
+</div>\
+
+<div>\
+<div>**foo4**
+</div>\
+</div>\
+20\
+<div><div>\
+\b foo5\b0 </div></div>\
+}
diff --git a/tests/MMD6Tests/HTML Comments.rtf b/tests/MMD6Tests/HTML Comments.rtf
new file mode 100644 (file)
index 0000000..33542e0
--- /dev/null
@@ -0,0 +1,39 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo  \i bar\i0  \
+foo 
+\i bar\i0  \
+foo 
+\i bar\i0 
+\
+foo 
+\i bar\i0 \
+\
+foo \
+\i bar\i0 \
+\
+5\
+ *foo* 
+
+*foo*
+
+\
+foo \
+\i bar\i0  \
+ \i foo\i0 \
+\i bar\i0 \
+\
+\i foo\i0 \
+
+
+*foo*  *bar*
+
+*foo*}
diff --git a/tests/MMD6Tests/HTML Inline.rtf b/tests/MMD6Tests/HTML Inline.rtf
new file mode 100644 (file)
index 0000000..2abdb2e
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+<foo>\i bar\i0 </foo>\
+<foo bar=\'93foo\'94>\i bar\i0 </foo>\
+
+<div>
+foo
+</div>test. Comment \
+test. Comment
+with
+multiple
+lines. \
+}
diff --git a/tests/MMD6Tests/Headers.rtf b/tests/MMD6Tests/Headers.rtf
new file mode 100644 (file)
index 0000000..4933f26
--- /dev/null
@@ -0,0 +1,69 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo 
+\b0\fs24 \
+\
+foo 5\
+#foo\
+#foo \
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo bar
+\b0\fs24 \
+\
+ foo \
+
+\b\fs32 foo 
+\b0\fs24 \
+\
+10\
+
+\b\fs28 foo 
+\b0\fs24 \
+\
+
+\i\b\fs26 foo 
+\i0\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b \cf0 foo 
+\b0 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\i\b \cf0 foo 
+\i0\b0 \
+\
+#foo #\
+15\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\i\b \cf0 foo 
+\i0\b0 \
+}
diff --git a/tests/MMD6Tests/Horizontal Rules.rtf b/tests/MMD6Tests/Horizontal Rules.rtf
new file mode 100644 (file)
index 0000000..0791657
--- /dev/null
@@ -0,0 +1,44 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Dashes:\
+\'97\
+\'97\
+\'97\
+\'97\
+\'975\
+\'96 \'96 \'96\
+\'96 \'96 \'96\
+\'96 \'96 \'96\
+\'96 \'96 \'96\
+\'96 \'96 \'9610\
+Asterisks:\
+***\
+***\
+***\
+***\
+***15\
+* * *\
+* * *\
+* * *\
+* * *\
+* * *20\
+Underscores:\
+\
+\
+\
+\
+25\
+  \
+  \
+  \
+  \
+  30\
+}
diff --git a/tests/MMD6Tests/Indented Code Blocks.rtf b/tests/MMD6Tests/Indented Code Blocks.rtf
new file mode 100644 (file)
index 0000000..2f52663
--- /dev/null
@@ -0,0 +1,33 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foofoo\
+barfoo\
+foo\
+5\
+foo\
+foo\
+barfoo\
+bar10\
+foo\
+bar
+barfoo\
+bar15\
+foo
+bar
+bar\
+foo\
+barfoo\
+bar
+
+bar
+
+barfoo\
+\'96<>\'96&\'97\'85}
diff --git a/tests/MMD6Tests/Inline Citations.rtf b/tests/MMD6Tests/Inline Citations.rtf
new file mode 100644 (file)
index 0000000..19729da
--- /dev/null
@@ -0,0 +1,13 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Inline. [#John Doe. \i A Totally Fake Book 1\i0 . Vanity Press, 2006.]
+[#John Doe. \i A Totally Fake Book 2\i0 . Vanity Press, 2006.]\
+}
diff --git a/tests/MMD6Tests/Inline Footnotes.rtf b/tests/MMD6Tests/Inline Footnotes.rtf
new file mode 100644 (file)
index 0000000..d7694f5
--- /dev/null
@@ -0,0 +1,17 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Inline.[^foo \i bar\i0 ]\
+Inline.[^foo \i bar\i0 
+[foo](/bar)
+\b foo\b0 .]\
+Inline.[^foo \i bar\i0 ]\
+Inline.[^foo][^foo][^bar]\
+}
diff --git a/tests/MMD6Tests/Inline Images.rtf b/tests/MMD6Tests/Inline Images.rtf
new file mode 100644 (file)
index 0000000..9594487
--- /dev/null
@@ -0,0 +1,25 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Just a ![URL](/url/).\
+![URL and title](/url/ \'93title\'94).\
+![URL and title](/url/ \'93title preceded by two spaces\'94).\
+![URL and title](/url/ \'93title preceded by a tab\'94).\
+![URL and title](/url/ \'93title has spaces afterward\'94 ).\
+5\
+[Empty]().\
+![\b URL\b0  and \i title\i0 ](/url/ \'93title\'94).\
+![URL and title](/url/ \'93title\'94).\
+![URL and title](/url/ \'91title\'92).\
+![URL and title](/url/ (title)).\
+10\
+![URL and title](/url/ \'93\'94).\
+![URL and title](/url/ \'93\i title\i0 \'94).\
+}
diff --git a/tests/MMD6Tests/Inline Links.rtf b/tests/MMD6Tests/Inline Links.rtf
new file mode 100644 (file)
index 0000000..545a470
--- /dev/null
@@ -0,0 +1,34 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Just a [URL](http://url/file.txt).\
+[URL and title](/url/file.txt \'93title\'94).\
+[URL and title](/url/file.txt \'93title preceded by two spaces\'94).\
+[URL and title](/url/file.txt\'93title preceded by a tab\'94).\
+[URL and title](/url/file.txt \'93title has spaces afterward\'94 ).\
+5\
+[Empty]().\
+[\b URL\b0  and \i title\i0 ](/url/file.txt \'93title\'94).\
+[URL and title](/url/file.txt \'93title\'94).\
+[URL and title](/url/file.txt \'91title\'92).\
+[URL and title](/url/file.txt (title)).\
+10\
+[URL and title](/url/file.txt \'93\'94).\
+[URL and title](/url/file.txt \'93\i title\i0 \'94).\
+[URL and title] (/url/file.txt \'93\i title\i0 \'94).\
+[URL and title]
+(/url/file.txt \'93\i title\i0 \'94).\
+[URL and title]( /url/file.txt \'93title\'94).\
+15\
+[URL and title](/url/file.txt \'93title\'94).\
+[URL and title](</url/file.txt> \'93title\'94).\
+[URL and title]( </url/file.txt> \'93title\'94).\
+[URL and title]( </url/file.txt> \'93title\'94).\
+}
diff --git a/tests/MMD6Tests/Integrated.rtf b/tests/MMD6Tests/Integrated.rtf
new file mode 100644 (file)
index 0000000..f09eb0e
--- /dev/null
@@ -0,0 +1,124 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+This file is a designed as a single test that incorporates most of the
+\i commonly\i0  used MultiMarkdown features. This allows a single test file to
+identify common structures that are not supported yet \'96 particularly useful
+when developing a new output format.\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Basic Blocks 
+\b0\fs24 \
+\
+paragraph\
+list{\listtext \'95    }items\
+fenced
+code
+\
+indented
+codeblockquote\
+code span\
+
+\i emph\i0  and \b strong\b0  and \b \i both\i0 \b0 \
+\i emph\i0  and \b strong\b0  and \b \i both\i0 \b0 \
+
+Escapes \
+{\listtext     \'95    }\
+{\listtext     \'95    }\
+{\listtext     \'95    }\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Footnotes 
+\b0\fs24 \
+\
+Foo.[^This is an inline footnote]\
+Bar.[^foot]\
+\
+And a reference footnote.\
+Cite.[#Inline Citation]\
+Cite.[#foo]\
+\
+bar\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Links and Images 
+\b0\fs24 \
+\
+[link](http://foo.net/) and [link]\
+\
+[link]: http://bar.net \'93title\'94 class=\'93custom\'94\
+![test](http://foo.bar/ \'93title\'94 width=\'9340px\'94 height=400px)\
+[Math]\
+[foo][math]\
+[bar][foo1]\
+[bar][foo2]\
+\
+[foo1]: #bar\
+[foo2]: #bar\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Math 
+\b0\fs24 \
+\
+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}\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Smart Quotes 
+\b0\fs24 \
+\
+\'93foo\'94 and \'91bar\'92 \'96 with \'97 dashes\'85\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 CriticMarkup 
+\b0\fs24 \
+\
+{++foo++}\
+{--bar--}\
+{~~foobar~~}\
+{&gt;&gt;foo&lt;&lt;}\
+{==bar==}\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Definition Lists 
+\b0\fs24 \
+\
+foobar*foo barbaz bat*\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Horizontal Rules 
+\b0\fs24 \
+\
+\'97\'96\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Glossary 
+\b0\fs24 \
+\
+[?]\
+\
+A term to be defined.\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Abbreviations
+\b0\fs24 \
+\
+[>MMD]\
+\
+MultiMarkdown\
+}
diff --git a/tests/MMD6Tests/International.rtf b/tests/MMD6Tests/International.rtf
new file mode 100644 (file)
index 0000000..71ff6ad
--- /dev/null
@@ -0,0 +1,13 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+été\
+à la\
+}
diff --git a/tests/MMD6Tests/Linebreaks.rtf b/tests/MMD6Tests/Linebreaks.rtf
new file mode 100644 (file)
index 0000000..fa83792
--- /dev/null
@@ -0,0 +1,20 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo
+bar\
+foo
+bar\
+foobar\
+foobar\
+foobar\
+5\
+foobar\
+}
diff --git a/tests/MMD6Tests/Link Attributes.rtf b/tests/MMD6Tests/Link Attributes.rtf
new file mode 100644 (file)
index 0000000..6b34c86
--- /dev/null
@@ -0,0 +1,26 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo ![image][]\
+foo [link][]\
+foo [link2][]\
+foo [link3][]\
+![test](http://foo.bar/ \'93title\'94 width=\'9340px\'94 height=400px)\
+5\
+
+\
+[image]:http://foo.bar/\'93title\'94width=\'9340px\'94height=400px\
+[link]:<http://foo.bar/1> class=external
+style=\'93border: solid black 1px;\'94\
+[link2]:http://foo.bar/2class=external
+style=\'93border: solid black 1px;\'94\
+[link3]:http://foo.bar/3class=external
+style=\'93border: solid black 1px;\'94\
+}
diff --git a/tests/MMD6Tests/Link Variations.rtf b/tests/MMD6Tests/Link Variations.rtf
new file mode 100644 (file)
index 0000000..7dbd44b
--- /dev/null
@@ -0,0 +1,27 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+
+\b\fs32 Foo Bar 
+\b0\fs24 \
+\
+Link to [Foo Bar].\
+Link to [foo bar].\
+Link to [foobar].\
+Link to [Foo Bar](#foobar).\
+Link to [](#foobar).\
+5\
+Link to [Foo][Foo Bar].\
+[& link](http://example.com/?bar=foo&foo=bar)\
+[\'91%\'92 Link](http://example.com/%25%20link)\
+[\'91#\'92 link](http://example.com/#foo)\
+10\
+[ link](http://example.com/foo)\
+[ link](http://example.com/foo)}
diff --git a/tests/MMD6Tests/MMD Header and Footer.rtf b/tests/MMD6Tests/MMD Header and Footer.rtf
new file mode 100644 (file)
index 0000000..15464b4
--- /dev/null
@@ -0,0 +1,16 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+
+MultiMarkdown \i header\i0 .\
+
+Main Body\
+
+MultiMarkdown \i footer\i0 .}
diff --git a/tests/MMD6Tests/Markdown Syntax.rtf b/tests/MMD6Tests/Markdown Syntax.rtf
new file mode 100644 (file)
index 0000000..faef413
--- /dev/null
@@ -0,0 +1,556 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 Markdown: Syntax 
+\b0\fs24 \
+\
+<ul id="ProjectSubmenu"><li><a href="/projects/markdown/" title="Markdown Project Page">Main</a></li>
+<li><a href="/projects/markdown/basics" title="Markdown Basics">Basics</a></li>
+<li><a class="selected" title="Markdown Syntax Documentation">Syntax</a></li>
+<li><a href="/projects/markdown/license" title="Pricing and License Information">License</a></li>
+<li><a href="/projects/markdown/dingus" title="Online Markdown Web Form">Dingus</a></li>
+</ul>\
+
+[Overview](#overview)[Philosophy](#philosophy)[Inline HTML](#html)[Automatic Escaping for Special Characters](#autoescape)[Block Elements](#block)[Paragraphs and Line Breaks](#p)[Headers](#header)[Blockquotes](#blockquote)[Lists](#list)[Code Blocks](#precode)[Horizontal Rules](#hr)[Span Elements](#span)[Links](#link)[Emphasis](#em)[Code](#code)[Images](#img){\listtext     \'95    }[Miscellaneous](#misc)[Backslash Escapes](#backslash){\listtext        \'95    }[Automatic Links](#autolink)\
+
+\b Note:\b0  This document is itself written using Markdown; you
+can [see the source for it by adding \'91.text\'92 to the URL][src].\
+\
+[src]: /projects/markdown/syntax.text\
+* * *\
+<h2 id="overview">Overview</h2>\
+<h3 id="philosophy">Philosophy</h3>\
+Markdown is intended to be as easy-to-read and easy-to-write as is feasible.\
+Readability, however, is emphasized above all else. A Markdown-formatted
+document should be publishable as-is, as plain text, without looking
+like it\'92s been marked up with tags or formatting instructions. While
+Markdown\'92s syntax has been influenced by several existing text-to-HTML
+filters \'96 including [Setext][1], [atx][2], [Textile][3], [reStructuredText][4],
+[Grutatext][5], and [EtText][6] \'96 the single biggest source of
+inspiration for Markdown\'92s syntax is the format of plain text email.\
+\
+[1]: http://docutils.sourceforge.net/mirror/setext.html\
+[2]: http://www.aaronsw.com/2002/atx/\
+[3]: http://textism.com/tools/textile/\
+[4]: http://docutils.sourceforge.net/rst.html\
+[5]: http://www.triptico.com/software/grutatxt.html\
+[6]: http://ettext.taint.org/doc/\
+To this end, Markdown\'92s syntax is comprised entirely of punctuation
+characters, which punctuation characters have been carefully chosen so
+as to look like what they mean. E.g., asterisks around a word actually
+look like emphasis. Markdown lists look like, well, lists. Even
+blockquotes look like quoted passages of text, assuming you\'92ve ever
+used email.\
+
+
+<h3 id="html">Inline HTML</h3>\
+Markdown\'92s syntax is intended for one purpose: to be used as a
+format for \i writing\i0  for the web.\
+Markdown is not a replacement for HTML, or even close to it. Its
+syntax is very small, corresponding only to a very small subset of
+HTML tags. The idea is \i not\i0  to create a syntax that makes it easier
+to insert HTML tags. In my opinion, HTML tags are already easy to
+insert. The idea for Markdown is to make it easy to read, write, and
+edit prose. HTML is a \i publishing\i0  format; Markdown is a \i writing\i0 
+format. Thus, Markdown\'92s formatting syntax only addresses issues that
+can be conveyed in plain text.\
+For any markup that is not covered by Markdown\'92s syntax, you simply
+use HTML itself. There\'92s no need to preface it or delimit it to
+indicate that you\'92re switching from Markdown to HTML; you just use
+the tags.\
+The only restrictions are that block-level HTML elements \'96 e.g. <div>,
+<table>, <pre>, <p>, etc. \'96 must be separated from surrounding
+content by blank lines, and the start and end tags of the block should
+not be indented with tabs or spaces. Markdown is smart enough not
+to add extra (unwanted) <p> tags around HTML block-level tags.\
+For example, to add an HTML table to a Markdown article:\
+This is a regular paragraph.
+
+<table>
+<tr>
+<td>Foo</td>
+</tr>
+</table>
+
+This is another regular paragraph.Note that Markdown formatting syntax is not processed within block-level
+HTML tags. E.g., you can\'92t use Markdown-style *emphasis* inside an
+HTML block.\
+Span-level HTML tags \'96 e.g. <span>, <cite>, or <del> \'96 can be
+used anywhere in a Markdown paragraph, list item, or header. If you
+want, you can even use HTML tags instead of Markdown formatting; e.g. if
+you\'92d prefer to use HTML <a> or <img> tags instead of Markdown\'92s
+link or image syntax, go right ahead.\
+Unlike block-level HTML tags, Markdown syntax \i is\i0  processed within
+span-level tags.\
+
+<h3 id="autoescape">Automatic Escaping for Special Characters</h3>\
+In HTML, there are two characters that demand special treatment: <
+and &. Left angle brackets are used to start tags; ampersands are
+used to denote HTML entities. If you want to use them as literal
+characters, you must escape them as entities, e.g. , and
+&.\
+Ampersands in particular are bedeviling for web writers. If you want to
+write about \'91AT&T\'92, you need to write \'91AT&T\'92. You even need to
+escape ampersands within URLs. Thus, if you want to link to:\
+http://images.google.com/images?num=30&q=larry+birdyou need to encode the URL as:\
+http://images.google.com/images?num=30&q=larry+birdin your anchor tag href attribute. Needless to say, this is easy to
+forget, and is probably the single most common source of HTML validation
+errors in otherwise well-marked-up web sites.\
+Markdown allows you to use these characters naturally, taking care of
+all the necessary escaping for you. If you use an ampersand as part of
+an HTML entity, it remains unchanged; otherwise it will be translated
+into &.\
+So, if you want to include a copyright symbol in your article, you can write:\
+and Markdown will leave it alone. But if you write:\
+AT&TMarkdown will translate it to:\
+AT&TSimilarly, because Markdown supports [inline HTML](#html), if you use
+angle brackets as delimiters for HTML tags, Markdown will treat them as
+such. But if you write:\
+4 < 5Markdown will translate it to:\
+4  5However, inside Markdown code spans and blocks, angle brackets and
+ampersands are \i always\i0  encoded automatically. This makes it easy to use
+Markdown to write about HTML code. (As opposed to raw HTML, which is a
+terrible format for writing about HTML syntax, because every single <
+and & in your example code needs to be escaped.)\
+
+* * *\
+
+<h2 id="block">Block Elements</h2>\
+
+<h3 id="p">Paragraphs and Line Breaks</h3>\
+A paragraph is simply one or more consecutive lines of text, separated
+by one or more blank lines. (A blank line is any line that looks like a
+blank line \'96 a line containing nothing but spaces or tabs is considered
+blank.) Normal paragraphs should not be indented with spaces or tabs.\
+The implication of the \'93one or more consecutive lines of text\'94 rule is
+that Markdown supports \'93hard-wrapped\'94 text paragraphs. This differs
+significantly from most other text-to-HTML formatters (including Movable
+Type\'92s \'93Convert Line Breaks\'94 option) which translate every line break
+character in a paragraph into a <br /> tag.\
+When you \i do\i0  want to insert a <br /> break tag using Markdown, you
+end a line with two or more spaces, then type return.\
+Yes, this takes a tad more effort to create a <br />, but a simplistic
+\'93every line break is a <br />\'94 rule wouldn\'92t work for Markdown.
+Markdown\'92s email-style [blockquoting][bq] and multi-paragraph [list items][l]
+work best \'96 and look better \'96 when you format them with hard breaks.\
+\
+[bq]: #blockquote\
+[l]: #list\
+
+
+<h3 id="header">Headers</h3>\
+Markdown supports two styles of headers, [Setext][1] and [atx][2].\
+Setext-style headers are \'93underlined\'94 using equal signs (for first-level
+headers) and dashes (for second-level headers). For example:\
+This is an H1
+=============
+
+This is an H2
+\'97\'97\'97\'97\'96Any number of underlining =\'92s or -\'92s will work.\
+Atx-style headers use 1\'966 hash characters at the start of the line,
+corresponding to header levels 1\'966. For example:\
+This is an H1
+
+This is an H2
+
+This is an H6Optionally, you may \'93close\'94 atx-style headers. This is purely
+cosmetic \'96 you can use this if you think it looks better. The
+closing hashes don\'92t even need to match the number of hashes
+used to open the header. (The number of opening hashes
+determines the header level.) :\
+This is an H1 
+
+This is an H2 
+
+This is an H3 <h3 id="blockquote">Blockquotes</h3>\
+Markdown uses email-style > characters for blockquoting. If you\'92re
+familiar with quoting passages of text in an email message, then you
+know how to create a blockquote in Markdown. It looks best if you hard
+wrap the text and put a > before every line:\
+> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
+> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
+> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
+>
+> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
+> id sem consectetuer libero luctus adipiscing.Markdown allows you to be lazy and only put the > before the first
+line of a hard-wrapped paragraph:\
+> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
+consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
+Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
+
+> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
+id sem consectetuer libero luctus adipiscing.Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
+adding additional levels of >:\
+> This is the first level of quoting.
+>
+> > This is nested blockquote.
+>
+> Back to the first level.Blockquotes can contain other Markdown elements, including headers, lists,
+and code blocks:\
+> This is a header.
+>
+> 1. This is the first list item.
+> 2. This is the second list item.
+>
+> Here's some example code:
+>
+> return shellexec("echo input | markdownscript");Any decent text editor should make email-style quoting easy. For
+example, with BBEdit, you can make a selection and choose Increase
+Quote Level from the Text menu.\
+
+<h3 id="list">Lists</h3>\
+Markdown supports ordered (numbered) and unordered (bulleted) lists.\
+Unordered lists use asterisks, pluses, and hyphens \'96 interchangably
+\'96 as list markers:\
+* Red
+* Green
+* Blueis equivalent to:\
++ Red
++ Green
++ Blueand:\
+\'96 Red
+\'96 Green
+\'96 BlueOrdered lists use numbers followed by periods:\
+1. Bird
+2. McHale
+3. ParishIt\'92s important to note that the actual numbers you use to mark the
+list have no effect on the HTML output Markdown produces. The HTML
+Markdown produces from the above list is:\
+<ol>
+<li>Bird</li>
+<li>McHale</li>
+<li>Parish</li>
+</ol>If you instead wrote the list in Markdown like this:\
+1. Bird
+1. McHale
+1. Parishor even:\
+3. Bird
+1. McHale
+8. Parishyou\'92d get the exact same HTML output. The point is, if you want to,
+you can use ordinal numbers in your ordered Markdown lists, so that
+the numbers in your source match the numbers in your published HTML.
+But if you want to be lazy, you don\'92t have to.\
+If you do use lazy list numbering, however, you should still start the
+list with the number 1. At some point in the future, Markdown may support
+starting ordered lists at an arbitrary number.\
+List markers typically start at the left margin, but may be indented by
+up to three spaces. List markers must be followed by one or more spaces
+or a tab.\
+To make lists look nice, you can wrap items with hanging indents:\
+* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
+viverra nec, fringilla in, laoreet vitae, risus.
+* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
+Suspendisse id sem consectetuer libero luctus adipiscing.But if you want to be lazy, you don\'92t have to:\
+* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
+viverra nec, fringilla in, laoreet vitae, risus.
+* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
+Suspendisse id sem consectetuer libero luctus adipiscing.If list items are separated by blank lines, Markdown will wrap the
+items in <p> tags in the HTML output. For example, this input:\
+* Bird
+* Magicwill turn into:\
+<ul>
+<li>Bird</li>
+<li>Magic</li>
+</ul>But this:\
+* Bird
+
+* Magicwill turn into:\
+<ul>
+<li><p>Bird</p></li>
+<li><p>Magic</p></li>
+</ul>List items may consist of multiple paragraphs. Each subsequent
+paragraph in a list item must be indented by either 4 spaces
+or one tab:\
+1. This is a list item with two paragraphs. Lorem ipsum dolor
+sit amet, consectetuer adipiscing elit. Aliquam hendrerit
+mi posuere lectus.
+
+Vestibulum enim wisi, viverra nec, fringilla in, laoreet
+vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
+sit amet velit.
+
+2. Suspendisse id sem consectetuer libero luctus adipiscing.It looks nice if you indent every line of the subsequent
+paragraphs, but here again, Markdown will allow you to be
+lazy:\
+* This is a list item with two paragraphs.
+
+This is the second paragraph in the list item. You're
+only required to indent the first line. Lorem ipsum dolor
+sit amet, consectetuer adipiscing elit.
+
+* Another item in the same list.To put a blockquote within a list item, the blockquote\'92s >
+delimiters need to be indented:\
+* A list item with a blockquote:
+
+> This is a blockquote
+> inside a list item.To put a code block within a list item, the code block needs
+to be indented \i twice\i0  \'96 8 spaces or two tabs:\
+* A list item with a code block:
+
+<code goes here>It\'92s worth noting that it\'92s possible to trigger an ordered list by
+accident, by writing something like this:\
+1986. What a great season.In other words, a \i number-period-space\i0  sequence at the beginning of a
+line. To avoid this, you can backslash-escape the period:\
+1986 What a great season.<h3 id="precode">Code Blocks</h3>\
+Pre-formatted code blocks are used for writing about programming or
+markup source code. Rather than forming normal paragraphs, the lines
+of a code block are interpreted literally. Markdown wraps a code block
+in both <pre> and <code> tags.\
+To produce a code block in Markdown, simply indent every line of the
+block by at least 4 spaces or 1 tab. For example, given this input:\
+This is a normal paragraph:
+
+This is a code block.Markdown will generate:\
+<p>This is a normal paragraph:</p>
+
+<pre><code>This is a code block.
+</code></pre>One level of indentation \'96 4 spaces or 1 tab \'96 is removed from each
+line of the code block. For example, this:\
+Here is an example of AppleScript:
+
+tell application "Foo"
+beep
+end tellwill turn into:\
+<p>Here is an example of AppleScript:</p>
+
+<pre><code>tell application "Foo"
+beep
+end tell
+</code></pre>A code block continues until it reaches a line that is not indented
+(or the end of the article).\
+Within a code block, ampersands (&) and angle brackets (< and >)
+are automatically converted into HTML entities. This makes it very
+easy to include example HTML source code using Markdown \'96 just paste
+it and indent it, and Markdown will handle the hassle of encoding the
+ampersands and angle brackets. For example, this:\
+<div class="footer">
+ 2004 Foo Corporation
+</div>will turn into:\
+<pre><code>div class="footer"
+&copy; 2004 Foo Corporation
+/div
+</code></pre>Regular Markdown syntax is not processed within code blocks. E.g.,
+asterisks are just literal asterisks within a code block. This means
+it\'92s also easy to use Markdown to write about Markdown\'92s own syntax.\
+
+
+<h3 id="hr">Horizontal Rules</h3>\
+You can produce a horizontal rule tag (<hr />) by placing three or
+more hyphens, asterisks, or underscores on a line by themselves. If you
+wish, you may use spaces between the hyphens or asterisks. Each of the
+following lines will produce a horizontal rule:\
+* * *
+
+***
+
+*****
+
+\'96 \'96 \'96
+
+\'97\'97\'97\'97\'97\'97\'97\'97\'97\'97\'97\'97\'97* * *\
+<h2 id="span">Span Elements</h2>\
+<h3 id="link">Links</h3>\
+Markdown supports two style of links: \i inline\i0  and \i reference\i0 .\
+In both styles, the link text is delimited by [square brackets].\
+To create an inline link, use a set of regular parentheses immediately
+after the link text\'92s closing square bracket. Inside the parentheses,
+put the URL where you want the link to point, along with an \i optional\i0 
+title for the link, surrounded in quotes. For example:\
+This is [an example](http://example.com/ "Title") inline link.
+
+[This link](http://example.net/) has no title attribute.Will produce:\
+<p>This is <a href="http://example.com/" title="Title">
+an example</a> inline link.</p>
+
+<p><a href="http://example.net/">This link</a> has no
+title attribute.</p>If you\'92re referring to a local resource on the same server, you can
+use relative paths:\
+See my [About](/about/) page for details.Reference-style links use a second set of square brackets, inside
+which you place a label of your choosing to identify the link:\
+This is [an example][id] reference\'96style link.You can optionally use a space to separate the sets of brackets:\
+This is [an example] [id] reference\'96style link.Then, anywhere in the document, you define your link label like this,
+on a line by itself:\
+[id]: http://example.com/ "Optional Title Here"That is:\
+Square brackets containing the link identifier (optionally
+indented from the left margin using up to three spaces);followed by a colon;followed by one or more spaces (or tabs);followed by the URL for the link;{\listtext       \'95    }optionally followed by a title attribute for the link, enclosed
+in double or single quotes, or enclosed in parentheses.\
+The following three link definitions are equivalent:\
+[foo]: http://example.com/ "Optional Title Here"
+[foo]: http://example.com/ 'Optional Title Here'
+[foo]: http://example.com/ (Optional Title Here)\b Note:\b0  There is a known bug in Markdown.pl 1.0.1 which prevents
+single quotes from being used to delimit link titles.\
+The link URL may, optionally, be surrounded by angle brackets:\
+[id]: <http://example.com/> "Optional Title Here"You can put the title attribute on the next line and use extra spaces
+or tabs for padding, which tends to look better with longer URLs:\
+[id]: http://example.com/longish/path/to/resource/here
+"Optional Title Here"Link definitions are only used for creating links during Markdown
+processing, and are stripped from your document in the HTML output.\
+Link definition names may consist of letters, numbers, spaces, and
+punctuation \'96 but they are \i not\i0  case sensitive. E.g. these two
+links:\
+[link text][a]
+[link text][A]are equivalent.\
+The \i implicit link name\i0  shortcut allows you to omit the name of the
+link, in which case the link text itself is used as the name.
+Just use an empty set of square brackets \'96 e.g., to link the word
+\'93Google\'94 to the google.com web site, you could simply write:\
+[Google][]And then define the link:\
+[Google]: http://google.com/Because link names may contain spaces, this shortcut even works for
+multiple words in the link text:\
+Visit [Daring Fireball][] for more information.And then define the link:\
+[Daring Fireball]: http://daringfireball.net/Link definitions can be placed anywhere in your Markdown document. I
+tend to put them immediately after each paragraph in which they\'92re
+used, but if you want, you can put them all at the end of your
+document, sort of like footnotes.\
+Here\'92s an example of reference links in action:\
+I get 10 times more traffic from [Google] [1] than from
+[Yahoo] [2] or [MSN] [3].
+
+ [1]: http://google.com/"Google"
+ [2]: http://search.yahoo.com/ "Yahoo Search"
+ [3]: http://search.msn.com/"MSN Search"Using the implicit link name shortcut, you could instead write:\
+I get 10 times more traffic from [Google][] than from
+[Yahoo][] or [MSN][].
+
+ [google]: http://google.com/"Google"
+ [yahoo]: http://search.yahoo.com/ "Yahoo Search"
+ [msn]:http://search.msn.com/"MSN Search"Both of the above examples will produce the following HTML output:\
+<p>I get 10 times more traffic from <a href="http://google.com/"
+title="Google">Google</a> than from
+<a href="http://search.yahoo.com/" title="Yahoo Search">Yahoo</a>
+or <a href="http://search.msn.com/" title="MSN Search">MSN</a>.</p>For comparison, here is the same paragraph written using
+Markdown\'92s inline link style:\
+I get 10 times more traffic from [Google](http://google.com/ "Google")
+than from [Yahoo](http://search.yahoo.com/ "Yahoo Search") or
+[MSN](http://search.msn.com/ "MSN Search").The point of reference-style links is not that they\'92re easier to
+write. The point is that with reference-style links, your document
+source is vastly more readable. Compare the above examples: using
+reference-style links, the paragraph itself is only 81 characters
+long; with inline-style links, it\'92s 176 characters; and as raw HTML,
+it\'92s 234 characters. In the raw HTML, there\'92s more markup than there
+is text.\
+With Markdown\'92s reference-style links, a source document much more
+closely resembles the final output, as rendered in a browser. By
+allowing you to move the markup-related metadata out of the paragraph,
+you can add links without interrupting the narrative flow of your
+prose.\
+
+<h3 id="em">Emphasis</h3>\
+Markdown treats asterisks (*) and underscores () as indicators of
+emphasis. Text wrapped with one * or  will be wrapped with an
+HTML <em> tag; double *\'92s or \'92s will be wrapped with an HTML
+<strong> tag. E.g., this input:\
+*single asterisks*
+
+single underscores
+
+**double asterisks**
+
+double underscoreswill produce:\
+<em>single asterisks</em>
+
+<em>single underscores</em>
+
+<strong>double asterisks</strong>
+
+<strong>double underscores</strong>You can use whichever style you prefer; the lone restriction is that
+the same character must be used to open and close an emphasis span.\
+Emphasis can be used in the middle of a word:\
+un*frigging*believableBut if you surround an * or  with spaces, it\'92ll be treated as a
+literal asterisk or underscore.\
+To produce a literal asterisk or underscore at a position where it
+would otherwise be used as an emphasis delimiter, you can backslash
+escape it:\
+this text is surrounded by literal asterisks<h3 id="code">Code</h3>\
+To indicate a span of code, wrap it with backtick quotes (  ).
+Unlike a pre-formatted code block, a code span indicates code within a
+normal paragraph. For example:\
+Use the printf() function.will produce:\
+<p>Use the <code>printf()</code> function.</p>To include a literal backtick character within a code span, you can use
+multiple backticks as the opening and closing delimiters:\
+There is a literal backtick () here.which will produce this:\
+<p><code>There is a literal backtick () here.</code></p>The backtick delimiters surrounding a code span may include spaces \'96
+one after the opening, one before the closing. This allows you to place
+literal backtick characters at the beginning or end of a code span:\
+A single backtick in a code span:   
+
+A backtick\'96delimited string in a code span:  foo will produce:\
+<p>A single backtick in a code span: <code></code></p>
+
+<p>A backtick\'96delimited string in a code span: <code>foo</code></p>With a code span, ampersands and angle brackets are encoded as HTML
+entities automatically, which makes it easy to include example HTML
+tags. Markdown will turn this:\
+Please don't use any <blink> tags.into:\
+<p>Please don't use any <code>blink</code> tags.</p>You can write this:\
+ is the decimal\'96encoded equivalent of .to produce:\
+<p><code>&#8212;</code> is the decimal\'96encoded
+equivalent of <code>&mdash;</code>.</p><h3 id="img">Images</h3>\
+Admittedly, it\'92s fairly difficult to devise a \'93natural\'94 syntax for
+placing images into a plain text document format.\
+Markdown uses an image syntax that is intended to resemble the syntax
+for links, allowing for two styles: \i inline\i0  and \i reference\i0 .\
+Inline image syntax looks like this:\
+![Alt text](/path/to/img.jpg)
+
+![Alt text](/path/to/img.jpg "Optional title")That is:\
+An exclamation mark: !;followed by a set of square brackets, containing the alt
+attribute text for the image;{\listtext        \'95    }followed by a set of parentheses, containing the URL or path to
+the image, and an optional title attribute enclosed in double
+or single quotes.\
+Reference-style image syntax looks like this:\
+![Alt text][id]Where \'93id\'94 is the name of a defined image reference. Image references
+are defined using syntax identical to link references:\
+[id]: url/to/image "Optional title attribute"As of this writing, Markdown has no syntax for specifying the
+dimensions of an image; if this is important to you, you can simply
+use regular HTML <img> tags.\
+
+* * *\
+
+<h2 id="misc">Miscellaneous</h2>\
+<h3 id="autolink">Automatic Links</h3>\
+Markdown supports a shortcut style for creating \'93automatic\'94 links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:\
+<http://example.com/>Markdown will turn this into:\
+<a href="http://example.com/">http://example.com/</a>Automatic links for email addresses work similarly, except that
+Markdown will also perform a bit of randomized decimal and hex
+entity-encoding to help obscure your address from address-harvesting
+spambots. For example, Markdown will turn this:\
+<address@example.com>into something like this:\
+<a href="i:
+e
+">
+e</a>which will render in a browser as a clickable link to \'93address@example.com\'94.\
+(This sort of entity-encoding trick will indeed fool many, if not
+most, address-harvesting bots, but it definitely won\'92t fool all of
+them. It\'92s better than nothing, but an address published in this way
+will probably eventually start receiving spam.)\
+
+
+<h3 id="backslash">Backslash Escapes</h3>\
+Markdown allows you to use backslash escapes to generate literal
+characters which would otherwise have special meaning in Markdown\'92s
+formatting syntax. For example, if you wanted to surround a word
+with literal asterisks (instead of an HTML <em> tag), you can use
+backslashes before the asterisks, like this:\
+literal asterisksMarkdown provides backslash escapes for the following characters:\
+ backslash
+ backtick
+* asterisk
+ underscore
+{} curly braces
+[] square brackets
+() parentheses
+hash mark
++ plus sign
+\'96 minus sign (hyphen)
+. dot
+! exclamation mark}
diff --git a/tests/MMD6Tests/Math.rtf b/tests/MMD6Tests/Math.rtf
new file mode 100644 (file)
index 0000000..64ae44d
--- /dev/null
@@ -0,0 +1,46 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+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=0b 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}\
+a *foo* b\
+a *foo* b\
+\pi2\
+25\
+\pi2\
+a*x*y\
+a*x*y\
+a*x*y\
+a*x*y\
+}
diff --git a/tests/MMD6Tests/Metadata YAML.rtf b/tests/MMD6Tests/Metadata YAML.rtf
new file mode 100644 (file)
index 0000000..d09f0a3
--- /dev/null
@@ -0,0 +1,13 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'97\
+foo\
+}
diff --git a/tests/MMD6Tests/Metadata.rtf b/tests/MMD6Tests/Metadata.rtf
new file mode 100644 (file)
index 0000000..e344680
--- /dev/null
@@ -0,0 +1,17 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo:bar\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 foo 
+\b0\fs24 \
+\
+}
diff --git a/tests/MMD6Tests/Nested Definition Lists.rtf b/tests/MMD6Tests/Nested Definition Lists.rtf
new file mode 100644 (file)
index 0000000..30a0976
--- /dev/null
@@ -0,0 +1,13 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+bat\i foo\i0 \
+bar\
+\i foo\i0 }
diff --git a/tests/MMD6Tests/Nested Lists.rtf b/tests/MMD6Tests/Nested Lists.rtf
new file mode 100644 (file)
index 0000000..587c894
--- /dev/null
@@ -0,0 +1,42 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foobarfoobar{\listtext \'95    }foo{\listtext  \'95    }bar\
+bar\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext      \'95    }foo\
+bar{\listtext  \'95    }foo\
+bar{\listtext  \'95    }foo\
+{\listtext     \'95    }bar\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 bar\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext      \'95    }foo{\listtext  \'95    }bar\
+{\listtext     \'95    }foo{\listtext  \'95    }bar\
+{\listtext     \'95    }foo{\listtext  \'95    }bar\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 5\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext      \'95    }foo{\listtext  \'95    }bar\
+{\listtext     \'95    }foo{\listtext  \'95    }bar\
+{\listtext     \'95    }foo{\listtext  \'95    }bar\
+
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 bar\
+\pard\tx220\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li720\fi-720\pardirnatural\partightenfactor0
+\ls1\ilvl0\cf0 {\listtext      \'95    }foo\
+{\listtext     \'95    }bar\
+{\listtext     \'95    }foo\
+{\listtext     \'95    }bar\
+{\listtext     \'95    }foo\
+{\listtext     \'95    }bar\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 bar\
+}
diff --git a/tests/MMD6Tests/Raw Source.rtf b/tests/MMD6Tests/Raw Source.rtf
new file mode 100644 (file)
index 0000000..3d20f21
--- /dev/null
@@ -0,0 +1,30 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+*foo*{*}\
+*foo*{=html}\
+*foo*{=latex}\
+*foo*{=odt}\
+*foo*{=*}\
+5\
+{*}*foo*
+\
+{=html}*foo*
+\
+{=latex}*foo*
+\
+{=odt}*foo*
+\
+{=*}*foo*
+\
+10\
+{=*}*foo*
+
+*bar*}
diff --git a/tests/MMD6Tests/Reference Footnotes.rtf b/tests/MMD6Tests/Reference Footnotes.rtf
new file mode 100644 (file)
index 0000000..003b6c8
--- /dev/null
@@ -0,0 +1,22 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo.[^bar]\
+foo.[^bar2]\
+foo.[^bar3]\
+foo.[^bar3]\
+\
+\i foo\i0 \
+\i foo
+bar\i0 \
+foo\
+\i bar\i0 \
+{\listtext     \'95    }bat\
+}
diff --git a/tests/MMD6Tests/Reference Images.rtf b/tests/MMD6Tests/Reference Images.rtf
new file mode 100644 (file)
index 0000000..5eee512
--- /dev/null
@@ -0,0 +1,30 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+Test ![\i foo\i0 ][bar].\
+Test ![\i foo\i0 ][BAR].\
+Test ![\i foo\i0 ][foobar].\
+Test ![\i foo\i0 ][foo bar].\
+Test ![\i foo\i0 ][foo bar].\
+5\
+Test ![\i foo\i0 ][long].\
+Test ![foo][].\
+Test ![foo].\
+
+\
+[foo]: http://test.0/\
+[bar]: http://test.1/\
+[BAR]: http://test.2/\
+[foobar]: http://test.3/\'93title\'94\
+[foo bar]: http://test.4/\
+[foo bar]: http://test.5/\'93\'94\
+[long]: http://test.6/
+\'93title\'94\
+}
diff --git a/tests/MMD6Tests/Reference Links.rtf b/tests/MMD6Tests/Reference Links.rtf
new file mode 100644 (file)
index 0000000..197a2b5
--- /dev/null
@@ -0,0 +1,41 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+[\i foo\i0 ][bar].\
+[\i foo\i0 ][BAR].\
+[\i foo\i0 ][foobar].\
+[\i foo\i0 ][foo bar].\
+[\i foo\i0 ][foo bar].\
+5\
+[\i foo\i0 ][long].\
+[foo][].\
+[foo].\
+[[foo]][bar]\
+[[foo]][]\
+10\
+[[foo][bar]][]\
+[foo][bar]\
+[foo] [bar]\
+[foo]
+[bar]\
+[Markdown]\
+
+\
+[foo]: http://test.0/\
+[bar]:http://test.1/file.txt\
+[BAR]: http://test.2/\
+[foobar]: http://test.3/file.txt\'93title\'94\
+[foo bar]: http://test.4/\
+[foo bar]: http://test.5/\'93\'94\
+[long]: http://test.6/
+\'93title\'94\
+[Markdown]:http://daringfireball.net/projects/markdown/ \'93Daring Fireball:
+Markdown\'94\
+}
diff --git a/tests/MMD6Tests/Setext Headers.rtf b/tests/MMD6Tests/Setext Headers.rtf
new file mode 100644 (file)
index 0000000..8b6fd6b
--- /dev/null
@@ -0,0 +1,26 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo bar\
+foo \i bar\i0 \
+foo
+bar\
+foo
+bar\
+foobar\
+5\
+foobar\
+
+foo
+====
+\
+====\
+\'97\'96\
+}
diff --git a/tests/MMD6Tests/Smart Quotes.rtf b/tests/MMD6Tests/Smart Quotes.rtf
new file mode 100644 (file)
index 0000000..1fbfafa
--- /dev/null
@@ -0,0 +1,51 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'91foo\'92\
+\'93foo\'94\
+\'93foo\'94 \'91bar\'92\
+\'91foo\'92 \'93bar\'94\
+\'91.foo\'92\
+5\
+foo.\
+foo.\
+foo'\
+foo\'94\
+foo'''\
+10\
+\'93\'94 foo \'93\'94?\
+'' foo ''?\
+isn\'92t\
+foo \'96 bar\
+foo \'97 bar\
+15\
+1\'962\
+1\'962\
+1\'973\
+\'96\
+\'97\
+20\
+\'85\
+\'85\
+\'85\
+\'85\
+l\'92année l\'92année\
+25\
+l\'92été l\'92année\
+l\'92été l\'92été\
+l\'92année l\'92été\
+foo\'92s and bar\'92s\
+foo\'92s and bar\'92s\
+30\
+foo(\'91bar\'92)\
+foo(\'93bar\'94)\
+foo-bar\
+foo-bar{\listtext      \'95    }foo-bar\
+}
diff --git a/tests/MMD6Tests/Spanish.rtf b/tests/MMD6Tests/Spanish.rtf
new file mode 100644 (file)
index 0000000..f935d19
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'91foo\'92\
+\'abfoo\'bb\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/Special Characters.rtf b/tests/MMD6Tests/Special Characters.rtf
new file mode 100644 (file)
index 0000000..b00b22a
--- /dev/null
@@ -0,0 +1,34 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+{foo}\
+[foo]\
+{{foo}}\
+[[foo]]\
+(foo)\
+5\
+|foo|\
+\foo\
+<foo>\
+%\
+%\
+10\
+& %  { }   \
+&\
+%\
+#\
+\
+15\
+{\
+}\
+\
+\
+\
+}
diff --git a/tests/MMD6Tests/Superscript.rtf b/tests/MMD6Tests/Superscript.rtf
new file mode 100644 (file)
index 0000000..933b778
--- /dev/null
@@ -0,0 +1,45 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+x2.\
+x2xz.\
+x2.\
+x2 3\
+x2 32\
+5\
+xz.\
+xxyz.\
+zz.\
+/Library/MultiMarkdown\
+test\
+10\
+xy\
+xy\
+x2 3\
+x2 32\
+H2O\
+15\
+CH3CH2CH2CH3\
+CH3CH2CH2CH3\
+\pi2\
+\pi2\
+CH4\
+20\
+CH4\
+238U\
+Ca2+\
+tpx\
+23Na1+\
+25\
+Na1+\
+Na1+\
+Na+\
+Na+\
+}
diff --git a/tests/MMD6Tests/Swedish.rtf b/tests/MMD6Tests/Swedish.rtf
new file mode 100644 (file)
index 0000000..4f87c73
--- /dev/null
@@ -0,0 +1,21 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+\'92foo\'92\
+\'94foo\'94\
+foo\'92s\
+foo \'97 bar\
+foo \'96 bar\
+5\
+foo\'85\
+[^foo]\
+[#bar]\
+\
+foo}
diff --git a/tests/MMD6Tests/Table of Contents.rtf b/tests/MMD6Tests/Table of Contents.rtf
new file mode 100644 (file)
index 0000000..a1a970e
--- /dev/null
@@ -0,0 +1,74 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+{{TOC}}\
+{{TOC:2}}\
+{{TOC:2-3}}\
+
+foo {{TOC}}\
+foo {{TOC:2}}\
+foo {{TOC:2-3}}\
+
+{{TOC}}
+
+{{TOC:2}}
+
+{{TOC:2-3}}
+\b\fs32 Second Level 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 First Level 
+\b0\fs24 \
+\
+
+\b\fs32 Second Level b 
+\b0\fs24 \
+\
+
+\b\fs28 Third Level 
+\b0\fs24 \
+\
+
+\b\fs32 Second Level c 
+\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 First Level b 
+\b0\fs24 \
+\
+
+\b\fs28 Third Level b 
+\b0\fs24 \
+\
+
+\b\fs32 Second level d 
+\b0\fs24 \
+\
+
+\b\fs28 Third level d 
+\b0\fs24 \
+\
+
+\i\b\fs26 Fourth level d 
+\i0\b0\fs24 \
+\
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+
+\b\fs36 \cf0 First level  
+\b0\fs24 \
+\
+
+\b\fs32 Second level  
+\b0\fs24 \
+\
+}
diff --git a/tests/MMD6Tests/Tables.rtf b/tests/MMD6Tests/Tables.rtf
new file mode 100644 (file)
index 0000000..43c0c4a
--- /dev/null
@@ -0,0 +1,111 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel foo bar\'97\'96+  :\'96:+bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw \i foo\i0  \i bar\i0  \b foo bar\b0 \
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel foo1  bar1  :\'97+  \'97:+ bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw\i foo\i0   \i bar\i0   \b foo bar\b0  \
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel foo2  bar2  :\'97\'96  \'97\'96:bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw\i foo\i0   \i bar\i0   \b foo bar\b0  bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw foo3  bar3 \i foo\i0   \i bar\i0   \b foo bar\b0  \
+| foo4 | bar4 |\i foo\i0  | \i bar\i0  || \b foo bar\b0  ||\
+5\
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel foo5 bar5  :\'97\'96  \'97\'97:bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw\i foo\i0   \i bar\i0   \b foo bar\b0   bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw foo6  bar6  :\'97-  \'97-: \i foo\i0   \i bar\i0   \b foo bar\b0  \
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel foo  bar \'97  \'97bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw foo  bar [\i caption\i0 ][bar]\
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel foo  bar  \'97  \'97 bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw foo  bar [\i caption\i0 ]\
+[\i foo\i0 ][bar]
+| foo | bar |
+| \'97 | \'97 |
+| foo | bar |\
+
+6\
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cel\'97  \'97 bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw foo  bar [\i caption\i0 ][bar]\
+
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrt\brdrnil \trbrdrl\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\cellx4320
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw20\brdrcf2 \clbrdrb\brdrs\brdrw20\brdrcf2 \clbrdrr\brdrs\brdrw20\brdrcf2 \clpadl100 \clpadr100 \gaph\celbat  foo  bar  \'97  \'97 bl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 musical\cell 
+\pard\intbl\itap1\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0
+\cf0 suspicion\cell \row
+
+\itap1\trowd \taflags1 \trgaph108\trleft-108 \trbrdrl\brdrnil \trbrdrt\brdrnil \trbrdrr\brdrnil 
+\clvertalc \clshdrawnil \clbrdrt\brdrs\brdrw20\brdrcf2 \clbrdrl\brdrs\brdrw foo  bar [\b no trailing newline\b0 ]}
diff --git a/tests/MMD6Tests/Transclusion.rtf b/tests/MMD6Tests/Transclusion.rtf
new file mode 100644 (file)
index 0000000..74e5ebb
--- /dev/null
@@ -0,0 +1,15 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+{{foo.txt}}\
+{{bar.txt}}\
+{{transclusion/bat.*}}\
+{{transclusion/baz.txt}}\
+{{transclusion/baz2.txt}}}
diff --git a/tests/MMD6Tests/Variables.rtf b/tests/MMD6Tests/Variables.rtf
new file mode 100644 (file)
index 0000000..652ea0d
--- /dev/null
@@ -0,0 +1,16 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1504\cocoasubrtf830
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;\red191\green191\blue191;}
+{\*\expandedcolortbl;;\csgray\c79525;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid1\'01\uc0\u8226 ;}{\levelnumbers;}\fi-360\li720\lin720 }{\listname ;}\listid1}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
+\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0\sa360
+
+\f0\fs24 \cf0 \
+foo:bar\
+[%foo]\
+[%bar]\
+[%bat]\
+[%latex config]\
+}