From 0dd27b720a616aeb96dd5cfd70442020421cae6d Mon Sep 17 00:00:00 2001 From: Zachary Vance Date: Tue, 16 Jul 2024 17:43:16 -0400 Subject: [PATCH] Change default unordered list bullet marker from '*' to '-'. Fix #424. Helps mitigate #441. --- src/turndown.js | 2 +- test/index.html | 64 ++++++++++++++++++++++++------------------------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/turndown.js b/src/turndown.js index ff4a2cb3..975632fd 100644 --- a/src/turndown.js +++ b/src/turndown.js @@ -27,7 +27,7 @@ export default function TurndownService (options) { rules: COMMONMARK_RULES, headingStyle: 'setext', hr: '* * *', - bulletListMarker: '*', + bulletListMarker: '-', codeBlockStyle: 'indented', fence: '```', emDelimiter: '_', diff --git a/test/index.html b/test/index.html index 065de26e..7e720362 100644 --- a/test/index.html +++ b/test/index.html @@ -409,9 +409,9 @@ Another paragraph. -* Unordered list item 1 -* Unordered list item 2 -* Unordered list item 3 +- Unordered list item 1 +- Unordered list item 2 +- Unordered list item 3
@@ -422,12 +422,12 @@
  • Unordered list item 3
  • -
    *   Unordered list item 1
    -*   Unordered list item 2
    -*   Unordered list item 3
    +
    -   Unordered list item 1
    +-   Unordered list item 2
    +-   Unordered list item 3
    -
    +
    • Unordered list item 1
    • @@ -435,9 +435,9 @@
    • Unordered list item 3
    -
    -   Unordered list item 1
    --   Unordered list item 2
    --   Unordered list item 3
    +
    *   Unordered list item 1
    +*   Unordered list item 2
    +*   Unordered list item 3
    @@ -447,9 +447,9 @@
  • List item without paragraph
  • -
    *   List item with paragraph
    +  
    -   List item with paragraph
         
    -*   List item without paragraph
    +- List item without paragraph
    @@ -492,14 +492,14 @@
  • This is a third item at root level
  • -
    *   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
    +
    -   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
    @@ -523,14 +523,14 @@
  • This is a third item at root level
  • -
    *   This is a list item at root level
    -*   This is another item at root level
    -*   1.  This is a nested list item
    +  
    -   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
    + 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
    @@ -544,7 +544,7 @@
    -
    *   A list item with a blockquote:
    +  
    -   A list item with a blockquote:
         
         > This is a blockquote inside a list item.
    @@ -675,10 +675,10 @@

    This is a header.

    -
    *   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
    +
    -   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