All Questions
Tagged with code-formatting markdown-preview
10
questions
3
votes
1
answer
122
views
Post formatting is not accurate for numbered lists of code blocks. Is this a bug?
Compare the way this list looks in the post versus the screenshot of the preview:
text:
1.
{ label: `Baz ${x ? n1 : n2}`, kind: "B", } satisfies B,
1.
{ label: `Baz ${x ? n1 : n2}` ...
5
votes
1
answer
101
views
Incorrect preview of fenced code block within an ordered list
The preview for a fenced code block within an ordered list:
This is the actual result after posting:
The fenced code block turned into inline code! The preview is wrong.
1.
scheme (doc id: 1 title: &...
16
votes
1
answer
141
views
Can we warn users if the first line of a code block is silently discarded if placed on the same line as ```?
Here's an example. If a user types following into the question box:
```#include <iostream>
int main()
{
std::cout << "Hello, world!\n";
}
```
It will look like this:
int ...
2
votes
0
answers
60
views
Markdown inconsistency between preview and post when using blank lines [duplicate]
This happened in an answer on Code Golf.SE, where we have all sorts of uncommon programming languages to put in a code block.
OP's code is copied here at the markdown level:
bbcccbc-cc-b--b-- c
b
&#...
3
votes
0
answers
55
views
Why aren't runnable code snippets formatted correctly within lists?
Consider the following code snippet.
console.log("this line is all right");
console.log("but this line is indented");
This should be a part of the same bullet point but it's not.
...
4
votes
0
answers
51
views
Formatting bug: preview doesn't look the same as the published question or answer
In answering a question earlier today, I used some funky formatting. While this formatting might not be the best way of doing things, there is still a bug where the preview question doesn't look the ...
1
vote
2
answers
116
views
Is syntax highlighting only applied to code after posting?
Is syntax highlighting only applied to code after the post is posted?
// test code
for (int i = 1; i < 4; i++)
{
s = s + "abc" + 'd'
}
Also, will the formatted blocks that were shown as being ...
17
votes
1
answer
290
views
Format code as code in the review preview
This is what I mean:
When you are in SO/review as you know you can see answers like this:
The problem I have is when I see this, I think the code is NOT properly formatted.
So I click on show full ...
3
votes
3
answers
152
views
Formatting error on answer preview of code
I noticed a strange formatting glitch in FireFox 3.6.12 when the preview for my answer contains code. Specifically, when the syntax highlighter kicks in on the preview, lines in a code block that ...
3
votes
0
answers
36
views
Tab width in preview window and real question/answer differs [closed]
On Stack Overflow I edited this answer, because the code was indented by 8 spaces, which was too much too show the whole lines.
However, when I started editing, I saw the code indented only four ...