Things Markdown got wrong
swyx.io
swyx.io
_italic_
*bold*
instead of: _italic_
*italic*
__bold__
**bold**
because stars around a word make it look like it's glowing, sort of like bold does, and underlining a word means to make it italic. Does no one remember this?In English class, before computers, our teacher told us that certain words are always underlined: book titles, ship names, etc.
In Typing class, our teacher told us that if you submitted a typewritten manuscript to a publisher, what you underlined with your typewriter would be converted to italics in a typeset book. Underlining meant italics. And sure enough, nowadays when everyone has a computer instead of a typewriter, and can make real italics, they tell us that book titles, ship names, etc., ought to be in italics (the same things that my teacher used to tell us should be underlined) https://www.purchase.edu/editorial-style-guide/general-style...
I get kind of why Gruber did it his way. He was caught up in the Semantic Web, where you don't use <i> and <b>, you use <em> and <strong>, and <strong> means <em> only more so. So by that logic
*this*
is emphatic, and **this**
is strongly emphatic.Professional web designers have the same aversion that print designers have, they are birds of a feather. But now they have another reason to hate it. Underlining has come to mean hyperlink. Because of their original aversion, they will often use CSS to remove that default underline, maybe bringing it back only when you hover over a link. But because it is still a widespread convention throughout the web, and probably always will be, they would never, ever emphasize something by underlining (they use border-bottom ;).
Since you should underline something only if it is a link, which has its own markdown, and since underlining is ugly anyway, and since bold and italics are enough ammunition for all your emphasizing needs, and since it is an established convention from the old days that underlining meant eventual italics when it went to press, it's okay in my book to repurpose _underscores_ for italics.
Slashes instead on both sides like /this/ --- hmm, it's not bad. I'm undecided.
One of those words isn't supposed to be 'underline', right?
1. "Semantic web" refers to data being linked and having meaning. You're referring to semantic HTML.
2. I don't think <strong> meant <em> but more so - as I understood it, <strong> meant text that had to stand out from the rest, whereas <em> meant that text was emphasised. Though I might be confusing it now with the retro-actively applied "semantics" of <b> and <i>.
Totally agree with the overall point btw, and I do tend to use them in the way you described.
I guess it was an HTML 4 thing, the standard at the time of Markdown, https://www.w3.org/TR/html401/struct/text.html#h-9.2.1
<em>: emphasis.
<strong>: stronger emphasis.
I see that HTML 5 has tweaked their descriptions, https://html.spec.whatwg.org/multipage/text-level-semantics....
<em>: stress emphasis
<strong>: strong importance, seriousness, or urgency
Anyway, it was all a whole lot of "semantics-washing" anyway; it's lot like people strictly adhere to strong rules of when text should appear bold or in italics anyway.
Especially because org-mode lets you italicize //Face/Off// by adding more slashes, and so on for the others, like ==e = mc^2==.
Incidentally, I have no idea how you're typing literal asterisks, I gave up and am kinda jealous.
And underline.
I dont understand why they aren't used that way any more.
its actually ~code~ and +strikethrough+ .
[Official documentation](https://orgmode.org/org.html#Emphasis-and-Monospace)
Always thought the idea was that the first slash pushes the letters over, and the second one keeps them from falling down completely.
The unification of underline and italic is an artifact of the limited technology of the typewriter, and I see no reason to preserve that.
Funny thing happened when I tried to type that out: typing /italics/ caused libre office to automatically italicize the word.
Demonstration: https://codepen.io/adrusi/full/poJXRgy
//italic//
__underline__
**bold**The proper way to think about is s emphasis and strong emphasis. As user you shouldn't be concerned by how it looks. Thats job of overall design and that might change depending where you publish / who designed it. You shouldn't make that decision because you don't have the required context.
Italic will probably be the emphasis (although other designs are possible like change of color). Underline can be used for strong emphasis if it doesn't colide with links. Bold might be too jarring or not possible to use so designer might decide to not use it.
There are also other ways to emphesise like small caps or inline background colors.
As the writer of Markdown content, you're often both the user of the content and the publisher of the content, so you do care about how it looks. Even if you're just the user, your intention when writing is to communicate something, and the eventual appearance of your content impacts how it is interpreted by the reader. So you still care about how your writing will look, which forces you to care about how the publishing process interprets the markdown syntax.
When you publish book you have mostly zero power over how it will be designed. And honesty you should have zero power over it because there are people editors/designers/typesetters who dedicate their lives to exactly that. Better to let them handle it. Same goes for the web.
First, I think they could have repurposed the old tags. <i> can stand for "important," with a default style of italic, and <b> could mean "bold" in the sense of "strong" or "outstanding", https://www.etymonline.com/word/bold, with a default style of boldface type. You can still restyle them to your heart's content.
Second, italic doesn't always mean emphatic. Like I said, it is also a formal convention for: titles (books, movies, magazines), ships, foreign words, legal cases, etc. (Only of large works. For articles and other small works, you quote them. So for example, The New York Times should be in italics, but any particular article, like "Chiefs Win Superbowl", should be in quotes.)
Third, the tags are longer, especially <strong> instead of <b>. It's noisy. A quibble, you might say. But so is this whole topic. And there is a line where coding goes from fun to tedious.
Fourth, an asterisk looks stronger than an underscore anyway:
*this*
calls out more than _this_
So you could say underscores are emphasis and asterisks are stronger emphasis, even with just one on each side.There can any number things set in italic on page and none of them have to use <em>.
"italic doesn't always mean emphatic" is exactly the reason why i say think of it as emphasis not as italic.
Also emphasis/strong in html is mainly for general emphasis in paragraphs of text. It works pretty much like h1 and h2. The difference is that you have only two levels.
I'm a user and I care a lot about how my documents look.
Of course you are both writer and publisher you are also in control of the design. But when you are writing you shouldn't be thinking about how to present the text. These are almost always different processes (except rarer things like poetry or experimental prose that rely on whitespace). Write > edit > present/design.
A system that prefers semantic tags such as "emphasis" and bans direct formatting such as "italics" only works if you can import or define a semantic tag for "book title" that you know will be formatted correctly. It doesn't make sense to tag a book title with "emphasis," because there are a lot of different ways to express emphasis, and only one of them works (quite coincidentally) for a book title.
When I started writing a spec for Concise Text Encoding [1], I figured it would take about 6 months to nail it down (yeah, right). Even now, 2 years later, I'm still making amendments to it because of various things I missed or got wrong. It's either something I happen to notice in one of my many, many re-reads, or something that another person notices after a few minutes reading it over, or something that comes up while I'm writing the reference implementation. Getting a spec right is a marathon affair.
[1] https://github.com/kstenerud/concise-encoding/blob/master/ct...
> In any language design, the total time spent discussing > a feature in this list is proportional to two raised to > the power of its position. > 0. Semantics > 1. Syntax > 2. Lexical syntax > 3. Lexical syntax of comments
I’m pretty sure Vicent Martí (@vmg) was the originator of them. I remember we spent a number of weeks internally at GitHub debating the syntax, since no one really fell in love with any of the proposals for various reasons. Eventually the triple tick won out and that’s worked out fairly well, I think.
Where is your keyboard from?
I’m German myself, but I use the US keyboard layout for more than 15 years now, because it is so much easier to type things like this... especially in tech. (And also keys for [, ], { and } are much better placed in the US layout)
It gets even more difficult for notebooks: Any notebook you can buy here in Germany has QWERTZ. Want a notebook with US layout, because you are a developer? Your only options are BTO options from Apple or Lenovo. But even there, you have to be cautious: Dell for example will sell you „English“ keyboard layout notebooks as BTO option, but you won‘t get the real US layout (with a wide return and wide left shift key), but some kind of „International English“ ISO layout with a tall return key and a short left shift key... Lenovo has an „English“ option and thankfully you will get a keyboard layout that really resembles the US layout (but with an Euro key).
Only Apple really gives you „US“ as BTO option, and you really get the real US layout. Funny story, I wrote an e-mail to Apple, over ten years ago, when they didn‘t have US layouts as BTO option in Germany... I think it changed something, because one or two years later, Apple changed it, and you will get real US layouts ever since on their online store.
Also, when I lived in France, it was a matter of a phonecall to Dell to get a US qwerty keyboard instead of azerty. No problem at all. I think a colleague asked for an 'English' keyboard and got a UK qwerty, that's the only thing to be wary of.
Yeah, I‘ve seen that Dell for example sells US BTO options in the Netherlands, but in the past (when I considered an XPS 13), dell.nl didn‘t ship to Germany. But obviously the times have changed, and it‘s much easier today to get US keyboards than 10 or 20 years ago.
Real Dutch keyboard layouts never took off unlike what happened in France and Germany. We're not that dependant on our diacritic characters (although I am a stickler for correct usage).
Personally, I prefer the standard US layout, because I use more than one language. For Dutch („éë耔), English (“—”), and German („ßöüä”) the compose key does everything I need and more. For Japanese there is a dedicated IME (Anthy).
On Windows, I use WinCompose[1], which works decently well.
[1] https://github.com/samhocevar/wincompose (Trivia: WinCompose was originally written in AutoHotkey!)
Instead of having to type <Compose ' o> for a ó, I just type <AltGr+o> (or alternatively, <AltGr+' o>, and similarly <AltGr+` o> for a ò)
I can't stand those weird alt-codes Windows users end up memorizing. You only know those characters for which you've learned the codes. With the compose-key, you can guess anything that is diacritic character, and lots more besides¹.
I showed a colleague on a Windows computer WinCompose when she got wanted to be able to easily type a number of special characters (like en- and em-dash) without having to hunt for them in a character map or remember arcane alt-codes. She's not a developer, but it clicked instantly. Just think of a logical sequence, and get the character you want (for en- and em-dash its [compose - - .] and [compose - - -], respectively).
1: Like superscript numbers. Once you know that [compose ^ 1] yields ¹, you know ²³⁴⁵⁶⁷⁸⁹⁰ too.
Wow, I honestly didn't know how widespread non-QWERTY keyboards are in Europe. Wikipedia has a nice map.
https://en.wikipedia.org/wiki/QWERTZ
I live in Poland and we pretty much exclusively have QWERTY. QWERTZ is a historal artifact. Not sure if that's still the case but at least until recently, it was installed by default on Windows as an alternative layout, seemingly mostly to confuse non-technical people when they accidentally press the Ctrl+Shift combination to swap.
- ANSI is the same thing as US, it's the one with a long left Shift and single row Return
- ISO is the one with a short left Shift, two row Return, and the [| \] key in two places
I've certainly used both throghout my life, it seems both are common enough that I never paid it much mind after first learning how to handle a computer during early childhood.
I just checked and out of the 5 keyboards in my home right now, 4 (laptops) are ANSI and 1 (standalone, my daily driver) is ISO.
Those exist here in the US too. They're just a lot less common. I've had the misfortune of having one, in the past. Needed a new keyboard, went to the store, got the cheapest one, came home to... "what is this layout?!"
Depending on your keyboard it might be easier to type.
Coding on the Hungarian keyboard is a nightmare, I don't know how others can do it.
But I've grown up learning programming on US-layout keyboards.
I tried this for a week several years ago; it was not a success. Aside from all the muscle memory re-learning, I also found that I used the number more often than I had thought.
What I do these days just make Vim abbreviations; for example 1= becomes !=, ;= becomes :=, etc.
You know how I use Markdown 99% of the time? Vim. I LOVE that it is simple and easy to read in a text editor. I spend a lot of my time in the terminal and that's WHY I use Markdown. If I wanted fancy things that display better in a browser, I'll use something else. I look at Markdown as great because they kept it simple. I can read it easily in vim and I can have some nice features in a browser (i.e. my GitHub repos don't look like they're from 1995. But they also don't look like a Geocities nightmare).
I use Markdown to document code. I use it to keep notes. I use it to track tasks. Etc. It is my digital pen and paper BECAUSE it is simple, because I can read it in the terminal just as easily as I can read it on the web.
Keep Markdown simple.
I'm actually surprised the absence of tables didn't make this list.
|column 1| column 2|
|:----:|:---:|
| 1 | 2 |
But consider also that you are "using" Markdown when you read Markdown written by others, on documentation, in a browser. A wholistic accounting would probably move Markdown higher than 1% of your time!
I hate that I have no idea how it will render on Github or wherever without actually pushing a test commit out, or using Github's interactive UI + copypaste to preview.
There's a bunch of command line tools and libraries implementing a variety of incompatible supersets of markdown.
Anyway, you can write Markdown-style plaintext documents without trying to conform to Markdown. The point of markdown is to be able to render those straightforward documents as pretty web pages without the degree of uglifying and boilerplate markup that HTML requires.
Stick to PDF then since otherwise you have little to no idea how something else will render on the end user's device.
I used to do this a lot, until I discovered Markdown Preview https://github.com/iamcco/markdown-preview.nvim
In other words, Markdown is not designed to be a simplified markup language for HTML. It's designed to make HTML a frontend for plaintext. The numbered lists with *., for example, would be totally unreadable in plaintext without context.
I @'ed John Gruber on my original tweet and readers might enjoy his response: https://twitter.com/gruber/status/1240888155307495426
I've never liked emacs, but I keep it around for Org, which I use most often as a LaTeX generator without all the ceremony of actual LaTeX.
I may love Emacs but I want to be able to edit my project with something else if need be (IntelliJ IDEA?) and I definitely don't want to force my users to any particular IDE. Making my project only really accessible to Emacs users just to be able to work with document files seems like a very good idea if I want to discourage them from ever looking at it.
If you're just looking to edit Org files, Emacs is hard to beat. I don't use Org files so much anymore, more OmniFocus & Markdown/Sublime.
Once you leave Emacs you are left with pretty standard file format with bunch of peculiarities that don't make much sense outside of their intended use.
I haven't seem other editors get close to the convenience and integration org-mode has in emacs. For example, org-babel lets me dynamically generate entire sections of a README on github[0]:
#+BEGIN_SRC python :results output raw :format org :exports results
... elided python to generate org mode ...
#+END_SRC
Not to mention org-capture, org-agenda, or the various org-export-* functions. The deep hackiness of emacs lets this stuff just work naturally. And the quality of org-export is just amazing, especially when compared to say pandoc. I have done all of my university assignments in org-mode, augmenting with latex where required, and it just works. Same concept with my website, I have a tiny function to turn org-mode buffers into live html rendering experience with basic elisp: (defun make-blogging-mode ()
(interactive)
(toggle-word-wrap)
(toggle-truncate-lines)
(flycheck-mode)
(flycheck-vale-toggle-enabled)
(add-hook 'after-save-hook 'org-mode-export-hook)
)
And a file hook (at the top of the org mode file so it runs automatically for me) # -*- find-file-hook: make-blogging-mode -*-
This isn't just a simple, context-free grammar that any other editor can emulate. It's an entire ecosystem that needs to be translated, and many have tried and failed.Edit: Forgot to mention tables and the spreadsheet feature. Another hurdle a text editor will need to implement to recreate the experience
[0] https://github.com/dpbriggs/redis-oxide/blob/master/README.o...
There's no reason why, in 2020, these aren't available everywhere. Just like every text editor can understand emojis (with colors even!), these simple formatting rules should be baked into every platform by now, and easily used on everything from PCs to phones to TVs, in every editor from Vim in a terminal to email to iMessage to Wikipedia's text entry box. Just like emojis are. It's truly insane we haven't standardized this yet. How old is RTF or PDF? Doing this basic formatting in ascii text is just mind-numbingly stupid.
There is no magic, they do it by literally exchanging HTML on the clipboard. Applications use it as a lingua franca and convert the text into whatever form they use internally.
[1]: https://docs.microsoft.com/en-us/windows/win32/dataxchg/html...
The format is actually negotiated by the communicating applications so it quite can be RTF too, depending on what formats the applications can produce and understand and the priorities they give to them.
People have been typesetting research papers in LaTeX for awhile, and that's not much different. The beauty of plaintext is that it is easy to both read and author, and almost any tool can do the job.
> Doing this basic formatting in ascii text is just mind-numbingly stupid.
We write programs in text, and they're capable of exhibiting an unlimited assortment of behaviors.
Using a wysiwyg tool is burdensome, inaccessible, hard to automate, and doesn't integrate with the myriad of other tools we have available.
It seems to me that md won out because SO and reddit were using it.
I remember that I was partial to Creole when I was looking at lightweight markup languages.
If you're interested in a md-like language with more features have a look at pandoc's markdown.
Nope, ascii more or less represents your keyboard. Using ascii as user input has zero dependencies. Are you really suggesting some binary encoding for formatting, that is only possible with the respective tooling? I see only disadvantages in that.
I implemented a "markdown-like" parser, and I noticed the biggest problem is that the edge cases are a mess, the notation is a mess, and doing efficient single-pass parsing is unnecessarily complicated (urls are also an unnecessarily complicated element that hits a parser of this kind, but that's a story for another day).
I generally agree that making special unicode characters to represent these things could go a long way into making everything easier to understand, parse, disambiguate.
To be fair, this could be tested without insane effort: unicode has a range of characters reserved for private use. Adapt a font and make a simple online editor where holding some key will make javascript generate the appropriate unicode character. We should just try it and see if it's really better.
If the concept works out well, same as we have modifier keys for alt, shift, ctrl, etc., we could use that and integrate in keyboards without much trouble. Of course, it's a big change, but I think it's being proved that there's a common set of markup needs that most platforms should handle.
And many might say: well, it's not like everyone needs to implement markdown, we can have a single implementation and re-use it. It's not such a big deal. Well, I'd argue that the right approach is make things as simple as they can be. This kind of markup is necessary, but we can make it much simpler (now someone might say that pushing more things into unicode is not a good idea, as unicode is far from as simple as possible and perfect, but that shall be discussed another day too).
It might be today, but many of us who are older used Markdown-like formatting even before Markdown was even a thing, because on BBSes and other applications, everything in those days was plain text.
I don't know Gruber's intentions when he created Markdown, but my guess is he created it for himself first, and then other people adopted it because they think similarly.
From a practical point of view, markdown you can diff, you can copy it around without edge cases, etc. There's a reason people use Latex rather than Word which is evident the first time you have to spend 30 minutes fighting Word's formatting edge cases.
I'm also not sure it would even be better; I've never encountered a graphical editor that didn't make me want to throw my computer out the window; stuff like text becoming bold when I don't want it, adding to a list (especially with copy/paste), etc. all tends to be quite annoying and stuff I need to think about. With Markdown, I don't really need to think about the formatting, not more than regular typographic formatting anyway (paragraphs, punctuation, etc.)
I don't :D
input file | my score | article score | ratio
-----------|----------|---------------|------
stripped.txt | 5262321 | 5499341 | 95.7%
s2.txt | 5510008 | 5499341 | 100.2%
vs .Table Scores
|===
| input file | my score | article score | ratio
| stripped.txt
| 5262321
| 5499341
| 95.7%
| s2.txt
| 5510008
| 5499341
| 100.2%
|===
And that's just two lines of four columns - I've got blog posts with 20 lines of 5 columns. It would be heartbreaking to type that in.I think the complexity of asciidoc is probably why there are only a couple implementations though, which is a real bummer.
and yes - tables are much nicer in asciidoc
When a website uses Markdown for input, it's extremely tough to be sure of how to format certain things, especially when multiple different syntaxes combine. (I'm thinking of things like list+code block; or bold+italics, or list+line break, etc.)
That has not stopped countless applications from using CSV because it's so useful to have a simple transfer format. CSV corner cases usually don't hurt too badly because you can usually rule them out based on the source or sink of the data.
Markdown originated as, basically, one guy's attempt to convert instances of unofficial text-formatting convention, commonly used in text-only communication such as emails and Usenet, into HTML that can be presented on the Web. In order to do that he had to enforce some standards, while still leaving some flexibility (which is why the top levels of headings have more than one forms; both were commonly used to designate the same thing).
It was only after companies like Stack Exchange and GitHub started using Markdown as, ironically, a markup language, that there were any attempts to enforce a standard. I clearly remember a whole online "war", for the lack of better term, arguing pros and cons of standardisation.
My solution that works with most Markdown variants is to use inline HTML to define an anchor directly before (or after) the header.
<a id="stuff"></a>
### Things about stuff
But of course this isn't much cleaner than just using inline HTML for the header itself. <h3 id="stuff">Things about stuff</h3>careful not to penalize the 99% usecase for a slightly better 1% usecase.
### Things about stuff {#stuff}
Hugo works that way by default, and I copied that syntax for Zola in https://github.com/getzola/zola/pull/685 last year.https://github.com/ashton314/marked-man
Hope someone might find it useful. :)
mdv () { pandoc -s -t man ${1:-"-"} |groff -T utf8 -man | sed 1,4d | head -n -4 |${PAGER:-$(DN=/dev/null; which less &>$DN && { echo "less -FRSEX"; }|| which more 2>$DN || echo cat)} ; }
from my answer here: https://stackoverflow.com/a/61029131/5208540
This is a shell function to add to your environment
When you're reading raw markdown they're extremely useful for short snippets since they save you two wasted lines per block.
You're right. The problem with the statement is that there's a presumption Markdown was created for the world at large, and I think it was originally designed for one "customer", who also happened to be the creator. Which means Markdown got it right.
* Markdown in HTML. NO!!! That would drive me crazy. I use HTML all the time for diagrams. If I had to be aware of every tiny place where my content in the diagram was going to get munged by the markdown parser I'd tear my hair out.
* * vs - I've used * my entire life for lists, decades before markdown existed. Never heard of using - for lists until yaml
* auto numbered lists. NO!
The problem is it's nearly impossible to keep your formatting right if you have a long item lists. I often write answers on s.o. where it's like "You have 3 issues. 1. several paragraphs 2. several more paragraphs and code samples. It would be absolute hell to have to figure out the formatting to make sure auto numbered item 2 stayed 2 and didn't become 1 in a new list
* code block indentation - agreed that code fences are generally better. Worse most places I enter markdown (stackoverflow) don't have any indenting/outdenting editor controls which makes it really painful. Either I had to manually indent 5 to 50 lines or else edit outside stack overflow and paste in. I know stackoverflow has Ctrl-K but it doesn't work once you take in account the list indentation issues.
* no syntax for adding classes
I don't mind that. It kind of feels like part of the point. If I need a class I use embedded html although that's another place to rant. Inline HTML uses markdown where as self contained HTML does not. I'd prefer they both didn't. In other words. If you put
The big <span style="color: red">*bear*</span>
you'll get a italic red 'bear' but if you put <div>The big <span style="color: red">*bear*</span></div>
You'll get red '<asterisk>bear</asterisk>'Ok, I give up. no idea how to put an asterisk on HN. >:(
As mentioned above I'd have preferred no markdown in HTML as it's bitten me quite often trying to color code variables in a math description that uses * and having the * get eaten by being parsed.
* Ids - The id thing does bug me too. Markdown generates ids based on headlines but that's way too brittle. Edit the headline and your ids break. I also wish auto-numbered footnotes were a standard feature that worked by id so I could do something like [-fn-](#someid) and later #fn-someid paragraph a it would insert [<num>] at the top and link to #fn-someid at the bottom.
> The problem is it's nearly impossible to keep your formatting right if you have a long item lists. I often write answers on s.o. where it's like "You have 3 issues. 1. several paragraphs 2. several more paragraphs and code samples. It would be absolute hell to have to figure out the formatting to make sure auto numbered item 2 stayed 2 and didn't become 1 in a new list
I think you and the author agree on this point: Markdown does have auto-numbered lists, and the author of the blog post believes that was a design mistake. If you write a Stack Overflow post with a list numbered 3, 2, 1, it will be rendered as 3, 4, 5.
The goal was simplicity and readability in plain-text email and Usenet posts so I'm not surprised that fifteen years from its inception, and thirty or more years on from some its antecedents, we're using text and thinking about how we use text differently. One of Markdown's pivots from setext was the addition of code blocks. In the environment that setext was created, a code block would simply be rendered much like everything else: in the plain and probably fixed-width display that your email was also displayed in. By 2004, email had rich formatting, Usenet was on the wane, and people still needed a lightweight text format to share. Markdown filled that need, as did a number of other similar alternatives, though I forget their names.
My first exposure to such lightly-formatted ASCII was setext [1] which was the format chosen for the Mac- and Apple-oriented TidBITS email newsletter [2]. As a contributor to that newsletter, Gruber would have been intimately aware of the format.
Twenty years ago, I used setext in code projects basically the same way as nearly everyone uses Markdown now. I like OP's suggestions though I've always liked the 'lazy' approach to ordered lists.
[1] setext: https://en.wikipedia.org/wiki/Setext
[2] TidBITS: https://tidbits.com
no one wants the myspace outcome of simplifying messages. you usually don’t need much styling but the tools that markdown includes are good enough. if you need more you probably want to ask why you’re writing in a place that only accepts markdown
Markdown is great but there are some minor points where it fails spectacularly with only minor tweaks needed to improve it tremendously. Also code ticks at its point to most are just considered part of “standard” markdown.
This. If I were to guess, Gruber made Markdown to make writing for his blog easier. Then he made it available for whoever wanted to use it too, which was very nice of him.
Given how there are already multiple flavors of Markdown available that address various shortcomings, I don't know if there's a point to critiquing Gruber's original version of Markdown since it was likely created to satisfy his writing requirements first and foremost.
https://stackoverflow.com/questions/60995936/vertical-table-...
Lots of other things I hate more than this, but dagnabit this drives me nuts too!
Markdown is harder to work with in the long term than just wiring HTML with Emmet. That's my opinion a few years ago and these days I'd double down on it as editors are so good.
Tables suck in everything so we should standardise a json and/or csv import language to drop tables in a built time anyway.
Markdown is good for notes. Even mermaid diagrams are kind of unpleasant to write.
I realize this would conflict with automatic syntax highlighting, which is probably why it is not allowed.
The author has found a sweet spot between being very conservative with the original declarations and adding the missing functionality. It also comes with an amazing lightweight implementation written in C that behaves correctly: gets input from stdin or a file and passes it to stdout, without the -o flags that (e.g.) pandoc is using.
```
***
property1: ...
property2: ...
***
code
```
This way multiline properties are supported and I can also incorporate markdown inside the properties themselves.1. If you use “5.”, it’ll give you a five. If you want auto-numbering, use “#.” as your prefix. (While I’m thinking of it: I hate that using actual Unicode bullets like “•” doesn’t work in Markdown, and that in https://talk.commonmark.org/t/unicode-character-bullet-u-202... it’s been actively rejected for CommonMark.)
2. Code blocks are by indentation only, no fencing, but avoids confusion about indentation levels by defining all of that stuff properly and having it match visual usage, rather than Markdown’s crazy “four spaces, but in certain situations we’ll let you get by with 3, 2, 1 or even 0—but if you then seek to nest, remember to bump it up to eight rather than just N+4”. Code blocks are indicated by `::` at the end of or as the entire previous paragraph, which is esoteric, but also fits in very well with its directive syntax, which is how you can attach extra metadata to code blocks. It’s definitely not as simple as the newer Markdown fencing approach, though it fits into the rest of reStructuredText in a sane and principled way so that it’s not at all hard. Still, I think that a new version of reStructuredText would quite possibly include fencing in some form—or maybe directives would be resyntaxed to be able to be fenced rather than indented, though achieving that while still allowing nesting would take care.
3. Markdown in HTML in Markdown? That Markdown extends HTML is the real problem here, and is both its greatest strength and help in adoption, and its catastrophic weakness. reStructuredText is a language of its own that doesn’t extend anything, so that style of HTML output is typically done by defining new directives, which can then contain reStructuredText. It’s strictly less powerful, but it composes way better. As a workaround, the `raw` directive lets you put in arbitrary HTML (or LaTeX, &c.).
4. By deliberately not being HTML, reStructuredText handles this sort of thing much better. Each node in the document can have classes (which will end up as class="…" in HTML, something else in LaTeX, &c.). You can do things like `.. class:: …` to apply a class to the next block (heading, paragraph, list, &c.). Most directives support a :class: option. You can define new roles so that :classname:`…` will do what you desire. And none of this is then tied to HTML.
5. reStructuredText lets you define anchors at any place in the document (which can also be used for index entries when writing books or things like that). `.. _anchor-name:` above the heading will do it thus. This protects you against the anchor changing (and thus breaking links) if you change the text of the heading. Any form of automatic heading ID generation is left to the software to decide, e.g. Sphinx generates IDs by default.
6. Field lists. A field list at the start of the document is treated as document bibliographic data, and you can put anything in there you like.
I myself prefer reStructuredText in almost all regards, but I scarcely use it any more other than for a couple of types of personal documents, because of the ubiquity of Markdown. It was similar with Mercurial and Git.
If I'm ever involved in designing a syntax like that, the first hard and fast rule will be that the user should never have to count anything, especially in relation to anything else.
In more recent times, convenience of writing has become a more important concern to people, because these formats have shifted from niche use by dedicated people in real text editors that would like what they see to match the end result fairly well, to mainstream use in textareas and similar, and sometimes even WYSIWYG editors. That’s what’s driven people to prefer the convenience of code fencing, because indenting each line in a textarea is a pain. Ditto on headings. If reStructuredText were being redone now, I think it’s fair to say that prefix rather than underlined headers would be at least an option. It would just remain to be seen whether they went with `###` meaning level 3 even if there was no `##` or `#`, or whether they’d boost it up to level 1 or title, as appropriate.
I'm not saying that to be cheeky. The article can be boiled down to that because the author is looking for HTML features in Markdown, when there's very little need. e.g. we don't need classes in markdown and we don't need IDs or `name` attribute specifiers because that can be accomplished already by mixing in the HTML that one needs.
The original idea was to take emergent syntax used by text file authors as cues for humans reading text files, and use that as a syntax for generating HTML, so you could use text files as the source of truth for generating HTML.
Backticks aren't an emergent syntax used by text file authors as cues for humans reading text files--that's a syntax directly intended for generating code blocks in HTML, with little semantic value if the markdown is going to be consumed as text.
If your goal is to have something consumable as both text and HTML, then some sacrifices have to be made, because text simply can't do everything that HTML can. The error-prone indentation syntax is just a compromise, but there were features that were left out completely. The original markdown didn't contain underline or strikethrough, for example, because text can't do those things.
The problem is that for a few years, this idea turned out to be useful as a way of allowing users rich text editing capability on websites. So people wanted Markdown to do everything that HTML could do, hence we get underline, strikethrough, code fences, etc. This hurts use cases where markdown is used for its original purpose, because modern markdown isn't as nicely consumable as text files, but users didn't care because they weren't using Markdown to be consumable as text files. And this made sense for a while.
And where this becomes stupid is that if you don't care about it looking nice as text, then you shouldn't be using Markdown. There are a wealth tools for rich text editing on the web (TinyMCE being the most obvious choice, but not the only one available) and they're FAR superior in user-friendliness to Markdown. Many actually support Markdown, but there's less and less reason to even expose that functionality to your users. If you don't care about how your Markdown looks as text, then just use HTML and edit it with a rich text editor.
There's another use case where you want to compose HTML content without the overhead of actually writing HTML, but you want to "do it like a coder", so using a rich text editor isn't appropriate because you want to be able to diff and whatnot. But in that case, there's still no reason to be using markdown, because if you're "doing it like a coder" than you can just write code which makes what you're doing much clearer, and give you a lot more power. Textile, Org-Mode, LaTeX are all better options.
GitHub has persisted in using Markdown well past the advent of mature web text editors, because they still seem to be operating under the illusion that nontechnical users will become a significant part of their user base. Slack and Reddit are both moving toward fully rich text, and the fact that they are still trying to expose their Markdown roots just makes their rich text painful to use. MediaWiki using their markup language still, probably because they are blocked by the enormously difficult task of migrating an enormous amount of content, but if you're starting a new project, you don't have any of the tradeoffs that these organizations do, so you shouldn't make the mistake of following in their footsteps.
> differnt types of content.
For instance, I'd want to do the example in the GitHub flavored markdown with tags like <article> or <aside> around markdown-like syntax. Markdown is so easy compared to HTML, so I want that ease in my article-writing workflow.
I was considering using HTML directly in a templating language, but I want it to be a more human-friendly text format, like Markdown.
1: https://pandoc.org/MANUAL.html
2: https://www.aib42.net/articles source at https://github.com/aib/www.aib42.net/tree/master/articles
1: https://github.com/markdown-it/markdown-it 2: https://github.com/arve0/markdown-it-attrs 3: https://metalsmith.io/
I was running into issues where some feature idea I had (ex: a way to expire an article based on some "code", like a function to check if Debian 10 is EOL yet in an article on how to install Debian 10) wouldn't be supported by my static generator, so I wanted to write my own or fork it, but instead I can just write modules for metalsmith or markdown-it for different features I need, it's perfect.
https://emacs.stackexchange.com/questions/14320/org-mode-lin...
At 10pm I had a call with [#karl](Karl).
```turtle
@prefix p: <http://example.org/person/>
@prefix r: <http://example.org/relation/>
@prefix owl: <http://www.w3.org/2002/07/owl#>
p:karl owl:sameAs <#karl> ;
r:author <http://example.org/books/NestOfTriples>
r:friend p:pat
```It’s just what I wanted. Something text based, where I can sorta control some formatting, but isn’t tag heavy like HTML.
I just need it to format a few things, to make it easier for myself to consume later.
The most useful for me is actually the syntax highlighted code blocks.
I use it mostly for brain storming, planning, and scratch work.
Also, since you don’t know window width, that can happen even if, on your terminal, the last line of a paragraph is only 3 characters and the first word of the next is “A”.
Have you written traditional plain text emails or write any plain text documents? You almost always hard wrap your lines for readability. Even in HTML, newlines are mostly equivalent to just spaces.
"When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return."[0]
It supports code well, it supports non-enumerated lists well, it supports enumerated lists well (if you don’t want view it in rendered markdown, you can view the raw and just disregard the numbers, understanding that the items are supposed to be sequential). It supports links well. It supports images well. It’s easily readable, even with no prior context (@toml, yaml, etc.).
It does whatever a static website could want, and it does it all decently well.
Thankfully it also renders Org files pretty well, which AFAIK supports everything listed and more.