14

Normally, code blocks are formatted using four spaces of indentation: var string = 'string'; In a list, code blocks require eight spaces: var string = 'string'; After a list, a code block can be made using four spaces of indentation, but it needs to be after an intervening <!-- comment -->. var string = 'string';


14

I believe this is more a matter of personal preference than anything else. Personally I tend to use ### (h3 in HTML) for headers, but I am fine with other people choosing anything else. This is something that should not be any "site policy" or "site recommendation", we have enough of those as it is.


13

I think it would be inappropriate to change headers into bold text. For one thing, it's a trivial edit — if it were a suggested edit, would it really be worth +2 and bothering other users to review that change? For another, changing semantic markup to non-semantic markup just to get the look you personally prefer is bad practice. If you have a complaint ...


13

This seems to happen because of the above line having two $ in a row. static std::string TOKEN_LINEDUMP("$$ static std::string TOKEN_INDENTNEXT("$$>"); Removing the second $ on the first line causes it to be shown normal: static std::string TOKEN_LINEDUMP("$ static std::string TOKEN_INDENTNEXT("$$>"); Further investigation is needed.


10

Disclaimer: I use H3 headers all the time I agree that gigantic headers don't look good. But we might disagree on where we draw the line on what is "gigantic". As @200_success wrote in his answer, the important point is to use semantic markup. Strong markup is not for headers. We should use markup designed for headers. But which semantic header should we ...


9

This is kind-of working as intended. What you observe, is the code being taken as a point in the bulleted list. If you want this, add another 4 spaces of indentation and the code will be formatted correctly. Point Point 2 import code code.do() If you don't want this, break the bulleted list by inserting something else in between. Even an invisible HTML ...


8

Welp. This is the best solution I came up with. If you're okay with using <pre>, then this is probably the best. >! <pre> >! if(solution.SolutionBad == "possibly") { >! print "Code in spoilers!"; >! } >! </pre> Output: If you put the closing </pre> on the last line of code, that will remove one extra blank line ...


8

Honestly, as long as it's all there, I don't mind the order of things. Especially if headers or other methods of formatting are properly used to keep it all tidy. Questions should contain a problem statement, code and a bit of an explanation. The problem statement should be up front for best readability, IMO. The other two, there's pros and cons to either ...


5

Why not? Especially if there's more to edit than just a single instance of O(n)... I presume screen readers treat MathJax differently than inline code, too. I wouldn't make an edit just for that (especially with <2K rep and the edit needing to be reviewed/approved), but as part of an otherwise legitimate worthwhile edit that's improving the post, I don't ...


5

If you're absolutely sure it's a copy-paste error (because you've reproduced the output, for example), feel free to fix it. If there's any doubt whatsoever, don't. It's very important the output provided by the author is shown exactly as it is produced.


4

BBCode can vary depending on the site that host the BB, so I would say no, because There is no set standard for BBCode/MarkDown/etc. Syntax for Markdown is rendered and doesn't actually do any work like an XSLT file or a parser If we are talking about specifically Stack Exchange markdown, that would only be on topic for Meta sites, because the markdown is ...


3

I copied the code that you have in this question into the main question. It worked fine, with no problems for me. I can't say what the problem is, as it worked without me changing anything. The only thing that I can think is a problem is it may have thought [view1]:, etc., were code, rather than hyperlinks. This is as it is standard to indent them by two ...


3

Yes, absolutely! In this case, it is not the author's code doing that output, but Matlab. In this specific case the output is just to show the values of the variables, and I'd also say that edits to show that in a different way (for example by separating it from the code block into something else) would be okay, as you are not editing the code that is ...


1

This is a Stack Exchange wide issue. See this post and its duplicates: Could Markdown and mini-Markdown have the same support for backticks? In short, the markdown in posts and the markdown in comments (dubbed "mini-markdown") are implemented differently, and users stumble into all kinds of quirky behavior with the latter. The best we can do is upvote the ...


Only top voted, non community-wiki answers of a minimum length are eligible