Skip to Content

Code insufficiently formatted in answers and comments

Code insufficiently formatted in answers and comments, making code snippets unnecessarily difficult to read.

This is good, the code is clearly distinguishable from the rest of the text:

This is not good, and can even cause mistakes and confusion, as it is unclear where the code ends, and the normal text continues:

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Oct 27, 2017 at 08:51 AM

    Test answer with code

    TEST CODE
    END TEST CODE

    Test answer end.

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 27, 2017 at 08:15 AM

    Sorry, but not clear what is the issue? Code block has grey background...

    Add comment
    10|10000 characters needed characters exceeded

    • Code block has a clear grey background and demarcation in the question (first screenshot), but not (or hardly visible) in the comments (second screenshot).

      In this example the person posting the question could easily (unwittingly) copy the code including the "Regards," and get a big fat error when they try it out.

      Also a different code formatting in comments is entirely unnecessary. Comments are hidden anyway, so no worries that the entire question would become hard to read.

  • Oct 27, 2017 at 08:56 AM

    Yes, I understand your point:

    Code in the comment has no border, no space before and after, different font size and no syntax highlight.

    Minor bug, but for sure has to be fixed!

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 27, 2017 at 10:18 AM
    Add comment
    10|10000 characters needed characters exceeded