cancel
Showing results for 
Search instead for 
Did you mean: 

Code insufficiently formatted in answers and comments

Johan_Hakkesteegt
Active Contributor
0 Kudos
263

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:

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member186338
Active Contributor

Test answer with code

TEST CODE
END TEST CODE

Test answer end.

former_member186338
Active Contributor
0 Kudos

Test comment with code

TEST CODE
END TEST CODE

Test comment end.

Johan_Hakkesteegt
Active Contributor
0 Kudos
former_member186338
Active Contributor
0 Kudos

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!

former_member186338
Active Contributor
0 Kudos

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

Johan_Hakkesteegt
Active Contributor
0 Kudos

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.