Why Adding a Markdown Sublist Breaks the List on dev.to?
Boris Jamot ✊ /

Boris Jamot ✊ / @biros

About: Software Crafter 🐘 / 🐹 + 👷 = 🚀

Location:
🇫🇷 Caen, Normandy
Joined:
Aug 12, 2018

Why Adding a Markdown Sublist Breaks the List on dev.to?

Publish Date: Sep 19 '18
13 5

Can someone explain me why when I add a sublist to a Markdown list on dev.to, it breaks my list by adding unexpected CR after each item?

Here's my code:

- item 1
  - item 1.1
- item 2
- item 3
Enter fullscreen mode Exit fullscreen mode

And the result:

  • item 1
    • item 1.1
  • item 2
  • item 3

Thanks!

Comments 5 total

  • Kasey Speakman
    Kasey SpeakmanSep 19, 2018

    I've run into this as well. I tend to just avoid sub lists in posts here. Although looking at it, it does look alright visually... just not what I expected.

  • Defiance Black
    Defiance BlackSep 19, 2018

    Hm.

    If the pot is open for opinions, I'd rather that <CR> be removed.

    I like tight lists.

  • Darryl Norris
    Darryl NorrisSep 19, 2018

    This looks to me like a bug. I think it might be worth opening an issue in Github?

  • Justin J Stark
    Justin J StarkSep 20, 2018

    If you look at the outputted HTML, there are <br>s before item 2 and item 3. This is definitely a bug.

    <ul>
    <li>item 1
    <ul>
    <li>item 1.1</li>
    </ul>
    </li>
    <br>
    <li>item 2</li>
    <br>
    <li>item 3</li>
    </ul>
    

    My guess is this line is meant to strip out the brs but I don't have time to figure out why it doesn't work.

Add comment