Skip to main content

Questions tagged [code-formatting]

For questions about making code appear correctly in questions, answers and comments.

116 questions with no upvoted or accepted answers
25 votes
0 answers
208 views

Code marked as deleted does not look good in side by side markdown view in dark mode

Can't see deleted code I have come across a situation in dark mode. This is a serious contrast problem according to the following preview: It is too expensive to distinguish the text from the ...
David E. Luna M.'s user avatar
25 votes
0 answers
266 views

Please remove the horizontal whitespace in the left part of code blocks

With the new post formatting there's extra horizontal whitespace at the left of code blocks (not to be confused with the increased line height). Before the new formatting: Now (red circle shows the ...
Luis Mendo's user avatar
  • 1,355
22 votes
0 answers
230 views

Keeping indentation when pasting code in a question

Could we improve the way the pasting and indenting of code works for the first time user? I see questions where the user really tried to paste and indent the code, but failed anyway. And I assume ...
Niklas's user avatar
  • 1,943
21 votes
0 answers
547 views

Code beautifier/formatter for code snippets

Many edits seem to be about taking code snippets and properly formatting them, taking care of indentation, spacing etc. The tools of the trade are things like jsbeutifier, cleancss.com, etc. Would be ...
Assaf Lavie's user avatar
  • 6,117
20 votes
0 answers
199 views

On some sites, the closing fence is visible if post ends immediately after a code block that has an empty line

An example of the bug is shown in the screenshot below, which occurred while editing this answer: The issue goes away if a trailing line break is added. A minimal reproduction of the bug: Ask on ...
Adám's user avatar
  • 11.4k
19 votes
0 answers
175 views

Could Markdown and mini-Markdown have the same support for backticks?

In comments, mini-Markdown sometimes has a different syntax for backticks within backticks: when the code starts and/or ends with a backtick, one needs escaping. In those cases, could mini-Markdown ...
Arjan's user avatar
  • 28.2k
17 votes
0 answers
190 views

Don't treat code blocks as spaces when searching

I wanted to find all the posts containing the phrase call or call. In my case, I'll demonstrate on Stack Overflow, but this happens on Stack Exchange search too, so this isn't just an Stack Overflow ...
cocomac's user avatar
  • 14.4k
16 votes
0 answers
176 views

Rendering bug with backslash and dollar sign on MathJax-enabled sites

Typing `\$` on a MathJax-enabled site renders \\\$ instead of the expected \$ On the preview, the rendering is also wrong, but it only renders \\$, as can be seen in the following screenshot: This ...
wimi's user avatar
  • 4,977
16 votes
0 answers
151 views

Give a warning instead of silently deleting <angle brackets>

I just wrote an answer which contained the sentence You need an IQueriable<TypeA>, but you have an IQueriable<TypeB> Upon posting, the "invalid markdown tags" where silently deleted,...
HugoRune's user avatar
  • 919
16 votes
0 answers
309 views

Can we have a "format code" button in the mobile theme?

It's very difficult to post code on Stack Overflow using the mobile theme on an iDevice. I've tried indenting the code by 4 spaces, but I'm still getting an error that the code is not formatted ...
JonasG's user avatar
  • 311
15 votes
0 answers
148 views

Can the code button in the format bar be made to work for code blocks in numbered lists

I ran into a problem formatting a code block in a numbered list. I notice that I am not the first one to run into this problem -- there are more than a dozen questions related to this topic. The ...
Jay Elston's user avatar
14 votes
0 answers
113 views

Code formatting error message dispenses no-longer-true advice, and doesn't indicate what to do in case of false positives

On four sites in the network, there is a code formatting filter that checks for users pasting in code but not formatting it correctly. When it is triggered, it says the following: Your post appears ...
Sonic the Anonymous Hedgehog's user avatar
14 votes
0 answers
174 views

Make code blocks vertically resizable

Currently, you can resize the "add answer" text-area box vertically using the grippie [sic] at the bottom. I would love to be able to do this with the code-boxes that are found in both the question ...
Matt's user avatar
  • 470
14 votes
1 answer
291 views

Prevent wrapping of inline code

This is silly: Despite the potential for abuse along the nested-quotes lines, I think it would be a good idea to give inline code white-space: nowrap. (Actually, maybe white-space: pre.) It could ...
Ry-'s user avatar
  • 5,047
13 votes
0 answers
488 views

How can I change the fonts of the code snippets in Stack Overflow back to Consolas?

I've installed the Windows Terminal from Microsoft Store and, together with it, the Cascadia Code font family (mono and code) in my system, but I don't use them. Since then, the snippets on Stack ...
Diogo's user avatar
  • 231

15 30 50 per page
1
2 3 4 5
8