Skip to content

Commit

Permalink
Change default unordered list bullet marker from '*' to '-'.
Browse files Browse the repository at this point in the history
Fix mixmark-io#424. Helps mitigate mixmark-io#441.
  • Loading branch information
za3k committed Jul 16, 2024
1 parent cc73387 commit 0dd27b7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion src/turndown.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function TurndownService (options) {
rules: COMMONMARK_RULES,
headingStyle: 'setext',
hr: '* * *',
bulletListMarker: '*',
bulletListMarker: '-',
codeBlockStyle: 'indented',
fence: '```',
emDelimiter: '_',
Expand Down
64 changes: 32 additions & 32 deletions test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,9 @@

Another paragraph.

* Unordered list item 1
* Unordered list item 2
* Unordered list item 3</pre>
- Unordered list item 1
- Unordered list item 2
- Unordered list item 3</pre>
</div>

<div class="case" data-name="ul">
Expand All @@ -422,22 +422,22 @@
<li>Unordered list item 3</li>
</ul>
</div>
<pre class="expected">* Unordered list item 1
* Unordered list item 2
* Unordered list item 3</pre>
<pre class="expected">- Unordered list item 1
- Unordered list item 2
- Unordered list item 3</pre>
</div>

<div class="case" data-name="ul with custom bullet" data-options='{"bulletListMarker": "-"}'>
<div class="case" data-name="ul with custom bullet" data-options='{"bulletListMarker": "*"}'>
<div class="input">
<ul>
<li>Unordered list item 1</li>
<li>Unordered list item 2</li>
<li>Unordered list item 3</li>
</ul>
</div>
<pre class="expected">- Unordered list item 1
- Unordered list item 2
- Unordered list item 3</pre>
<pre class="expected">* Unordered list item 1
* Unordered list item 2
* Unordered list item 3</pre>
</div>

<div class="case" data-name="ul with paragraph">
Expand All @@ -447,9 +447,9 @@
<li>List item without paragraph</li>
</ul>
</div>
<pre class="expected">* List item with paragraph
<pre class="expected">- List item with paragraph

* List item without paragraph</pre>
- List item without paragraph</pre>
</div>

<div class="case" data-name="ol with paragraphs">
Expand Down Expand Up @@ -492,14 +492,14 @@
<li>This is a third item at root level</li>
</ul>
</div>
<pre class="expected">* This is a list item at root level
* This is another item at root level
* * This is a nested list item
* This is another nested list item
* * This is a deeply nested list item
* This is another deeply nested list item
* This is a third deeply nested list item
* This is a third item at root level</pre>
<pre class="expected">- This is a list item at root level
- This is another item at root level
- - This is a nested list item
- This is another nested list item
- - This is a deeply nested list item
- This is another deeply nested list item
- This is a third deeply nested list item
- This is a third item at root level</pre>
</div>

<div class="case" data-name="nested ols and uls">
Expand All @@ -523,14 +523,14 @@
<li>This is a third item at root level</li>
</ul>
</div>
<pre class="expected">* This is a list item at root level
* This is another item at root level
* 1. This is a nested list item
<pre class="expected">- This is a list item at root level
- This is another item at root level
- 1. This is a nested list item
2. This is another nested list item
3. * This is a deeply nested list item
* This is another deeply nested list item
* This is a third deeply nested list item
* This is a third item at root level</pre>
3. - This is a deeply nested list item
- This is another deeply nested list item
- This is a third deeply nested list item
- This is a third item at root level</pre>
</div>

<div class="case" data-name="ul with blockquote">
Expand All @@ -544,7 +544,7 @@
</li>
</ul>
</div>
<pre class="expected">* A list item with a blockquote:
<pre class="expected">- A list item with a blockquote:

> This is a blockquote inside a list item.</pre>
</div>
Expand Down Expand Up @@ -675,10 +675,10 @@ <h2>This is a header.</h2>
</li>
</ol>
</div>
<pre class="expected">* Indented li with leading/trailing newlines
* **Strong with trailing space inside li with leading/trailing whitespace**
* li without whitespace
* Leading space, text, lots of whitespace … text</pre>
<pre class="expected">- Indented li with leading/trailing newlines
- **Strong with trailing space inside li with leading/trailing whitespace**
- li without whitespace
- Leading space, text, lots of whitespace … text</pre>
</div>

<div class="case" data-name="whitespace between inline elements">
Expand Down

0 comments on commit 0dd27b7

Please sign in to comment.