The discussion, Unexpected formatting in triple-tick code blocks, revolves around improper formatting in triple-backtick code blocks. ganncamp noticed that some formatting is applied in these blocks, sharing a screenshot to demonstrate. per1234 inquired about the “Default code lang” site setting, which ganncamp revealed to be set to auto. supermathie explained that the auto language detection is causing the issue, as it incorrectly detects the language as markdown. To resolve this, supermathie suggested changing the default code language to text or specifying the language for each code block, such as using text to prevent formatting. renato added that this is due to syntax highlighting with the wrong language after HighlightJS auto-detection, which does not occur on Meta because the “Default code lang” is set to text. ganncamp questioned why formatting would ever be applied in a code block.
I know a new editor is in the works, but presumably the underlying markdown will be the same, and its interpolation will stay the same, so…
In triple-backtick (```) code blocks, I’ve noticed that some formatting is improperly applied. Here’s a screenshot from me fixing a user’s post. This is the before: