▲ | chrismorgan 3 days ago | |
Three space indentation is indeed the convention, mostly because of `.. `, but honestly `1. ` is nicer with three spaces too… unless you want to go to ` 1. `. Frankly, other than when inlining code that uses a different number of spaces, I think I visually prefer three spaces for something like reStructuredText, even apart from directives. `.. ` is a bit overloaded and I think better was possible. > The tables are insane, somehow they implemented something worse than markdown. To write without tools, I’ll accept it’s not good. But to read, it’s good. Also be aware you can get a table from nested lists <https://docutils.sourceforge.io/docs/ref/rst/directives.html...> or CSV <https://docutils.sourceforge.io/docs/ref/rst/directives.html...>. That demonstrates a nice bit of the power of the reStructuredText approach, I’d say. On the literal blocks `::` thing, it’s a little too magic for my taste, but in practice works pretty well. Based on your quote, you weren’t going through <https://docutils.sourceforge.io/docs/ref/rst/restructuredtex...>; I think that’s a better presentation of it, showing how it’s not three entirely unrelated things, but rather just two minimised forms of the complete thing. I’d say it does two largely-unrelated things only! (Aside: “a directive” in reStructuredText is the `.. foo::` construct. The `::` is not a directive.) > Like, why do literal blocks need be indented? I think you may be biased against significant indentation. It has advantages and disadvantages over fencing—and the most important disadvantages are really about <textarea>. I think things have swung way too far in the direction of fencing. I’ve been making and using my own prettiness-focused lightweight markup language for the last five or so years, and where I started out with only a little significant indentation (list markers), I’ve leaned ever more in the direction of significant indentation, because most of the time I find it to be better, and I reckon the results are very pretty. Remember also the Python background to reStructuredText in things like indentation and more specifically doctests. | ||
▲ | dangus 3 days ago | parent [-] | |
I can concede that it seems to make sense for Python, of course I can also imagine why it wouldn’t be a popular choice for general purpose use cases. |