qpixel icon indicating copy to clipboard operation
qpixel copied to clipboard

Code has syntax highlighting in comment thread pages but not inline comments

Open cellio opened this issue 4 years ago • 0 comments

https://software.codidact.com/posts/284928

A comment on Software Dev (where code highlighting is enabled) uses code and the highlighting shows on the thread page: https://software.codidact.com/comments/thread/4992 (third comment). However, if you expand the same comment thread on the question page, the code is not highlighted: https://software.codidact.com/posts/284910/284911#answer-284911.

I would not have been surprised if syntax highlighting didn't work in comments at all; maybe we don't want to pay that extra cost in performance and/or complexity. That it works in one of the two places but not the other makes me think this is instead an oversight, not an intentional decision.

Ideally we'd resolve the inconsistency in the generous direction, by enabling it in the expanded thread. Let's not remove it from the thread view; if there's some reason that we can't also do it in the in-page view, let's document that in an answer to the bug report from Software Meta.

cellio avatar Jan 02 '22 21:01 cellio