Under review

Preserve indentation white space when posting comments.

Kris Nye 5 years ago updated by Andreas 5 years ago 3

When I post indented code such as the following, the indentation should be preserved and for bonus points it should be in a monospace font, like traditional code sections:


type: 'string'
type: 'key'


That's better than nothing, but it's more efficient when pasting code to not have to add ticks.

Is there any other situation where someone will enter a multiline comment where every single line begins with 4 or more spaces?

It would be nice to detect that and automatically add the formatting.

Satisfaction mark by Kris Nye 5 years ago

We do support the Github style markdown for code blocks, so if you add a line with three back ticks above and below your code, it will be formatted as you want (with color coding).

You want to give it a try and see if this solves it for you?

Under review

Ok, that's a fair point. We'll take a look at our markdown renderer and review that rendering of whitespace.

I often have a code block and some text to go along with it to explain it. That might be difficult to automatically detect since this extra text could just be a row missing indentation. The way I have made this easier to work with is autohotkey's feature hotstrings (autotyping the ´´´ ´´´).