3 ms·
Markdown is mostly a failure. Yes, it's more convenient than writing your README in docx or txt, but if you want to do anything with it off the narrow beaten p
by ravenstine 5y ago
Markdown is mostly a failure. Yes, it's more convenient than writing your README in docx or txt, but if you want to do anything with it off the narrow beaten path, you'll inevitably have to extend it or give up.
For example, let's say you want something that's not supported by Markdown's syntax, such as dictionary lists, but you want to be able to use Markdown's text formatting syntax with it:
```markdown
<dl>
<dt>*foo*</dt>
</dl>
```
Most Markdown parsers don't apply Markdown parsing of text nodes within HTML elements. This is why the argument that Markdown supports HTML doesn't work, because it literally doesn't work for why we are using Markdown in the first place... which is to avoid the verbosity of HTML.
This kind of thing really bugs me. No matter what, whenever I've tried using Markdown as a tool for constructing webpages rather than snippets/comments within pages, I end up having to write a custom AST transformer to either get the parser to produce the right output or to prevent it from adding <p> tags around block elements that shouldn't have them in the first place.
Maybe a formal standardization could be the first step to actually addressing such issues, but it's questionable whether it's worth the bother.
- zzleeper 5y ago> Maybe a formal standardization In practice, that's what pandoc is (and it includes definition lists as extensions: https://pandoc.org/MANUAL.html#definition-lists https://pandoc.org/MANUAL.html#definition-lists ) You also have commonmark (an actual standardization) from the same author: https://commonmark.org/ https://commonmark.org/ (but DLs are not part of commonmark yet)
- lelandbatey 5y ago> Yes, it's more convenient than writing your README in docx or txt, but if you want to do anything with it off the narrow beaten path, you'll inevitably have to extend it or give up. This is true for everything that people actually use. What you just quoted, a "<dl>" tag, is a writing concept that I, and I think most people, have never heard of and have never used in written documents. Maybe that should change, but that's kinda how it is...
- toastal 5y agoAsciiDoc supports definition lists out of the box and I use it all of the time. Instead we see authors using headings above list which is technically incorrect, block quotes for admonitions, and many other poor uses of markup. The same community of devs that laughs at WYSIWYG editors and using bold tags and breaks instead of headings and paragraphs are abusing markdown; like pressing a B for bold, they look at what tools Markdown gives them visually paying no mind to the output markup.
- hinkley 5y agoI don’t want markdown to handle html, personally, because it makes it unfit for any use outside of a professional setting. For community wiki situations you do not want anything that is even accidentally Turing complete because you will end up with malicious content. In a work setting you are putting your job in danger if you do something like this, so there is mutually assured destruction. No such thing with random internet strangers. It’s also just a crutch. Thinking you can reach for HTML means you don’t find inspiration to solve problems like having anchors on headings