Quantcast
Channel: Active questions tagged code-formatting - Meta Stack Overflow
Browsing latest articles
Browse All 189 View Live

How do I format my code blocks?

How do I post text so that it is formatted as code?What do I need to do so that my code shows up properly—not escaped or removed—when posted? And how do I get the correct syntax highlighting?For more...

View Article


--- Article Not Found! ---

*** *** *** RSSing Note: Article is missing! We don't know where we put it!!. *** ***

View Article


Image may be NSFW.
Clik here to view.

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-50.00000999999999999999910e-61 x...

View Article

HTML formatting inside highlighted code blocks is no longer supported - how...

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...

View Article

How should compiler errors, linker errors and logs be formatted?

How should I format compiler errors when I want to put them in code?Should they be in a code section:dk2.cpp: In function 'int main()':dk2.cpp:29:28: error: no matching function for call to...

View Article


When should code formatting be used for non-code text?

I reviewed an edit that did no change to the post apart from introducing code formatting like this to words that aren't code, such as iOS and Android (while curiously leaving Delphi untouched). I...

View Article

Image may be NSFW.
Clik here to view.

How to fix the error "your post appears to contain code that is not properly...

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 fences'''.My...

View Article

Why is there no line numbering in code sections?

Many times users paste long code and those who want to refer to a specific line refer to it by its content, which can be misleading or cumbersome if the content appears elsewhere or the line is long.I...

View Article


Image may be NSFW.
Clik here to view.

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: id...

View Article


What causes single backticks on every line of code?

There is an issue where code blocks contain single backticks around every single line, rather than triple fences around the entire code block. This destroys the formatting. An example can be seen in...

View Article

Option to open code-blocks in fullscreen

As the title says, can SO introduce a button/shortcut to be pressed on which the code block/s provided inside question/answer could stretch out fullscreen and can be reverted back.The need for this...

View Article

Indent/dedent in the Stacks Editor

I would love to have an indent and dedent keys in the new Stacks Editor.This has already been requested for the old markdown editor, but the request seems to have been ignored, and it seems like the...

View Article

Backtick formatting in numbered bullets is missing the background in the...

In the iPhone mobile app, code formatted with backticks in bullet points has no background whereas the the same text has a grey background elsewhere.In this question of mine the new text in the...

View Article


Image may be NSFW.
Clik here to view.

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...

View Article

Code block adjustment

One of the things I've noticed quite often is someone will present their code like this:if( $a > 5) { echo $foo; // why isn't it showing today?}?>People then comment and sometimes...

View Article


Writing a code sample is ugly

Is SO against including code samples with questions or answers.BecauseThe answer input box is very small. It doesn't auto expand to fit its contents when editing a question/answer. And doesn't remember...

View Article

Auto-unindentation for code blocks

Can code blocks like this:for (var i = 0; i < 10; i++) { console.log('hi'); } console.log('done');Be converted to this?for (var i = 0; i < 10; i++) { console.log('hi');}console.log('done');There...

View Article


Image may be NSFW.
Clik here to view.

Creating a code block in Staging Ground includes one additional character...

When you edit a question in the Staging Ground to convert a text selection into a multiline code block by using the "Code block" button (or pressing CTRL-M), a code block will be entered which contains...

View Article

Can I force syntax highlighting for a certain language? [duplicate]

I notice that stackoverflow automatically adds syntax highlighting to code blocks. I hate this. It always applies the wrong language's highlighting to the wrong code.Example? The last question I've...

View Article

Discussions garbles code [duplicate]

I am trying to respond to a Discussion (pushed upon us by the frustrating comment experiment), and it eats my code. I want to put this code there:# 2. Identify peaks ----peaks_info <-...

View Article

Requesting clarification on reason for edit rejection

I recently submitted this edit suggestion:https://stackoverflow.com/review/suggested-edits/36801118It seemed to me to be pretty straightforward. As the name of a system file, /etc/sysctl.conf should...

View Article


Comment with backticks loses formatting when edited [duplicate]

With the recent UI change, a comment that was written using backticks (inline code), loses those when edited.

View Article


Image may be NSFW.
Clik here to view.

Proper syntax highlighting for Blazor - C# with HTML on Stack Overflow

The code highlighting here on Stack Overflow appears to be missing a tag for Blazor-like pages where C# and HTML are combined within the same file.Currently, I can only format it as either C# or HTML....

View Article

How can I add foldable code or text when answering someone’s question on...

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 presses...

View Article

Is having the ability to apply rich text formatting inside code blocks...

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 the...

View Article


Image may be NSFW.
Clik here to view.

New code block design guesses incorrectly at what the language is, even when...

(Cross-posted as a bug report to MSE which lists all affected languages found thus far. Please go there to see if a language you've observed being labeled incorrectly is included in the table)I just...

View Article

Incorrectly inferred languages with new code block design [duplicate]

I came across this question where the main code block was plainly go code which had been incorrectly inferred to be coffeescript! A second block of error output was labelled as Go code. This makes...

View Article

Why are posts edited to change the code formatting markers?

I have seen some edited posts, which have been edited to change the way that code is formatted. Sometimes, this is also the only edit they make.It will be changed from four spaces indentation to triple...

View Article

Image may be NSFW.
Clik here to view.

Seemingly redundant leading empty line at the beginning of a codeblock due to...

If you have a code block, it looks like it starts with an empty line on Stack Overflow due to the way "Copy" is displayed at the top right.Example question on Stack Overflow: Why does 2e3 return 2000?...

View Article



How do I put a backtick in backticks to make it appear as code?

How do I put just a backtick in a pair of backticks to make it appear as code? In a code block, I can do`but how do I do it inline?

View Article
Browsing latest articles
Browse All 189 View Live