Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Markdown is more human-readable, easier to type, and more concise. Its lack of flexibility is an important feature, too (no JS, no styles, and only one way to make text bold).


> Its lack of flexibility is an important feature, too (no JS, no styles, and only one way to make text bold)

HTML has two ways to make things bold: b and strong. But only one way to make a toplevel heading, h1.

Markdown has one way to make things bold: ** **, but two ways to make a toplevel heading: # or ======

Other users have commented that Markdown in the wild is now little more than an alternative syntax for HTML, with scripts and other tags freely embeddable.

Moreover, HTML is basically HTML: we used to have problems with browser compatibility, but most of those are in the land of CSS and Javascript now. Whereas Markdown can be found in different flavors. Aside from the burden on the author to know what flavor they are writing, it limits the reusability of documents. Consider a git repo that has a Github-flavored README.md file written for github, but it is also shown as part of the package documentation in a language specific library repository that shows the same README.md file using a simpler flavor of Markdown. The basic tags probably all work fine, but the broken CI badges will perhaps make it frustrating to read.

HTML and Markdown both began with the best of intents as declarative document markup schemes. But because it is much harder to design a declarative programmer interface than an imperative one, both have accreted junk.


Markdown has broader applications than HTML though. Pandoc is my preferred document writing system for exactly that reason. Of course, when you go for the weirder branches of Markdown spec you'll get weirder results, but the documentation is fantastic, and it's pretty easy to stick to the golden path.


HTML has three other ways to make things bold using CSS

> Markdown in the wild is now little more than an alternative syntax for HTML, with scripts and other tags freely embeddable

HTML is not in the MD spec. We use a WYSIWYG MD editor so it's not an issue.


No JS? That’s news to me. I added <script> tags and custom HTML tags in the markdown and it worked. Check the source of this page (https://blog.nindalf.com/posts/how-to-learn-unix-tools/). It contains a CSS and JS declaration not present on other posts because they were included in the markdown.

Also if you want to fully commit to JS frameworks, you can. Some frameworks support MDX, which has full support for JSX tags. You can include react components right next to your text.


The lack of any formal specification means Markdown can be pretty much anything you want it to be (provided there a supported implementation)


All markdown parsers I've encountered add tags into the final HTML without modification. It might not be a part of the standard, but it's the standard practice.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: