On Mon, 22 Jan 2018 at 23:21, Norbert Melzer <timmel...@gmail.com> wrote:

In my opinion, codeblocks by indentation should be removed from the MD spec
> at all, they are not unambigous.
>
> Sometimes I want to have distinct code blocks next to each other because
> they show different ways of implementing the same:
>
>     def foo, do: 1
>
>     def foo do
>       1
>     end
>
> With indention based code blocks one can't tell if those blocks are meant
> to belong together or not, but with codefences this is easy:
>
> ```ex
> def foo, do: 1
> ```
>
> ```ex
> def foo do
>   1
> end
> ```
>

I use indented code blocks often because the plain text version of the
document flows way better for my taste. It reads like in traditional
programming books where the page visually consists of chunks of English
interleaved with indented listings in fixed-width font. Also, I don't value
syntax highlighting as much as to sacrifice this visual flow.

Since "paragraph" is a concept that belongs to natural languages, the
Markdown formatters that I've used understand that blank lines between code
blocks are no paragraph separators. In practice they do what you'd expect.
Even more, the original syntax spec covers this case in


https://web.archive.org/web/20040402183259/http://daringfireball.net:80/projects/markdown/syntax#precode

so that is not by chance. CommonMark has also the same rule here
http://spec.commonmark.org/0.27/#example-81.

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elixir-lang-core+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAM%3DYcdhFV8TmByCtPsRg24UCvbVMGZ8qVmqpY5j38%3Dg9VCHtcQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to