# Indenting code snippets?

A moderator edited one of my answers, but just to add indent the whole thing. See https://stats.stackexchange.com/a/22574/5503

This seems to be a pointless edit: if that kind of indent is desirable site-policy then it should be done in the site CSS?

Was going to revert the edit, but thought better to ask here if I'm missing some new guideline, before I get into a petty edit war :-).

• The R code was not indented, it was highlighted with the code fence: r .....  construction (and some other small edits), I find this code highliting to make the posts more readable, so is preferable. Feb 4 at 18:33
• This is a clash of an old and new method. The old method of indenting code has been superseded by preceding and following it by "`". When that is added to indented code, the indentation is rendered literally. The best solution is to unindent the code when converting to the new style (an onerous task with long code blocks). But generally, there is no imperative to replace the old style with the new. cc @kjetil
– whuber Mod
Feb 4 at 18:40
• @whuber: There is no imperative, yes, but I find the results of the new style (with code coloring) to be more readable. But I will fix the indenting! Feb 4 at 18:43
• @kjetil The code gets marked up in the old style, too, if you include a suitable comment or if you include the language among the tags.
– whuber Mod
Feb 4 at 18:46
• Previously, I've found the new style didn't necessarily work well, but the old style did. I sometimes edit to get proper code highlighting. Maybe it's finally been fixed. Feb 5 at 13:37
• OK, now I found the comment to include to get highlighting: <!-- language-all: lang-r --> Feb 11 at 18:59