Skip to main content

Questions tagged [code-formatting]

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

-10 votes
0 answers
99 views

How do I format code so that it appears with all the indents and everything--as you can't go to the line without posting--and so that it turns shaded in grey?
user avatar
10 votes
0 answers
172 views

I came across this question where the main code block was plainly go code which had been incorrectly inferred to be coffeescript! A second block of error output was labelled as Go code. This makes ...
ad absurdum's user avatar
  • 22.1k
47 votes
2 answers
467 views

(Cross-posted as a bug report to MSE which lists all affected languages found thus far. Please go there to see if a language you've observed being labeled incorrectly is included in the table) I just ...
TylerH's user avatar
  • 21.3k
2 votes
1 answer
181 views

The code highlighting here on Stack Overflow appears to be missing a tag for Blazor-like pages where C# and HTML are combined within the same file. Currently, I can only format it as either C# or HTML....
FlorianD's user avatar
  • 113
0 votes
0 answers
49 views

With the recent UI change, a comment that was written using backticks (inline code), loses those when edited.
Abhijit Sarkar's user avatar
4 votes
2 answers
161 views

I recently submitted this edit suggestion: https://stackoverflow.com/review/suggested-edits/36801118 It seemed to me to be pretty straightforward. As the name of a system file, /etc/sysctl.conf should ...
AJM's user avatar
  • 1,896
1 vote
0 answers
105 views

I am trying to respond to a Discussion (pushed upon us by the frustrating comment experiment), and it eats my code. I want to put this code there: # 2. Identify peaks ---- peaks_info <- cardidates::...
Axeman's user avatar
  • 35.7k
19 votes
0 answers
178 views

When you edit a question in the Staging Ground to convert a text selection into a multiline code block by using the "Code block" button (or pressing CTRL-M), a code block will be entered ...
Progman's user avatar
  • 20.1k
3 votes
2 answers
225 views

COMMAND and OUTPUT is formatted as italics in this post. I know <pre><code> can be used to format text in code blocks, but that answer uses just a normal code fence ``` ```. Here's the ...
phuclv's user avatar
  • 43.2k
12 votes
1 answer
215 views

I would love to have an indent and dedent keys in the new Stacks Editor. This has already been requested for the old markdown editor, but the request seems to have been ignored, and it seems like the ...
Anerdw's user avatar
  • 2,831
29 votes
3 answers
672 views

There is an issue where code blocks contain single backticks around every single line, rather than triple fences around the entire code block. This destroys the formatting. An example can be seen in ...
Adriaan's user avatar
  • 18.2k
8 votes
2 answers
415 views

How do I fix the below format? I keep getting the error: "Your post appears to contain code that is not properly formatted as code." My code is indented 4 spaces and is between '''codeblock ...
Craig's user avatar
  • 23
4 votes
1 answer
489 views

Has the font in code blocks changed recently? Is this intended? Being exclusively active in the r tag, I'm very irritated by the distracting misalignment of < and -, which together are the ...
Roland's user avatar
  • 134k
17 votes
0 answers
159 views

Every day I fix up numerous questions that have multi-line code blocks enclosed in single backticks rather than triple backtick code fences. Or they don't put a newline between the triple backticks ...
Barmar's user avatar
  • 789k
6 votes
1 answer
124 views

I made an edit to this answer, (changed "unicode" to "str") however when I saved the edit, the code formatting was lost. I quickly reverted the edit, however the code formatting ...
dangelsaurus's user avatar
  • 7,612

15 30 50 per page
1
2 3 4 5
33