The question form always refuses the code I post because it is not formatted properly. The problem is that I am almost blind (visus 0.01 %) and have to use an 8× magnifier to see anything at all. If there are any spacings/indentation missing I cannot make them out (and I don't have anyone in my life who could help me). What can I do?
2 Answers
Try to get your question formatted enough to get through the automated filter, and if you don’t get it exactly right someone here can edit it the rest of the way.
Code fences are your best option for code. Simply add new lines (hit “enter” or “return” twice or so), then type three backticks ```
or three tildes (~~~
). Hit enter again and then paste your code. Lastly, close the code block with another new line of three backticks or tildes, whatever you used to open the block.
Here’s what it should be like, notice the fact that the fences are on their own lines:
```
Code here!
```
Hopefully, this makes sense and it helps you. If not, I suggest editing your meta question here to mention what error you’re getting (there is also an "edit" link under your post you can use).
-
2I'd suggest (exceptionnally) to add something like "sorry about the formatting, my vision is pretty bad" and people will edit the post to remove this message & will fix the indentation without downvoting– Jean-François Fabre ModMay 4, 2021 at 21:31
-
10But @Jean-FrançoisFabre the problem is that they don't get that far, probably because they missed a white line, have a single weird character in the first paragraph, have included a screenshot where the inserted reference isn't separated from the code / text, you name it. The point isn't that we are not wiling to help, the problem is, they don't get the bare minimum past some archaic / overly eager validation in the Post logic of SE. This site is pretty stoopid for users with visual disabilities. Not inclusive at all.– reneMay 4, 2021 at 21:35
-
A potential option would be to use a formatter like Prettier in your code editor and then paste the formatted code into Stack Overflow, usually helps my formatting issues!
-
1Why is this downvoted so heavily? I use the same method all the time. For complex code, I paste it into my favorite editor (Visual Studio or notepad++) let it format for me and then paste it back.– DevolusMay 5, 2021 at 10:30
-
really not sure myself why everyone has taken such issue with this approach, would be keen to hear some thoughts on it!– ctsMay 5, 2021 at 11:10
-
4Contextually this seems like the wrong place to make this suggestion, since we're talking about someone who is nearly blind. Copy/pasting stuff between applications just doesn't seem like the way to go.– GimbyMay 5, 2021 at 12:03
```
) before and after your code, in their own lines, with a blank line before the first and a blank line after the last triplet of backticks. See Implement```
-style (fenced) Markdown code blocks.