All Questions
Tagged with code-formatting formatting
36 questions
2
votes
1
answer
185
views
Mixing monospace and normal text doesn't look nice
Sometimes I want to pluralize a Python class name, but the plural "s" should not be monospace, since it's not code. For example this answer:
The letters should line up.
3
votes
0
answers
141
views
Text and code blocks under spoiler
I'm trying to ask a question and put additional information under the spoiler. The best solution I've found looks like this:
>!Text block
>!
>!<pre><code>
>!code block
>!<...
5
votes
1
answer
1k
views
HTML formatting inside highlighted code blocks is no longer supported - how can I fix my posts? (Obsolete)
This question isn't relevant anymore since the site once again supports HTML formatting inside code blocks. Stack Exchange implemented the plug-in workaround noted in the answer, to resolve an issue ...
5
votes
0
answers
338
views
Is having the ability to apply rich text formatting inside code blocks important?
For many years, it's been possible to apply rich text formatting to code blocks inside posts by formatting the code block using the HTML tags <pre><code> and using more HTML tags inside ...
2
votes
1
answer
308
views
Why would Stack Overflow code blocks (only) suddenly be displayed in italics?
Okay, it's not April 1st, so the new fonts must be serious. I'd like to express a like or dislike of the new fonts to those who decide such things without starting a flame war. Or is there an option ...
91
votes
3
answers
3k
views
Should there be a warning for code containing bidirectional Unicode text?
Articles on the misuse of bidirectional text have been making the rounds recently. Put simply, this abuses the concept of bidirectional Unicode text to compile something different from what it ...
2
votes
0
answers
91
views
Doesn't formatting <b> tags inside a <pre> tag [duplicate]
Sometimes I write answers within the <pre>...</pre> tag to get more control over formatting the answers. Usually, I do this with the code-snippets, which may be required some emphasis.
In ...
3
votes
0
answers
62
views
Is inline code formatting for comments broken? [duplicate]
Just noticed this today on this comment:
It seems that the formatting is broken, there are lots of whitespaces inside of the inline-code and the grey background is extending beyond the actual comment....
2
votes
0
answers
94
views
What kind of code format should I use for errors? [duplicate]
I was scrolling through Stack Overflow questions when I saw this one: Rscript Path Problem for exec() implementation R code in php
It's a beautifully structured question, except I find the way the ...
9
votes
0
answers
141
views
How is table with code formatted incorrectly? [duplicate]
Why is this table not formatted correctly?
Base (base)
Exponent (exp)
Math.pow(base, exp)
numeral(n).format('0[.]00e+0')
logFormatter(n, base)
10
-5
0.000009999999999999999
10e-6
1 x 10⁻⁵
10
-2.445
0....
14
votes
2
answers
1k
views
How to display a pandas dataframe on a Stack Overflow question body
I need to display a pandas dataframe in a Stack Overflow question body. I have already tried to display copying and pasting in a block of code but got completely unreadable.
This is result I got:
...
1
vote
0
answers
89
views
Bug: Interpreting C# code as incorrectly formatted code [duplicate]
When using the code format sometimes the color isn't correct.
For example, in this question the word CPerson Blue is blue instead of Black:
And the set is Blue, and get is Black:
This is a screenshot ...
3
votes
0
answers
497
views
What is the recommended way to format the output of some code? [duplicate]
As per title, consider some code which produces some output to STDOUT, what is the recommended way of formatting it.
For example, in Python, you could write:
print('Hello World!')
which produces the ...
3
votes
0
answers
63
views
How to format the data (questions/answers) on stackoverflow mobile site? [duplicate]
Its very difficult to format the data while working on stackoverflow mobile site. Somehow I used to manage it via adding spaces for code etc. But when theres a large complex data to be posted it ...
74
votes
1
answer
1k
views
Can we add a button "Format with Prettier" to the toolbar when editing posts?
Prettier supports formatting Markdown text and a bunch of languages. Can we add it as a button or format on save?
All the posts will have a unified look and feel, without the extra spaces, wrong ...