All Questions
Tagged with code-formatting markdown-rendering
26 questions
2
votes
1
answer
185
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.
12
votes
0
answers
416
views
What causes these list item marker display issues for content that begins with a code block? [closed]
Yesterday I made an edit that produced some unexpected output. It seems that when an item in an ordered or unordered list begins with a code block, in (at least) Firefox (but not Chrome) the list ...
1
vote
2
answers
16k
views
Give a code block a filename
It's relevant and useful to include the name of the file that a code block should go in. For example, an update to a Next configuration would go in the next.config.js file, an NPM script would go in ...
2
votes
0
answers
52
views
Is there a test of a Github snippet integration on meta? [duplicate]
When reading a hot meta topic, I noticed that a mere link to a line of source code in a Github repository shows up as a preview of that code.
This is what it looks like on the main page:
This is what ...
10
votes
2
answers
361
views
Literal tab in code block renders as four spaces
I think this used to work correctly before because I have memories of testing this when responding to makefile questions before, where proper tabs are crucial. (That would have been before the switch ...
6
votes
0
answers
91
views
Preview does not render code blocks as code if they contain a paragraph separator (unicode decimal 8233, hex 2029)
If you edit this question, you'll see the problem.
Here's a code block with a paragraph separator char between "foo" and "bar":
var str = "foo
bar"
var also = "other lines"
The above line renders in ...
5
votes
0
answers
122
views
Markdown with fenced code blocks within lists has inconsistent previewed/final renderings
About the bug
This is a bug whose effects you can see in the revision history of this answer. Specifically, it’s about the edit that created Revision 15 (click “side-by-side markdown” to see that ...
4
votes
1
answer
485
views
Misalignment of Unicode block characters in preformatted text blocks
I see a broken format of tables passed to <pre> tags, when the table has some Unicode decoration. Look:
postgres=# select * from pg_namespace ;
┌───────┬────────────────────┬──────────┬──────────...
2
votes
1
answer
107
views
Bug in comment parsing
The following comment causes Stack Overflow to render the comment incorrectly, based on the documentation for Comment Formatting:
I think I see what you're doing. You really only need one example of ...
8
votes
1
answer
150
views
The language identifier example in the "How to format" box doesn't work for python
Currently, the "How to format" box in the edit window has the example language identifier
```python
def function(foo):
print(foo)
```
Which produces the non-hilighted output
def ...
14
votes
1
answer
375
views
Code block rendered incorrectly at question but correct in edit window
I came upon this question. On a first look I thought that the code was formatted with a backtick starting and ending every line:
I decided to correct this but when I clicked on edit I saw that it ...
26
votes
2
answers
492
views
Code wrapped inside sub/superscripts is too big
In this answer I happened to use some inline code markup inside a pseudo-footnote1 wrapped in <sup>...</sup> tags and noticed that, while the plain text inside the footnote is typeset in a ...
5
votes
1
answer
312
views
Why does code formatting not work in this question?
I found the following suggested edit in the review queue:
suggested edit, question
The multi-line code was previously formatted using `…` and it is suggested to be replaced with <code>…</...
0
votes
1
answer
259
views
Prevent code from being hidden behind markdown [duplicate]
I flagged this answer as very low quality. Now the post is completely OK so there isn't any reason to flag it, but as you can see in the edit history, first the answer was hidden behind markdown and ...
80
votes
2
answers
2k
views
Do not remove trailing spaces in inline code
If I write
` a b c `
Markdown renders it as
a b c
Inline code should not be trimmed. It's still code, and the spaces can be relevant.
Example:
[...] so .2 and .3 are invalid CSS ...