Questions tagged [code-formatting]
For questions about making code appear correctly in questions, answers and comments.
726
questions
5
votes
0
answers
70
views
Stacks Editor says plain text, but code formatting isn't plain text
Stacks Editor says plain text, but code formatting isn't plain text:
Screenshot taken on https://meta.stackexchange.com/
Markdown:
> **To create a reviewers' Custom Max Papers after having run ...
1
vote
0
answers
38
views
Cannot paste into SE code blocks when Editing, breaks text editor and Markdown preview
There seems to be something wrong with the text editor when editing code inside ``` code blocks. I've noticed this when editing questions.
Copy code from my IDE
Edit a question
Highlight all of the ...
-14
votes
1
answer
184
views
Sharing code and images efficiently
Let me assume I would like to share a particular image that contains certain simplifications. I don't want to directly paste it to make the question short, simple, and straightforward. So, the best ...
3
votes
1
answer
122
views
Post formatting is not accurate for numbered lists of code blocks. Is this a bug?
Compare the way this list looks in the post versus the screenshot of the preview:
text:
1.
{ label: `Baz ${x ? n1 : n2}`, kind: "B", } satisfies B,
1.
{ label: `Baz ${x ? n1 : n2}` ...
8
votes
0
answers
66
views
Formatting tips below the body textbox of a post are wrong
When posting a question or answer, there is a formatting help below the body textbox, which includes tips for how to format code, make text bold or italic, and quote text:
However, the tips for ...
2
votes
0
answers
120
views
Asking how to format code blocks on SOF because I am prohibited from commenting on an existing post
I am getting this warning when proofreading a question:
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or ...
9
votes
0
answers
159
views
Colors of code-formatted text in comment help is difficult to read
The new color scheme on the collapsible help section when adding a comment is very difficult to read for the highlighted sections. The new darker highlight does not have enough contrast with the black ...
6
votes
0
answers
137
views
Please support syntax highlighting in user profiles
I found a bug report about this: Code syntaxhighlighting does not work in "About Me"
The answer by a staff member says:
If you want to make a case for why we should, a feature request would ...
7
votes
1
answer
133
views
Markdown errors in blog post about RAG
Editor note: While there's at least one other applicable tag, I'd like to leave it at four tags to allow for a status-* tag.
In this blog post, there's an unusual use of a code block to quote LLM ...
4
votes
1
answer
173
views
Syntax highlighting of Makefiles
The syntax highlighting is bugged for Makefiles.
As per https://meta.stackexchange.com/a/356459/1288919 I used:
```lang-makefile
Current output for: https://stackoverflow.com/a/77223358/22510042
...
4
votes
0
answers
212
views
More fun with "Your post appears to contain code that is not properly formatted as code."
I have tried to post the following to Stack Overflow:
I have a very simple HTML form embedded in an email I send to people who have subscribed to my blog so they can confirm their email addresses. ...
3
votes
0
answers
60
views
Code background can overflow comments [duplicate]
Look at this:
I think that overflow is due to the following CSS rule:
code {
white-space: pre-wrap;
}
Changing it to the following seems to fix the issue:
code {
white-space: break-spaces;
}
...
4
votes
0
answers
176
views
MathJax bugs "Your post appears to contain code that is not properly formatted" [duplicate]
V1: complains
$$
\frac{x}{y}
$$
V2: doesn't
$$\frac{x}{y}$$
V3: complains
$$\begin{align}
& \frac{x}{y} + \frac{y}{x} \\
& \frac{y}{x} + \frac{x}{y} \\
\end{align}$$
I favor working ...
3
votes
1
answer
82
views
Code highlighting and image placement breaks despite correct syntax
Signal Processing answer, normal vs preview:
It's only toward the bottom of the post, yet it doesn't happen toward bottom of a much longer post. I confirmed it's also reproduced only with the ...
3
votes
3
answers
145
views
What tool is there for creating Stack Exchange markup language tables which do not involve typing the tables one key-stroke at a time?
The Stack Exchange (SE) network has many different websites to support the learning of natural languages.
Links to some of these SE sites are provided below:
German / Deutsch |
Spanish / Espanol
...