Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default unordered list bullet marker from '*' to '-' #476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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