All Questions
Tagged with code-formatting support
143 questions
3
votes
2
answers
122
views
Requesting clarification on reason for edit rejection
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 ...
3
votes
2
answers
190
views
Why does this code block have weird formatting?
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 ...
7
votes
2
answers
391
views
How to fix the error "your post appears to contain code that is not properly formatted as code"
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 ...
6
votes
1
answer
105
views
code formatting lost after edit, revert would not fix it
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 ...
3
votes
1
answer
905
views
My post "appears to contain code that is not properly formatted as code", but I did wrap code in <pre><code> tags [duplicate]
I was trying to answer a coding question in JavaScript. I had some code and used <pre><code>, put my code in, then typed </pre></code>. I then came across this error when ...
1
vote
1
answer
191
views
Correct use of code block formatting?
Is the following correct use of a code block (the curly braces icon) in a Stack Overflow question?
def __init__(self,rect_len,rect_wid,stylus_in):
self.len = rect_len
self.wid = ...
-8
votes
1
answer
2k
views
How to paste Python code in Stack Overflow without DIY [duplicate]
Here is an image of correct code (in fact, code of a previous question):
If I copy this code and paste it in a code sample in this editor, I got this (another image):
So I'm obliged to add a tab at ...
9
votes
1
answer
223
views
Prevent wrapping inline code
I've just made an edit here, but the way the inline code wraps is not sensible.
Is there a way to indicate that " ".join(map(shlex.quote, sys.argv)) should not be broken over lines?
I don't ...
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
>!<...
3
votes
0
answers
161
views
Why can I publish a post here, but I get an error when I try to post the same text on Stack Overflow? [duplicate]
I don't understand why I can't post my question on Stack Overflow, but I can post it here.
The text is exactly the same, but when I want to post it on Stack Overflow I can't do it because a message ...
55
votes
0
answers
1k
views
How can I add foldable code or text when answering someone’s question on Stack Overflow?
How do I add foldable code or text on Stack Overflow when writing a question or an answer?
<details>
<summary>Click to expand!</summary>
```HTML
<h1>Hide this until someone ...
6
votes
0
answers
193
views
Syntax highlighting Java code in response to a Kotlin question
I provided an answer to a question tagged kotlin and javafx. The code blocks in my answer were predominantly in Java.
Without any language tags on the code blocks, the syntax highlighting for the Java ...
1
vote
2
answers
202
views
Formatting MySQL code in order to be able to submit a question
I can't make a post because Stack Overflow keeps insisting on some formatting, even though my code is already formatted.
This was a preview of my post. Notice how code is already "parsed" by ...
2
votes
1
answer
111
views
Why was my code highlighting edit rejected?
I suggested an edit to a question's code block, from:
```import requests
...
to:
```python
import requests
...
This was a simple case of an asker writing unintended Markdown, and the edit fixed that....
3
votes
0
answers
92
views
Is there a comprehensive list of languages the code highlighter supports? [duplicate]
The triple backtick is my go to, to format snippets of code.
```
I regularly use them like:
```json for JSON
```py for Python
... and many more
Does a list of the linters Stack Overflow supports ...