<TEI xmlns="http://www.tei-c.org/ns/1.0">
    <teiHeader>
        <fileDesc>
            <titleStmt>
                <title>Supported Markdown syntax</title>
            </titleStmt>
            <publicationStmt>
                <p>Publication Information</p>
            </publicationStmt>
            <sourceDesc>
                <p>Information about the source</p>
            </sourceDesc>
        </fileDesc>
    </teiHeader>
    <text>
        <body>
            <div>
                <head n="1">Supported Markdown syntax</head>
                <p>The parser extends the <ref target="http://daringfireball.net/projects/markdown/syntax">original markdown</ref> proposal with fenced code blocks and tables. These are additional features found in <ref target="https://help.github.com/articles/github-flavored-markdown">Github flavored markdown</ref>.</p>
                <div>
                    <head n="2">Paragraphs</head>
                    <p>Paragraphs are separated from following blocks by a blank line. A single line break does <hi rend="bold">not</hi> start a new paragraph.</p>
                    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur nec lobortis magna. Fusce vestibulum felis a eros suscipit mattis. Pellentesque sit amet enim libero. Sed sed tempus nibh. Ut pellentesque quam ac bibendum iaculis. Suspendisse <hi rend="bold">vitae</hi> interdum risus, convallis auctor urna. Mauris vel sapien ut sapien mollis rhoncus non a nibh. Nullam vulputate consequat purus, ut varius justo ornare vel. Etiam ornare diam at velit varius volutpat. Mauris vel luctus mi, at fermentum purus. <hi>Vestibulum ante ipsum</hi> primis in faucibus orci luctus et ultrices posuere cubilia Curae; Cras lobortis est dolor, et tristique lorem egestas vitae. Sed feugiat dictum nunc. Nullam ultricies vehicula aliquam. Cras felis ante, ultrices sed lacinia et, pharetra in tellus. Vivamus scelerisque ut mi a dapibus.</p>
                </div>
                <div>
                    <head n="2">Code</head>
                    <p>To format inline code snippets, surround them with a single backtick: <code>request:get-parameter()</code>. Use two backticks to allow one backtick inside: <code> `ls` </code>.</p>
                </div>
                <div>
                    <head n="2">Lists</head>
                    <div>
                        <head n="3">Simple list:</head>
                        <list>
                            <item>Buy milk</item>
                            <item>Drink it</item>
                            <item>Be happy</item>
                        </list>
                    </div>
                    <div>
                        <head n="3">Nested list:</head>
                        <list rend="ordered">
                            <item>One</item>
                            <item>Two<list>
                                    <item>A nested list item</item>
                                    <item>in an unordered list.</item>
                                </list>
                            </item>
                            <item>Four</item>
                        </list>
                    </div>
                    <div>
                        <head n="3">Task List</head>
                        <list>
                            <item>
                                <label class="checkbox-inline">
                                    <input type="checkbox" value="" checked="checked"/> write documentation</label>
                            </item>
                            <item>
                                <label class="checkbox-inline">
                                    <input type="checkbox" value=""/> create tests</label>
                            </item>
                        </list>
                    </div>
                    <div>
                        <head n="3">Quotes</head>
                        <quote>
 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim 
 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate 
 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit 
 anim id est laborum.</quote>
                    </div>
                </div>
                <div>
                    <head n="2">Links</head>
                    <p>Links can be specified directly or by reference.</p>
                    <p>This <ref target="http://exist-db.org">link</ref> references a link definition given at the end of the document ! And here's a direct link to the eXist <ref target="http://exist-db.org/exist/apps/docs">documentation</ref>.</p>
                </div>
                <div>
                    <head n="2">Images</head>
                    <p>
                        <figure>
                            <figDesc>Our Logo</figDesc>
                            <graphic url="http://exist-db.org/exist/apps/homepage/resources/img/existdb.gif">
                                <desc>eXist-db Logo</desc>
                            </graphic>
                        </figure>
                    </p>
                    <p>Image linked through reference: <figure>
                            <figDesc>Documentation</figDesc>
                            <graphic url="http://exist-db.org/exist/apps/homepage/resources/img/book-cover.gif">
                                <desc>Read more</desc>
                            </graphic>
                        </figure>.</p>
                </div>
                <div>
                    <head n="2">Labels</head>
                    <list>
                        <item>
                            <rs type="customer">eXist Solutions</rs>, <rs type="customer">foo enterprise</rs>
                        </item>
                        <item>
                            <rs type="important">important</rs>
                        </item>
                    </list>
                </div>
                <div>
                    <head n="2">Code Blocks</head>
                    <code lang="xquery">for $i in 1 to 10
return
    &lt;li&gt;<rs type="$i * 2">$i * 2</rs>&lt;/li&gt;
</code>
                </div>
                <div>
                    <head n="2">Table</head>
                    <table>
                        <row role="head">
                            <cell role="data" rend="head">Tables</cell>
                            <cell role="data" rend="head">Are</cell>
                            <cell role="data" rend="head">Cool</cell>
                        </row>
                        <row role="data">
                            <cell role="data" rend="left">col 3 is</cell>
                            <cell role="data" rend="center">right-aligned</cell>
                            <cell role="data" rend="right">$1600</cell>
                        </row>
                        <row role="data">
                            <cell role="data" rend="left">col 2 is</cell>
                            <cell role="data" rend="center">
                                <hi rend="bold">centered</hi>
                            </cell>
                            <cell role="data" rend="right">$12</cell>
                        </row>
                        <row role="data">
                            <cell role="data" rend="left">zebra stripes</cell>
                            <cell role="data" rend="center">are neat</cell>
                            <cell role="data" rend="right">$1</cell>
                        </row>
                    </table>
                    <table>
                        <row role="data">
                            <cell role="data" rend="">simple table</cell>
                            <cell role="data" rend="">column1</cell>
                            <cell role="data" rend="">column2</cell>
                        </row>
                    </table>
                </div>
                <div>
                    <head n="2">HTML Blocks</head>
                    <code lang="xml">&lt;figure&gt;
    &lt;img src="http://exist-db.org/exist/apps/homepage/resources/img/existdb.gif"/&gt;
&lt;/figure&gt;
</code>
                    <p>is rendered as:</p>
                    <figure xmlns="">
                        <body xmlns="http://www.tei-c.org/ns/1.0"/>
                        <img src="http://exist-db.org/exist/apps/homepage/resources/img/existdb.gif"/>
                        <body xmlns="http://www.tei-c.org/ns/1.0"/>
                    </figure>
                    <body>
                        <p>HTML block containing markdown:</p>
                    </body>
                    <div xmlns="" class="row">
                        <body xmlns="http://www.tei-c.org/ns/1.0"/>
                        <div class="col-md-6">
                            <body xmlns="http://www.tei-c.org/ns/1.0">
                                <p>First column in two column layout.</p>
                                <p>Second paragraph.</p>
                            </body>
                        </div>
                        <body xmlns="http://www.tei-c.org/ns/1.0"/>
                        <div class="col-md-6">
                            <body xmlns="http://www.tei-c.org/ns/1.0">
                                <p>Second column in two column layout.</p>
                            </body>
                        </div>
                        <body xmlns="http://www.tei-c.org/ns/1.0"/>
                    </div>
                </div>
                <div>
                    <head n="2">Inline HTML</head>
                    <p>A <span xmlns="" style="color: red;">paragraph <span style="color: green;">containing</span>
                        </span> some  <code xmlns="">HTML</code>.</p>
                </div>
            </div>
            <div>
                <head n="1">TEI output</head>
                <p>Besides producing HTML, the module can also transform <ref target="?mode=tei">markdown into TEI</ref>. To test, just append <code>?mode=tei</code> to the URL. Other output formats can be supported as well by adding a simple configuration, see <ref target="https://github.com/wolfgangmm/exist-markdown/blob/master/content/tei-config.xql">tei-config.xql</ref>.</p>
            </div>
        </body>
    </text>
</TEI>