Skip to content

Instantly share code, notes, and snippets.

@nathanaschbacher
Created August 6, 2017 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanaschbacher/93f45e938aef671a07e8c9f8850115cf to your computer and use it in GitHub Desktop.
Save nathanaschbacher/93f45e938aef671a07e8c9f8850115cf to your computer and use it in GitHub Desktop.
Exposing List Bullet Markers in cmark
<h1>Heading</h1>
<ul>
<li>asterisk list 1</li>
<li>asterisk list 2</li>
</ul>
<ul>
<li>hyphen list 1</li>
<li>hyphen list 2</li>
<li>hyphen list 3</li>
</ul>
<ul>
<li>plus list 1</li>
</ul>
<ul>
<li>asterisk sibling 1</li>
</ul>
<ul>
<li>hyphen sibling 2</li>
</ul>
<ul>
<li>plus sibling 3</li>
</ul>
<ol>
<li>numeric list 1</li>
</ol>
<ol>
<li>numeric nested 1
<ol>
<li>numeric nested 2
<ul>
<li>plus nested 3</li>
</ul>
</li>
<li>numeric sibling 4</li>
</ol>
</li>
</ol>

Heading

  • asterisk list 1
  • asterisk list 2
  • hyphen list 1
  • hyphen list 2
  • hyphen list 3
  • plus list 1
  • asterisk sibling 1
  • hyphen sibling 2
  • plus sibling 3
  1. numeric list 1
  1. numeric nested 1
    1. numeric nested 2
      • plus nested 3
    2. numeric sibling 4
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document SYSTEM "CommonMark.dtd">
<document xmlns="http://commonmark.org/xml/1.0">
<heading level="1">
<text>Heading</text>
</heading>
<list type="bullet" marker="asterisk" tight="true">
<item>
<paragraph>
<text>asterisk list 1</text>
</paragraph>
</item>
<item>
<paragraph>
<text>asterisk list 2</text>
</paragraph>
</item>
</list>
<list type="bullet" marker="hyphen" tight="true">
<item>
<paragraph>
<text>hyphen list 1</text>
</paragraph>
</item>
<item>
<paragraph>
<text>hyphen list 2</text>
</paragraph>
</item>
<item>
<paragraph>
<text>hyphen list 3</text>
</paragraph>
</item>
</list>
<list type="bullet" marker="plus" tight="true">
<item>
<paragraph>
<text>plus list 1</text>
</paragraph>
</item>
</list>
<list type="bullet" marker="asterisk" tight="true">
<item>
<paragraph>
<text>asterisk sibling 1</text>
</paragraph>
</item>
</list>
<list type="bullet" marker="hyphen" tight="true">
<item>
<paragraph>
<text>hyphen sibling 2</text>
</paragraph>
</item>
</list>
<list type="bullet" marker="plus" tight="true">
<item>
<paragraph>
<text>plus sibling 3</text>
</paragraph>
</item>
</list>
<list type="ordered" start="1" delim="period" marker="numeric" tight="true">
<item>
<paragraph>
<text>numeric list 1</text>
</paragraph>
</item>
</list>
<list type="ordered" start="1" delim="paren" marker="numeric" tight="true">
<item>
<paragraph>
<text>numeric nested 1</text>
</paragraph>
<list type="ordered" start="1" delim="paren" marker="numeric" tight="true">
<item>
<paragraph>
<text>numeric nested 2</text>
</paragraph>
<list type="bullet" marker="plus" tight="true">
<item>
<paragraph>
<text>plus nested 3</text>
</paragraph>
</item>
</list>
</item>
<item>
<paragraph>
<text>numeric sibling 4</text>
</paragraph>
</item>
</list>
</item>
</list>
</document>

Heading

  • asterisk list 1
  • asterisk list 2
  • hyphen list 1
  • hyphen list 2
  • hyphen list 3
  • plus list 1
  • asterisk sibling 1
  • hyphen sibling 2
  • plus sibling 3
  1. numeric list 1
  1. numeric nested 1
    1. numeric nested 2
      • plus nested 3
    2. numeric sibling 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment