Re:The Problem with Linux Kernel Documentation, and How We'r...
by eliben on Wednesday September 28, 2016 @12:59PM
(#12599297)
Happy to see they pick ReST over MD. ReST is vastly superior for these purposes, in my experience.
[ Parent
| on HN ]
Re:The Problem with Linux Kernel Documentation, and How We'r...
by Poiesis on Wednesday September 28, 2016 @05:11PM
(#12601400)
Mind explaining why? I like Markdown but would like to know what ReST does better.
Re:The Problem with Linux Kernel Documentation, and How We'r...
by has2k1 on Wednesday September 28, 2016 @05:53PM
(#12601647)
ReST can be better extended without creating a variant of the markup language [1]. Extension support is first class [2], and it is by that means that a good number of the core features are implemented.
[1] For example, github flavour, stackoverflow flavour, reddit flavour, ...
[2] Roles and directives.
Re:The Problem with Linux Kernel Documentation, and How We'r...
by catdog on Thursday September 29, 2016 @08:07AM
(#12604623)
One large difference is that Markdown exclusively targets HTML as an output format where ReST tries to be format agnostic. If you only ever target HTML this might ease some things but not if you want html, man pages, pdfs, plain text, …
Re:The Problem with Linux Kernel Documentation, and How We'r...
by eliben on Thursday September 29, 2016 @12:13PM
(#12606429)
ReST is a whole multi-document system, as opposed to MD which is just the formatting (at least before you mix in the dozens of mutually incompatible extensions). ReST is a superset.
Re:The Problem with Linux Kernel Documentation, and How We'r...
by dend on Wednesday September 28, 2016 @01:45PM
(#12599690)
Depends. We use Markdown pretty extensively and the drawbacks listed on the site don't really apply - you can always either:
1. Embed HTML (more or less preferred, depending on your situation). 2. Create an extension.
Re:The Problem with Linux Kernel Documentation, and How We'r...
by Arnavion on Wednesday September 28, 2016 @02:26PM
(#12600022)
>Embed HTML (more or less preferred, depending on your situation)
But then you can't embed markdown inside the HTML, like code blocks inside a table. Sure you can use <pre><code> tags, but then you lose syntax highlighting.
Actually I've always wondered why no MD renderer supports something like
<code data-lang="js">
which it then treats the same as a ```js
code block. Or a pseudo <x-markdown> element...
Re:The Problem with Linux Kernel Documentation, and How We'r...
by skystrife on Wednesday September 28, 2016 @03:39PM
(#12600626)
Kramdown supports this with markdown="1" as an attribute on html tags: http://kramdown.gettalong.org/syntax.html#html-blocks
Re:The Problem with Linux Kernel Documentation, and How We'r...
by Arnavion on Wednesday September 28, 2016 @04:12PM
(#12600920)
Not only are you correct, you allowed me to find an equivalent feature in CommonMark! If there is an empty line between some content and its wrapping HTML tags then that content will be interpreted as markdown. So
<td>
```js
console.log("Hello, world!");
```
</td>
will work as expected. http://spec.commonmark.org/0.26/#example-118 and further discussion at http://spec.commonmark.org/0.26/#example-153VSCode's markdown preview renderer ( https://github.com/markdown-it/markdown-it ) implements CommonMark, so I'm very happy right now :)
Re:The Problem with Linux Kernel Documentation, and How We'r...
by LukeShu on Wednesday September 28, 2016 @04:17PM
(#12600973)
> But then you can't embed markdown inside the HTML, like code blocks inside a table. Sure you can use <pre><code> tags, but then you lose syntax highlighting.
Pandoc supports this with the `markdown_in_html_blocks` option.
Re:The Problem with Linux Kernel Documentation, and How We'r...
by grive on Wednesday September 28, 2016 @04:10PM
(#12600896)
3. Pick a language that already supports it and is stable, standardized, without having to whip out some specialized version just for your codebase.
Re:The Problem with Linux Kernel Documentation, and How We'r...
by dend on Wednesday September 28, 2016 @04:28PM
(#12601077)
Not like you have to do anything to get it to work OOB, but your mileage may vary. One of the benefits of Markdown is that it's easily understood by people new to the doc space. RST is slightly more complex and has more rules added in.