Tab size of code blocks
michel.fortin at michelf.ca
Sun Oct 2 07:25:28 EDT 2016
Le 2 oct. 2016 à 6:24, Igor Zhbanov <izh1979 at gmail.com> a écrit :
> Markdown allows to include code blocks by using
> printf("Hello World¥n");
Technically this syntax is an extension that is not part of the reference Markdown spec. But it's true that many (most?) Markdown parsers support it today.
> But it doesn't allow to specify the tab size (number of spaces). As I see,
> Markdown states that the tab size is 4: "To produce a code block
> in Markdown, simply indent every line of the block by at least 4 spaces
> or 1 tab."
You will have to check if the parser you are using has a setting like this. For instance, there is one called [`tab_width`] in PHP Markdown. But note that its effect will apply to everything in the document, not just code blocks, so be cautious about using tabs to indent lists and other things if you change this settings. Most likely, Gitlab uses another parser, so it it might behave differently if it has such a setting.
More information about the Markdown-Discuss