Skip to main content

All Questions

-8 votes
1 answer
156 views

Displaying HTML first on Stack Overflow snippets [closed]

Currently, code snippets are displayed JavaScript first, then CSS and finally HTML. Regardless of the order they appear in the post source or anything. This does not make any sense to me. Does it for ...
Noam's user avatar
  • 1,624
3 votes
0 answers
94 views

Is indentation in answer editor broken?

I edited this answer, and by the look of the things, I cannot understand what went wrong. The code is indented with spaces, but they somehow disappear in preview. What did I do wrong? (It's very ...
polkovnikov.ph's user avatar
20 votes
2 answers
1k views

All my code is properly formatted, yet I am unable to post an answer due to unformatted code. Why?

I was answering this question, and I was unable to post my answer due to containing code that is not properly formatted as code. All my code has been formatted properly as far as I can tell. Here is ...
Jodast's user avatar
  • 1,289
3 votes
0 answers
35 views

Stack Snippets syntax completely borks when indented by four spaces [duplicate]

Here's a Stack Snippet: for(var o of document.getElementsByTagName("input")){(o=>o.addEventListener("change",e=>console.log(o.value=o.value?o.value[0]:"")))(o)}; input{width:1em;} <...
wizzwizz4's user avatar
  • 6,446
17 votes
1 answer
502 views

How to use the regular code snippets in the 2018 Stack Overflow update

I am a little confused with the new update of Stack Overflow, particularly on using the regular JavaScript/CSS/HTML code snippets we used to have to write our questions. Now the new update made it ...
MoSwilam's user avatar
  • 954
9 votes
1 answer
296 views

Is it possible to change formatting of console logs for JavaScript snippets? [closed]

Recently I was going to answer a JavaScript question. To prove my answer correctness, I inserted a code snippet that processed results and printed into console logs, something similar like: var ...
mpasko256's user avatar
  • 841
2 votes
0 answers
39 views

Is it acceptable to edit out "stack snippet" formatting that has no benefit over `code formatting`? [duplicate]

This answer is a bit cluttered by the code snippet formatting and offers no value. I want to revert it to traditional grey code formatting with no buttons. Question Are there guidelines on how to use ...
makerofthings7's user avatar
-9 votes
1 answer
152 views

Feature request: Adding a Stack snippet can automatically detect what code is in the question already?

For context I see a lot of new users who fail to realize there is a runnable inline code snippet feature that lets them have a running example. Now unfortunately I don't know if there is a better way ...
aug's user avatar
  • 11.7k
77 votes
1 answer
612 views

"=>" causes bad autoindentation in code snippets

Paste this JS code in the stack snippet editor: (function() { console.log(foo + "=>"); })(); Select it all with ctrl+A and use shift+tab to autoindent. The code becomes (function() { console....
Oriol's user avatar
  • 289k
11 votes
2 answers
312 views

How to improve questions to make them easier to comprehend?

I have recently been asking questions, and struggling to make my questions easier to read without hurting people's eyes or drawing their attention away from key elements. I don't want to have to flood ...
user avatar
23 votes
0 answers
180 views

Visually group code and snippet icons, and clarify which one to use

Could we please revamp the editing toolbar to make it easier to use the correct code formatting tool? In case you are not in the editor right now, here's what the toolbar currently looks like: ...
tripleee's user avatar
  • 190k
55 votes
2 answers
920 views

New Stack Snippets design requires more horizontal scrolling through code

I can't see the new Stack Snippet layout as an improvement. The window is now narrower, with wasted space around it, making it harder to format code to not require horizontal scrolling, especially if ...
m69 ''snarky and unwelcoming'''s user avatar
7 votes
1 answer
960 views

External code snippet How-To?

I'm having a lot of trouble with code snippets. I like codepen.io, but here's me trying to paste the 'embed' code: What I paste into the editor <p data-height="265" data-theme-id="0" data-slug-...
Mirror318's user avatar
  • 12.7k
2 votes
1 answer
67 views

Stack Snippet dialog can format code. Does it work for more than JS? [closed]

So I know that Stack Snippets can only run HTML/CSS/JS. But they have a neat formatting ability. You press the "tidy" button and it's like magic. JS is part of the C style syntax family, so JS ...
Laurel's user avatar
  • 6,211
18 votes
1 answer
396 views

Inconsistency of indentation of tabs between markup editor / code samples and Stack Snippets

Many real life projects contain code that mixes up tab-based indentation with space-based indentation. In different editors, tabs don't always correspond with the same number of spaces. For example, ...
John Slegers's user avatar
  • 47.2k

15 30 50 per page