logoalt Hacker News

lelanthranyesterday at 4:28 AM4 repliesview on HN

> What it can't do (as far as I understand): complex layouts, precise typography, embedded binary content, anything that needs pixel-perfect rendering. Am I missing anything? What are the other limitations I should know about?

Multi-level lists, annoyingly, get rendered as code at the deeper levels because of the 4+ spaces from the beginning of the line.

This is a serious and major drawback of markdown, making it good for developers only. The average person does not want to render code.

Remove that one drawback, and it'll get even better adoption.


Replies

chrismorganyesterday at 8:02 AM

> Multi-level lists, annoyingly, get rendered as code at the deeper levels because of the 4+ spaces from the beginning of the line.

Not so. You just need to be principled with your indentation, adding four spaces or one tab for every level of nesting.

  1. Here is a thing.

      - See, it works.

          Nothing is amiss.

  2.  If you want to align everything…

      -   Then it looks like this.

          Then it doesn’t seem so weird.
(You can leave or remove the two spaces of HN code formatting; zero to three spaces don’t matter.)
show 1 reply
arccyyesterday at 1:34 PM

your markdown parser isn't compliant with commonmark: https://spec.commonmark.org/0.31.2/#example-294

indented code blocks are leaf blocks, while lists are containers that take precedence

kstrauseryesterday at 4:53 AM

That's a "feature" of a specific renderer. I just went 22 levels deep with Zed and Marked, and both kept rendering each line as regular text.

show 1 reply