Questions tagged [formatting]

For questions about the formatting on Stack Overflow; how to use it and when to use it.

Filter by
Sorted by
Tagged with
10 votes
1 answer
155 views

Where art thou, tags? Or a request to make tag formatting guidance easier to discover

I've been fixing tag formatting on meta for tag-related requests for years. For those unaware, its syntax is [tag:name] for tags on the main site and [meta-tag:name] for those only present on the ...
Oleg Valter is with Ukraine's user avatar
-20 votes
0 answers
171 views

Improve/update mini-markdown to support newer formatting syntaxes in comments

I'm trying to figure out how to display codeboldcodecode in a comment (using mini-markdown). This is how it's rendered: I've noticed that the same happens on YouTube (comments). But adding spaces ...
The Amateur Coder's user avatar
12 votes
4 answers
446 views

Should we discourage the use of <h1>/<h2> at the very start of an answer? [duplicate]

I’ve noticed that some answers start with a a <h1>/<h2> not to structure the answer in different parts --there’s only one-- but to attract eyeballs. I guess there can be legitimate uses; ...
bfontaine's user avatar
  • 17.8k
31 votes
8 answers
1k views

How do you present a directory tree in a post? Is it OK to post an image of a UI widget?

I have seen people posting screenshots of their directory structure from a text editor or IDE as shown below: Others display the structure in text format as shown below: |mysite/ | |/assets/ |/assets/...
Newton Karanu's user avatar
0 votes
1 answer
137 views

How many headings does a user add to answers?

I wonder whether SEDE could figure out how many headings (#, ##, ...) a user uses in their answers. I came up with this query SELECT Id AS [Answer], LEN(Body) AS [Length] FROM Posts WHERE ...
Thomas Weller's user avatar
2 votes
0 answers
81 views

Bug on Safari: list starting with a code block fails to display the bullet point

Given the below formatting, on a Mac Safari, version 15.6.1 (17613.3.9.1.16) as well as on an iPhone Safari, version 15.6.1 This Markdown: - ``` code ``` Loses the bullet on Safari: On your ...
β.εηοιτ.βε's user avatar
2 votes
0 answers
217 views

Could we have proper footnote elements?

Problem We currently don't have a dedicated way to create footnotes (although there are some workarounds here). The most commonly used approach is to use <sub> or <sup> tags. However, ...
user694733's user avatar
  • 15.1k
3 votes
1 answer
75 views

Snippet formatting issue when editing/submitting an answer [duplicate]

This snippet is a valid "Question" but it's an invalid "Answer" on Stack Overflow. Keep getting this error when I try to submit this code snippet as an answer: Your post appears ...
Aldo's user avatar
  • 692
2 votes
1 answer
127 views

Mixing monospace and normal text doesn't look nice

Sometimes I want to pluralize a Python class name, but the plural "s" should not be monospace, since it's not code. For example this answer: The letters should line up.
Boris Verkhovskiy's user avatar
3 votes
0 answers
134 views

Seems like a bug in code formatting checker that blocks posting an answer [duplicate]

The formatting checker prevents posting a reply. The reason is "unformatted code", but there isn't any. Up: The advice from Mike M. below fixed the issue, Thanks! (blank lines between lines ...
Александр's user avatar
3 votes
0 answers
104 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 >!<...
vdshb's user avatar
  • 1,879
42 votes
7 answers
923 views

When to use code-formatted tables or Markdown-formatted tables

Given a code-formatted table: +------+------+ | id | name | +------+------+ | 1 | Paul | | 2 | Nash | | 3 | Anne | | 4 | Lily | +------+------+ and its corresponding Markdown-formatted ...
lemon's user avatar
  • 13.9k
1 vote
0 answers
49 views

Table formatted correctly in preview, but not when question is posted [duplicate]

There appears to be a slight inconsistency in the rendering of tables in Markdown. If a table isn't preceded by an empty line, then the table is rendered properly in the draft editor, but not when the ...
r3mainer's user avatar
  • 23.8k
4 votes
1 answer
231 views

HTML formatting inside highlighted code blocks is no longer supported - how can I fix my posts?

In the past, it used to be possible to apply rich text formatting to text inside code blocks, as long as the code block was formatted using the HTML <pre><code> elements. As an example, ...
gparyani's user avatar
  • 1,958
4 votes
0 answers
249 views

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

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 ...
gparyani's user avatar
  • 1,958
2 votes
1 answer
294 views

Why would Stack Overflow code blocks (only) suddenly be displayed in italics?

Okay, it's not April 1st, so the new fonts must be serious. I'd like to express a like or dislike of the new fonts to those who decide such things without starting a flame war. Or is there an option ...
mdisibio's user avatar
  • 3,048
3 votes
0 answers
41 views

Table formatting: fit-to-content option?

Would it be possible to have tables which are sized to fit the contents, rather than using the full width available? Something like this, but with the last column hidden. Id Name Quest Favourite ...
Jack Deeth's user avatar
  • 3,042
30 votes
2 answers
971 views

What causes new contributors to miss the last line in a code block and paste the image as a hyperlink?

I very often see new contributors asking questions like this: function foo(){ return "bar"; } enter image description here I personally don't know how they get there, especially for the ...
Ricky Mo's user avatar
  • 5,904
0 votes
1 answer
106 views

Multi-line quotes always show up in a single line [duplicate]

I expect the following quote to have 2 lines: > line1 > line2 But it actually renders as a single line: line1 line2 I assume this to be a bug since it defeats all my expectations of quoting ...
Domi's user avatar
  • 21.7k
3 votes
0 answers
188 views

Is there an easier way to generate tables in posts?

I have seen a post on how to use table formatting inside Stack Overflow question posts. However, it seems to be really overwhelming to insert all the formatting for tables on your own by hand: once ...
Fatemeh Sangin's user avatar
91 votes
3 answers
2k views

Should there be a warning for code containing bidirectional Unicode text?

Articles on the misuse of bidirectional text have been making the rounds recently. Put simply, this abuses the concept of bidirectional Unicode text to compile something different from what it ...
Anon Coward's user avatar
  • 9,590
4 votes
0 answers
61 views

Is it possible to get the raw Markdown of a post in-browser without trying to edit it? [duplicate]

I'm writing some notes down for myself, and these notes involve citing parts of a Stack Overflow post with a lot of Markdown. Manually copying the text and pasting it into my notes does not preserve ...
JesseTG's user avatar
  • 1,975
36 votes
2 answers
1k views

Is formatting that is designed solely to call attention to a question or answer allowed?

I strongly agree with the answers in, "Is using 'header' markdown okay in answers?" I use headings quite frequently in my answers, but generally only an H4, and only when there are multiple ...
NotTheDr01ds's user avatar
  • 14.7k
4 votes
0 answers
165 views

Does the blog comments section support markdown?

I made a comment on the 'Privacy is an afterthought in the software lifecycle. That needs to change.' article and the formatting is very strange. I can't tell if I messed it up or if it just doesn't ...
zero298's user avatar
  • 25k
2 votes
0 answers
87 views

Doesn't formatting <b> tags inside a <pre> tag [duplicate]

Sometimes I write answers within the <pre>...</pre> tag to get more control over formatting the answers. Usually, I do this with the code-snippets, which may be required some emphasis. In ...
JPG's user avatar
  • 80.3k
7 votes
1 answer
204 views

Can't figure out formatting error while posting this question [duplicate]

I get the error below while posting a question on Stack Overflow. I've looked up elsewhere, used Ctrl + K, and added extra lines after the heading, but I am still getting this error. Your post ...
Uzair Khan's user avatar
-26 votes
2 answers
231 views

Should we ban strikethrough formatting?

I often see answers that contain significant amounts of struck-through text, like this. I understand why the authors have done it; it's often to indicate where they've since updated their answer and ...
ScottishTapWater's user avatar
10 votes
0 answers
99 views

Darker CSS for visited links on SO meta?

Depending on the context, previously visited links on Stack Overflow Meta can be quite tricky to spot. Example - there are four in the image below - they're somewhat tricky to spot (for me, at least): ...
stevec's user avatar
  • 38.9k
3 votes
0 answers
62 views

Is inline code formatting for comments broken? [duplicate]

Just noticed this today on this comment: It seems that the formatting is broken, there are lots of whitespaces inside of the inline-code and the grey background is extending beyond the actual comment....
Lino's user avatar
  • 19.5k
5 votes
0 answers
100 views

Why is the link formatting on my question not working as expected?

I just asked this question and it looks like the links aren't formatting properly. I suspect the problem comes from the . at the end of the first url (even though it's part of it for real) but if not, ...
nalka's user avatar
  • 1,821
2 votes
0 answers
81 views

What kind of code format should I use for errors? [duplicate]

I was scrolling through Stack Overflow questions when I saw this one: Rscript Path Problem for exec() implementation R code in php It's a beautifully structured question, except I find the way the ...
M-Chen-3's user avatar
  • 2,028
9 votes
0 answers
121 views

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 -5 0.000009999999999999999 10e-6 1 x 10⁻⁵ 10 -2.445 ...
Nickofthyme's user avatar
  • 2,939
7 votes
1 answer
109 views

Not correctly formatted hyperlink

There seems to be some problem with the handling of links after <h1></h1>. It wasn't there some months ago. The problem is here and on the main site (I've noticed because I opened an old ...
xanatos's user avatar
  • 109k
33 votes
3 answers
1k views

Using Keyboard Format for Product Names

I have seen people format product names with the keyboard format. ExcelO365 for example. I assumed this was the standard based the reputation of the people I saw doing this. Did I assume wrong?
Axuary's user avatar
  • 1,497
-11 votes
3 answers
220 views

When is bolding considered unnecessary?

In the following example question, bolding was removed as unnecessary: https://stackoverflow.com/posts/65685587/revisions The bolding was added so that by just reading the bold part you get a feeling ...
Marinos An's user avatar
  • 9,141
6 votes
0 answers
79 views

Code block formatting looks OK in preview, wrong in main display

Note: The problem looks similar to this one and was indeed closed as a duplicate, but in that question the formatting in the preview is also wrong; here the preview is displayed correctly, but after ...
Ken Y-N's user avatar
  • 14.6k
38 votes
4 answers
2k views

Should we disapprove of uploading images of tables when asking a question?

Since the introduction of the table markdown should people still be using images of tables instead of the markdown? Or should we be enforcing the use of the new markdown? If we find a question that ...
The Grand J's user avatar
10 votes
1 answer
116 views

Different table formatting in editor and outside

I came across this badly formatted answer and wanted to edit it to correct the formatting. The table formatting is messed as can be seen: However when I click edit, formatting is OK: Is there ...
Ruli's user avatar
  • 2,572
6 votes
0 answers
228 views

Comment code format overflow covered by job

I just found a overflowing comment. It is covered by a job box (Whatever it's called). If there was some code there, it could not be shown. Can we change it to comment covering the job description? (...
ppwater's user avatar
  • 2,317
39 votes
2 answers
1k views

Significant reformatting of a question

I reformatted a part of a question to make it more readable. The difference is quite huge, it transforms inline code into blocks. Is this kind of initiative discouraged, i.e. should we edit only "...
Amessihel's user avatar
  • 5,747
2 votes
1 answer
241 views

How to show plots in Stack Overflow questions [duplicate]

What is the best way to attach a plot, or a link to a plot (or image) to a Stack Overflow question? I have tried attaching as an image but to no avail. I believe there is a platform to do this. Does ...
Angela's user avatar
  • 13
5 votes
0 answers
70 views

How can I write a link in smaller font on main site?

I am attempting to write links in smaller font. I know how to write text in small font. However, if I try to insert a link, it doesn't turn blue on the main site. It seem to turn blue here: https://...
zabop - we're hiring's user avatar
3 votes
0 answers
161 views

Format bug: edit → mark a text → click on **B** for bold or *I* for italic → start of the format change is slightly too late

If you click on edit, then mark a word, a line or multiple lines of text, then change the format e.g. to bold, the very first formatting change has a bug. Reproducible example at least at my laptop ...
questionto42's user avatar
  • 6,566
3 votes
0 answers
52 views

common mark migration breaks bullets formatting?

After migration to common mark formatting of the bullets is corrupted. Old formatting used 1 space for inner text but common mark uses 3 spaces. So after migration the bullets where not repaired at ...
Spektre's user avatar
  • 49.1k
1 vote
1 answer
144 views

Why does (only) the code formatting sometimes not work in a question/answer?

Usually, when selecting the code (of course, in edit mode) and pressing Ctrl+K, or {}, the selection is correctly formatted as code: Sub Foo() 'Whatever in here... End Sub But sometimes, the ...
FaneDuru's user avatar
  • 36.8k
-10 votes
1 answer
107 views

Can we discuss the minimum 6-character requirement for editing a post?

I've fallen into this trap the past couple of days. The edits I couldn't make were: add a tag to a post to help draw people to a post asking a specific question (I wanted to add the regex code to a ...
Michelle's user avatar
  • 1,271
1 vote
0 answers
89 views

Bug: Interpreting C# code as incorrectly formatted code [duplicate]

When using the code format sometimes the color isn't correct. For example, in this question the word CPerson Blue is blue instead of Black: And the set is Blue, and get is Black: This is a ...
Raful Chizkiyahu's user avatar
15 votes
1 answer
142 views

List formatting is broken: neither bulleted nor numbered lists render in posts

I tried using - to add bullets, but it's not working. e.g. line1 line2 line3 I wrote it as such: - line1 - line2 - line3 It's also missing from my previous posts. e.g. see here This affects ...
mfaani's user avatar
  • 32.3k
13 votes
1 answer
288 views

What's the limit to how many emojis a question can have? [duplicate]

This question has "a lot" of emojis. It's clear that the user is trying to get attention with them. Thanks for the interaction! I'm really hoping to get this solved. What are the rules regarding ...
kemicofa ghost's user avatar
2 votes
0 answers
216 views

What is the recommended way to format the output of some code? [duplicate]

As per title, consider some code which produces some output to STDOUT, what is the recommended way of formatting it. For example, in Python, you could write: print('Hello World!') which produces ...
norok2's user avatar
  • 25.5k