I Prefer RST to Markdown (2024)

buttondown.com

112 points by shlomo_z 4 days ago


Arainach - 3 days ago

Previously discussed: https://news.ycombinator.com/item?id=41120254

Copying my thoughts from there which haven't changed:

>To which I say, are you really going to avoid using a good tool just because it makes you puke? Because looking at it makes your stomach churn? Because it offends every fiber of your being?"

Yes. A thousand times yes. Because the biggest advantage of Markdown is that it's easy to read, and its second-biggest advantage is that it's easy to write. How easy it is to parse doesn't matter. How easy it is to extend is largely irrelevant.

Markdown may or may not be the best tool for writing a book, but Markdown is the best tool for what it does - quickly writing formatted text in a way that is easy to read even for those who are not well versed in its syntax.

I don't want to write a book. If I did I'd use LaTeX before RST. I want something to take notes, make quick documentation and thread comments.

jeroenhd - 3 days ago

I can see the advantages RST offers in term of HTML generation, but whenever I've needed to work with custom blocks like that, I've always just written HTML.

I'm not sure if <img src="file.jpg" alt="alt text"/> is less readable than

    .. image:: file.jpg
       :alt: Alt text
HTML5 allows for leaving certain tags unclosed (such as <li>, or <head> or even <p>) to such an extent that I find many template languages to not be worth the effort of their complex syntax.

Sure, there are three or four lines here that you can omit using RST or markdown:

    <!doctype html>
    <html lang="en">
    <head>
    <title>My blog page</title>
    <body>
    <h1>Welcome to my blog</h1>
    <p>This is a bunch of text.
    Feel free to stuff newlines here.
    <p>This is also a bunch of text
    <p>Here's a list just for fun:
    <ol>
      <li>This is the first item!
      <li>This is the second one!
      <li>Boom, a third!
    </ol>
    <p>Have an image: <img src="filename.jpg" alt="alt text goes here">
But is having to wrap a list in <ol> and closing the <title> really that bad?

Automatically generating an index and such is nice, but five lines of Javascript can do the same. Plus, you don't need to run a second tool to "process" your input.

I generally use Markdown as a standardised way to format text that will probably be read in plaintext by other people, but when it comes to formatting documents, I don't see the point of most complex template languages.

tambourine_man - 3 days ago

> Markdown is ubiquitous because it's lightweight and portable…

Markdown is ubiquitous because it’s easy for humans to read and write.

lifthrasiir - 3 days ago

Guaranteed, reST is more feature-complete and extension-friendly, but it is simply unusable for me because it wasn't designed for agglutinative languages like Korean. Markdown is much better in this case (though CommonMark has an annoying edge case [1]).

[1] https://talk.commonmark.org/t/foo-works-but-foo-fails/2528

bluGill - 3 days ago

My only problem with rst is that several useful the extentions are not updated. I have some great rst documentation, but part of that is I importing doxygen, dolphin, and other extentions that are useful but saddly not updated on the same schedule as the main tool. I end up many versions back just because it is all that is compatible.

still markdown just isn't powerful enough for anything non trivial.

jeberle - 3 days ago

The RST parser is available in only one language, Python. I don't want my content tied to a single language stack, regardless of how good it might be. Markdown parsers exist in any language I care to use.

ajross - 3 days ago

Everyone who works seriously with editing and formatting documentation for presentation prefers RST.

Markdown is for the people, almost never full time doc jockeys, who need to WRITE that documentation.

acidburnNSA - 3 days ago

For books or significant document sets I definitely agree with the author on this. The builtin features for glossary and index are also nice. The extensibility is amazing. Some people are even doing formal requirements and lifecycle management in RST these days!!

https://www.sphinx-needs.com/

mitjam - 3 days ago

MyST (https://myst-parser.readthedocs.io/en/v0.15.1/index.html) lets you write in markdown and still use roles and directives provided by Sphinx and its extensions.

cycomanic - 3 days ago

I have run into frustrations with Markdown and even had a short "I do everything in RST" phase.

At some point during that phase I tried org mode and it's better than both, it is easier to read/write than RST, and better for large documents than Markdown. Unfortunately it doesn't get accepted in as many places as Markdown.

Firehawke - 3 days ago

MAME's documentation was moved to Sphinx (and thus RST) a number of years ago. I headed up that project, in fact.

There was a significant learning curve getting good output when converting some of the old ASCII charts out of .txt files, but once settled it makes for a much better user experience and it auto-compiles to HTML, PDF, and even EPUB with zero additional effort.

I would definitely not want to go to Markdown from RST for technical documentation that's more complex than a Github readme.

lawn - 3 days ago

As a compromise, I prefer Djot to markdown.

It's basically markdown, but made to be easier to parse with explicit support for nice addons such as tables, divs, and attributes.

betaby - 3 days ago

'asciidoc' is the middle ground.

ekusiadadus - 3 days ago

I’ve never used reST since Markdown has usually been sufficient for me. However, I recently had a situation where Markdown became frustrating to work with. Indeed, once a document exceeds ten pages, I feel that reST would make managing it much easier.

It would be nice if emphasis and other inline formatting worked smoothly even in agglutinative languages...

stonecharioteer - 3 days ago

I was on that hill too. For years I used Sphinx and Furo to render my blog, which you can still access at https://old.stonecharioteer.com

I like the framework, but it ended up being too in the way. I am not an RST maintainer. I want to blog and get my thoughts out in the world.

I split my website to use different subdomains, and most of the posts in that old blog are now in https://tech.stonecharioteer.com which is on Hugo now. I used Claude to fix some Css annoyances with the Paper mod theme, and to migrate not only the posts from that old blog but also from the Jekyll blog that predates it.

I'm happy with the blog now, it's so out of my way that I can write without trying to figure out how to make Hugo do something like Sphinx-style admonitions. Claude is great for that. What else is there to complain about?

- 3 days ago
[deleted]
dangus - 3 days ago

> Now here's how to make an image in rst:

    .. image:: example.jpg
      :alt: alttext
That is some horrendous syntax.

I totally get the author’s power user needs, and the article states plainly that this isn’t for everyone, but there’s gotta be something with power AND earthly syntax, right?

freeopinion - 3 days ago

I'm interested in people's opinion of typst's ease of writing and reading when limited to the simple types of documents for which people use Markdown.

Do you think it makes easy things easy and complex things possible?

eviks - 3 days ago

> On the other hand, the markdown image is hardcoded as a special case in the parser, while the rst image is not. It was added in the exact same way as every other directive in rst: register a handler for the directive, have the handler output a specific kind of node, and then register a renderer for that node for each builder you want.

Why not "hardcode" the most common things to be the easiest to use and then still have the option to extend to other protocols? Why "suffer" every time equally instead?

physicles - 3 days ago

The author wrote a book, for which RST is undoubtedly the better choice. ("I wrote a book in Markdown" would be a surprising headline!)

But it's overkill for light documentation. Just look at their first example of embedding an image:

> ![alttext](example.jpg)

vs

> .. image:: example.jpg

> :alt: alttext

In the first one, it's just the syntax for a hyperlink with ! in front.

In the second one, there are several bits of syntax to remember. We have .. and then whitespace, and not one but two colons after `image`, and it's not `alt:` but `:alt:`.

I don't have to try to remember Markdown syntax, because it's simpler and it's ubiquitous. I type Markdown directly into Slack and Obsidian every day. Most tech-adjacent people know some Markdown.

Many years back a developer on my team decided that all the readmes that live next to source code should be in RST, because it's Better(TM) and we could have nicely formatted generated docs. The result was that a lot less documentation got written, and nobody looked at the generated docs anyway. Eventually we transitioned back.

cubefox - 3 days ago

Never mind RST, it would be nice to finally get Markdown and Latex support on Hacker News. Unfortunately the admin seems to be against it.

hoherd - 3 days ago

Does RST have a WYSIWYG editor? Linter that auto-corrects mistakes? Last time I looked neither of these existed. I have a bunch of rst docs that I want to to large edits on, and doing so has been so painful I've decided to migrate to markdown even though it's not as feature rich.

arkt8 - 3 days ago

The only change I do and expect of markdown is enforce blank lines as separators after *any* header and blocks and use the `*` as formatting.

Everything can be extended with fenced block.

RST is a lot more difficult to write and much more "groffy".

pavel_lishin - 3 days ago

These all feel like issues that power-users have, not an issue that lil' ol' me is going to run into while jotting down journal entries, or yelling at people on the internet with emphasis.

chuckadams - 3 days ago

The syntax for links in RST is:

    This is `a link`_

    .. _a link: https://foo.com
The underscores are required exactly like that. I believe the blank line between is also required. There's also an inline syntax where you use two trailing underscores:

    This is `an embedded link <http://foo.com>`__
I'd rather write raw HTML.
nialv7 - 3 days ago

Uh, why haven't we drilled it into people's brains that regex cannot be used to parse matching parentheses/brackets?