Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.
9

The reason Markdown is preferred over HTML markup is that it is readable. HTML markup does not provide anything helpful to the reader unless they know what the HTML element means (and maybe even how it is formatted on our site). Why Markdown is preferred is not as apparent with a code block, because it might just be an indented block of text. However, it ...


8

Use non-ASCII characters Oh, sure, if you type “1/2” for one half, “*” for multiplication, and “/” for division, most people will understand you.  But if you type ½ you will get ‘½’.  Similarly, × = ‘×’ and ÷ = ‘÷’. If you don’t want to look up the HTML character names, type your post in a text processor ...


8

Fundamentally - we didn't have code fences then. We do now. Essentially - the conversion from markdown to rendered markup happens once - when the post is posted. For extra fun - since its an odd number of backticks, the first pair in the opening code fence was "one" set of unformulated characters, the last and the first of the closing pair, and the 2 at the ...


8

The blockquotes works on the assumption that you have an actual quotation that needs to be formatted as plain word wrapped text. It does not preserve line endings unless you insert them with a double space at the end of a line. In the case of command line output a codeblock quote, four leading spaces per line rather than "> ", will preserve line endings ...


7

To make a standalone quote starting with a "2.", use the following: > 2\. The earth is round Turns into: 2. The earth is round A literal 2. turned into 1. when standing alone is by design, since in Markdown you could write numbered lists as sequences of 1., 1., and so on.


6

YouTube embedding is enabled only at Gaming and Audio-Video Production, IIRC due to the high reliance on videos to show tips etc. Not available on Super User. YouTube and SoundCloud embedding is now enabled It is now possible to embed YouTube and SoundCloud content in posts here. […]


6

The padding of the <code> element is set to 1px 5px 1px 5px, thus indenting the left and right by five pixels. This makes sense because inline code needs to be properly spaced and it'd look weird without the padding. Why does it look weird when using it for multiple lines? Because <code> is not meant for that. <code> is for inline ...


6

Why do you believe that what you are presenting is malformed? When you see: [![enter image description here][3]][3] This seems to be the new behavior of the image upload/insertion tool and it makes sense. Here is the breakdown of why: Previously, an uploaded image would simply be: ![enter image description here][3] And while you were able to see that ...


4

Not sure what the fix is supposed to be but: >Hello <!-- This is a comment --> >world! resolves to Hello world! For a neat break between quote blocks. Apparently this is also the suggested fix as of 2012. It looks like any non-whitespace characters will cause the markdown formatter to trigger a break, so you can use a <br/> ...


4

Formatting pre-formatted text Here's a "trick" I sometimes use to clarify commands. Usually, the four-space-indent code formatting doesn't allow you to format the code within: ./foo -o "blah" --another-option /path/to/something However, if the command consists of options that the user will have to fill with their own variables, it often helps to ...


4

Here are some useful characters for building tables: ╔╦═╗ ╠╬═╣ ║║ ║ ╚╩═╝ Example: ╔═════╦═══╗ ║ xxx ║ b ║ ╠═════╬═══╣ ║ aaa ║ c ║ ╠═════╬═══╣ ║ ddd ║ e ║ ╚═════╩═══╝ If you're on OS X, they're in the Box Drawing category of characters in Character Palette. If you suffer from Windows (8):


3

You could be a ninja and do this: My Table Click edit for copyable, CSV text! Problem solved :P


3

This is currently achievable using a code block. Granted it does require the fields to have similar lengths of data, and it looks ugly in source as you have to mangle the tabs a little. This is a nearly direct copy from Excel, with only a few extra tab keys to get the formatting right: Time in Time out Total hours Monday 08:30 18:00 ...


3

The trick lies not in how you use your formatting, but what you write. If you're going to write a whole story, your question or answer won't please me as I'll get bored soon enough. If you get straight to the point about what your problem is and then provide more details after that, I'll be happy to attempt to give an answer. It doesn't have to be pleasing ...


3

To display a single blank line between your two code lines you can separate them using: <!-- comment --> Followed by a blank line: awk 'BEGIN {RS="\0"} {match($0,/templateUrl: .*/,m); gsub("templateUrl: .*","templateUrl: templateUrl"); print "var "m[0]$0}' * <!-- comment --> awk -i '/templateUrl: / {a=$1" "$2;gsub("templateUrl: .*","...


2

You need more indents after a numbered list line. (Can never have enough indents) It works fine, and... it does with more indents after a numbered line It works fine, and... it does with more indents after a numbered line


2

I'd go with a self contained answer referencing the tweet. A screenshot would be nice, but it would be as simple as "I contacted the discord team via twitter - and they responded, that it was currently...." Of course if it got fixed its nice to follow up your answer.


2

We can see the Markdown changes by clicking "side by side markdown" in the revision history. The image appears to have been modified in the "side-by-side" view because part of the Markdown that produces the image was changed: the description, which is the alt attribute for the image. Like text, images can be inside link markup. Interestingly, image markup ...


2

This has been fixed and will be deployed in the next build.


2

The moral of the story is: Don't intimately mix Markdown and HTML in the same narrow block of code, because Markdown being a regex based solution will not know how to treat some elements. Which should tell you exactly what happened to the post in question. The parser got confused. Technically when the markdown parser encounters HTML it should quit ...


1

Your example was one the cases I used test my diff engine improvements, and as you can see, it looks much better now:


1

A bit late, but since I believe it was my edit that @MatthewWilliams referred to, I thought I'd chime in as well. So a couple more reasons, in addition to the ones Oliver Salzburg mentioned: HTML must be edited manually, the formatting toolbar (including its useful keyboard shortcuts) doesn't work. For instance, I've seen edits that have erroneously ...


1

The client-side and the server-side Markdown implementations differ. This, combined with the fact that the list wasn't formatted using Markdown, broke the image, I guess.


1

Formatting code and comments I use a trick similar to the one presented by slhck, but mine allows not only HTML markup in a gray block, but also variable-width characters.  I use the > (which is markdown for <blockquote>) at the beginning of the line, and then <code> and </code> and other markup/markdown as appropriate.  For example, ...


1

The only whitelisted and supported URI protocols are http, https and ftp. All other link protocols go through the Markdown sanitising wash and removed. Besides, you can't click those links anyway.


1

Indeed we shouldn't be giving you an option on those post types. Starting with the next build, we'll remove the markdown-processed view button and show only the raw-text diff for tag wiki excerpts. Thanks for the report!


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