7

Tabs are currently rendered as spaces in code blocks. I'm sure this is just a symptom of Markdown or an otherwise well-intentioned method to standardise code samples... However some code needs tabs to work.

Consider the <<- EOF ... EOF heredoc in Bash. The dash means it will skip a number of leading tab characters. Not spaces. So when you advertise this feature (it makes code much more readable) and use it on the site, it breaks. The heredoc output is littered with leading spaces.

The example I used above is from Unix.SE. I believe this is as much an issue for them, just as it might be for any Bash-tagged question further afield.

  • I also had a issue with this answer on ServerFault - the makefile has spaces before make -C - a tab should be there instead, or else it gets a error about Makefile:4: *** missing separator. Stop. when using the make command. N.B. In most browsers, trying to type 'Tab' ends up selecting the next input box - tabs are however converted to spaces even when copied in. – Wilf Aug 2 '14 at 9:55

You must log in to answer this question.

Browse other questions tagged .