<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentsourcepos="1:1-1:14"xmlns="http://commonmark.org/xml/1.0"><paragraphsourcepos="1:1-1:14"><textsourcepos="1:1-1:6"xml:space="preserve">Hello </text><emphsourcepos="1:7-1:13"><textsourcepos="1:8-1:12"xml:space="preserve">world</text></emph><textsourcepos="1:14-1:14"xml:space="preserve">!</text></paragraph></document>
$ comrak -t commonmark -t xml
Hello *world*!
Hello world!
<p>Hello <em>world</em>!</p>
Hello *world*\!
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentxmlns="http://commonmark.org/xml/1.0"><paragraph><textxml:space="preserve">Hello </text><emph><textxml:space="preserve">world</text></emph><textxml:space="preserve">!</text></paragraph></document>
$ comrak --sourcepos -t commonmark -t xml
#HelloWorld *with***emphasis**
and `code`.
>-one
>-two
Hello
World withemphasis
and code.
one
two
<h1data-sourcepos="1:1-1:7">Hello</h1><pdata-sourcepos="3:1-4:11">World <emdata-sourcepos="3:7-3:12">with</em><strongdata-sourcepos="3:14-3:25">emphasis</strong>
and <codedata-sourcepos="4:5-4:10">code</code>.</p><blockquotedata-sourcepos="6:1-7:7"><uldata-sourcepos="6:3-7:7"><lidata-sourcepos="6:3-6:7">one</li><lidata-sourcepos="7:3-7:7">two</li></ul></blockquote>
#HelloWorld *with***emphasis**
and `code`.
>-one
>-two
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentsourcepos="1:1-7:7"xmlns="http://commonmark.org/xml/1.0"><headingsourcepos="1:1-1:7"level="1"><textsourcepos="1:3-1:7"xml:space="preserve">Hello</text></heading><paragraphsourcepos="3:1-4:11"><textsourcepos="3:1-3:6"xml:space="preserve">World </text><emphsourcepos="3:7-3:12"><textsourcepos="3:8-3:11"xml:space="preserve">with</text></emph><textsourcepos="3:13-3:13"xml:space="preserve"></text><strongsourcepos="3:14-3:25"><textsourcepos="3:16-3:23"xml:space="preserve">emphasis</text></strong><softbreaksourcepos="3:26-3:26"/><textsourcepos="4:1-4:4"xml:space="preserve">and </text><codesourcepos="4:5-4:10"xml:space="preserve">code</code><textsourcepos="4:11-4:11"xml:space="preserve">.</text></paragraph><block_quotesourcepos="6:1-7:7"><listsourcepos="6:3-7:7"type="bullet"tight="true"><itemsourcepos="6:3-6:7"><paragraphsourcepos="6:5-6:7"><textsourcepos="6:5-6:7"xml:space="preserve">one</text></paragraph></item><itemsourcepos="7:3-7:7"><paragraphsourcepos="7:5-7:7"><textsourcepos="7:5-7:7"xml:space="preserve">two</text></paragraph></item></list></block_quote></document>
<pdata-sourcepos="1:1-1:47"><adata-sourcepos="1:1-1:27"href="https://example.com">link</a> and <imgdata-sourcepos="1:33-1:47"src="x.png"alt="image" /></p>
[link](https://example.com) and 
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEdocument SYSTEM "CommonMark.dtd"><documentsourcepos="1:1-1:47"xmlns="http://commonmark.org/xml/1.0"><paragraphsourcepos="1:1-1:47"><linksourcepos="1:1-1:27"destination="https://example.com"title=""><textsourcepos="1:2-1:5"xml:space="preserve">link</text></link><textsourcepos="1:28-1:32"xml:space="preserve"> and </text><imagesourcepos="1:33-1:47"destination="x.png"title=""><textsourcepos="1:35-1:39"xml:space="preserve">image</text></image></paragraph></document>