Questions tagged [code-formatting]
For questions about making code appear correctly in questions, answers and comments.
857
questions
5
votes
0
answers
133
views
Cannot post question - 'Your post appears to contain code that is not properly formatted as code'
I am trying to post a question to Stack Overflow (and also relevant on a few other sites) but am met with the following message:
Your post appears to contain code that is not properly formatted as ...
3
votes
1
answer
81
views
How can I change the Markdown of a post that was created using the "Ask Wizard"? It's formatted using 'heading' formatting
Take a look at this (badly asked) question: When I try to implement the project it fails and I get this error
I tried to change the Markdown of the question since the text is enlarged and in bold:
...
3
votes
0
answers
48
views
Comments with `code ticked` text with large spaces seems to leak onto other parts of the page [duplicate]
I posted a comment on Stack Overflow with the following text:
@DougMaurer that command returns `Cmdlet Get-PackageProvider 1.4.8.1 PackageManagement`
It ...
5
votes
0
answers
39
views
Added code not always visible as a change in the Reopen Votes review queue
Here is a Reopen Votes review queue item, where the author added some code to the question. However, that is not displayed in the 'Inline' and 'Side-by-side' tabs, which just show some grammar ...
12
votes
0
answers
120
views
Code block within spoiler gives different result than shown
Background: I'm using the opt-in beta for the new editor.
When using the following markdown in the answer editor:
>! ```python
>! if True:
>! print "Hello World"
>! ```
It ...
7
votes
1
answer
145
views
Code no longer displays, despite being selectable [closed]
Since today, suddenly code no longer displays for me:
The same happens for in-line code, also that in comments. However, I can select the code:
and copy-paste it to a text editor. Is this a new bug?
...
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 ...
7
votes
1
answer
133
views
Is the language name case sensitive for syntax highlighting?
I often use the syntax-highlighting feature of Stack Exchange in order to make my code easier to read.
```lang-python
for k in range(0, 10):
print(k)
```
for k in range(0, 10):
print(k)
...
3
votes
0
answers
219
views
Do I have to worry about patent issues for code posted on Stack Overflow?
I purposely named this question similar to Do I have to worry about copyright issues for code posted on Stack Overflow?. Since Fedora is banning CC-0 licensed source code citing issue of explicitly ...
6
votes
2
answers
104
views
Search fails when original text includes backticks for formatting
A Stack Overflow post including the following:
service1 has integration tests that needs to call the API on service2.
...or in its Markdown source:
`service1` has integration tests that needs to ...
4
votes
0
answers
141
views
Appearance of HTML and CSS snippet is changing when it is indented
Today I was editing this question to change the formatting of its code into a runnable snippet. Once I configured the snippet, Stack Overflow would not let me submit my question because it thought ...
6
votes
0
answers
83
views
What are the chances of getting auto-prettier code formatting on code blocks on Stack Overflow? [duplicate]
This answer taught me that highlighting a code block and clicking the curly brackets icons auto-formats the code block.
Many developers, me included, are used to the comfort of format-on-save ...
8
votes
2
answers
196
views
How can I find posts with particularly large code blocks in a non-code-based site?
From time to time in Space SE a question or answer about a calculation will need to share a significant amount of tabular data, say 100 or 1000 lines. It needs to be forever available to future ...
8
votes
0
answers
79
views
Markdown reformatting is broken if a list item starts with a block element
The new/stacks editor, when switching from source mode to Markdown mode, breaks alignment of list items <li> if it begins with a block-level element (<blockquote> or <pre>).
For ...
0
votes
0
answers
120
views
Why is my Python code not highlighted? [duplicate]
I have posted the following code in my question:
import numpy as np
for i in range(3):
n = np.random.randint(2, 10000)
m = np.random.randint(1, n)
A = np.random.randn(m, n) * ((1 / m) ** ...