Questions tagged [code]

Questions relating to code that appears in a question or answer, such as answers which are entirely code. Do not use this tag for questions about code formatting; use [code-formatting] instead - and NEVER EVER USE THIS TAG TO ASK A PROGRAMMING QUESTION ON META!.

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
48 votes
0 answers
516 views

Reach out to Code Sandbox or some other mechanism for avoiding these links

I've seen a few questions where the code is all in a markdown link with an image to Code Sandbox: [![Edit new](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/new) ...
Daniel A. White's user avatar
43 votes
0 answers
826 views

Bad CSS on quoted code on Meta

As seen in How to include code inside a quotation? A very quick investigation (literally, right-click, Inspect Element :D) found the cause. For some reason, the minifier has interpreted tabs to be ...
Niet the Dark Absol's user avatar
37 votes
0 answers
583 views

Punctuation characters being escaped in code

For the past couple of days, it seems that when users paste code into their questions, but don't put it into a proper code block, many punctuation characters are being automatically escaped with ...
Barmar's user avatar
  • 764k
30 votes
0 answers
365 views

Please remove scrollbar-width: thin from code blocks AND fix the missing ends

Horizontal scrolling of code blocks is a thing to say the least. foo bar baz buzz foo bar baz buzz foo bar baz buzz foo bar baz buzz foo bar baz buzz foo bar baz buzz foo bar baz buzz foo bar baz ...
GSerg's user avatar
  • 77.3k
29 votes
0 answers
459 views

Inlining external code - copyright?

Today I came about a question in the review queue which could benefit from inlining the small code sample that was linked by OP by including it directly into the question. But: Code hosted on Stack&...
le_m's user avatar
  • 19.8k
22 votes
0 answers
135 views

Add codesandbox.io to the list of sites that prompt to put code in the question itself?

As far as I am aware, if someone asks a question and pastes a link to websites like JSFiddle, JSBin, or CodePen, they get prompted to put code in the question itself. Lately I've been seeing links to ...
gman's user avatar
  • 104k
22 votes
0 answers
378 views

Should we automatically detect pastebin (and other related) sites?

New users can only post a limited amount of links. However, they might reserve this link for paste sites such as pastebin, bpaste and so on. In my opinion, these kinds of websites are useless as the ...
user avatar
17 votes
0 answers
303 views

Add a means for tab stacking code snippets

The vast majority of questions on Stack Overflow come with a specific language tag and no post in the tag will contain any language other than that specified language. However, for some questions are ...
nhgrif's user avatar
  • 61.7k
16 votes
0 answers
226 views

Vertical scrollbar in code snippet overlap userbar

When scrolling the code snippet up and down, the vertical scrollbar is overlapping the top user bar which, I think in an ideal case, should be below. Not sure if this should be called a bug but I feel ...
cjmling's user avatar
  • 7,060
12 votes
0 answers
146 views

Why do we still have strange escape backslashes appearing in question code?

I was wondering why would users have that weird backslashes when pasting code. Now I noticed that this is a persisting issue1, 2, 3. Why hasn't this been solved yet? See here. I've edited several ...
jay.sf's user avatar
  • 67.9k
8 votes
0 answers
140 views

Triple-backtick code blocks don't get blockquoted correctly

Suppose I have a code block like this contrived pseudocode: ``` Here { is } my code ``` When I select the whole block including the backticks and then use try to blockquote it using the button or ...
Kyle Delaney's user avatar
5 votes
0 answers
132 views

Can we add a nudge to use a PowerShell validator when PowerShell code is detected?

For a while I have been contributing to Stack Overflow with PowerShell questions and answers. In here I am seeing a lot of questions with code examples that could be automatically resolved (or ...
iRon's user avatar
  • 21.9k
4 votes
0 answers
146 views

Why are tabs in the code replaced with spaces?

Why are tabs replaced by spaces in the output when I type them inside of code fences? Here I used tabs: int func() { somecode; } But you see spaces.
Gordem's user avatar
  • 115
4 votes
0 answers
92 views

Shouldn't Ctrl + A in a code-block select the block's code instead of the entire page?

When you use Ctrl + A on a Stack Overflow page, regardless of content, the default browser behavior is used -- which is to highlight everything on the page. Other sites (like Gmail, etc.) have a ...
khaverim's user avatar
  • 3,496
3 votes
0 answers
102 views

Syntax is not getting highlighted/accepted even if I use (Ctr+K) or indent the code myself

I have tried everything from using '```python' to indenting myself. The code which I want to upload does get highlighted in grey when I use the above methods but the syntax doesn't get highlighted. ...
heisenberg_0120's user avatar
3 votes
0 answers
133 views

Acceptable question with too low text-to-body ratio

Not long ago I gained the privilege to review queues and I try to help the community a little by handling issues in the queues. My issue is with questions with low text-to-body ratio. Often askers ...
franiis's user avatar
  • 1,388
2 votes
0 answers
73 views

Where do I ask Competitive coding questions which don't have solutions?

Where should one ask for hints and solutions regarding competitive coding problems/questions for which the author on some sites don't provide the answer, and I'm unable to solve the problem after ...
TJain's user avatar
  • 466
2 votes
0 answers
613 views

Pasting multi-line code block sometimes fragments the code

I was trying to answer a SO question that involved some VBA. The question had a code block, which I copied to my VBA editor (which resulted in some non-indented lines, made some fixes, then put it ...
ThunderFrame's user avatar
  • 9,430
1 vote
0 answers
154 views

While editing a question, this piece of text causes the error: "contain code that is not properly formatted"

I am editing one of my questions on Stack Overflow. It raises an error: Your post appears to contain code that is not properly formatted as code. After some digging, I find it is about this text: (...
AdmiralOrange's user avatar