r/reddit.com • u/AnteChronos • Apr 07 '08
Reddit markdown primer. Or, how do you do all that fancy formatting in your comments, anyway?
18
u/omepiet Apr 07 '08 edited Apr 08 '08
_ _ _/_/'_/ ' _ _/ ' _
/ (-(/(// / /_) (/(///)(/
/ _/ 7
u/AnteChronos Apr 08 '08 edited Apr 08 '08
| ||_ _ |_ |_ _ _ | _| _ _ _ )| |/\|| )(_||_ | )(_|\/(- | (_|(_)| )(- . .
70
u/Strauss_ismy_Grandpa Apr 07 '08 edited Apr 07 '08
№! YOU JUST OPENED UP PANDORA'S BOX
░░░░░░░░██░░░░░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░████░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░██▓▓████▓▓██░░░░░░██████████░░░░░░░░░░░░░░░░░░ ░░░░░░████▓▓▓▓▓▓▓▓██░░██████▓▓▓▓▓▓████░░░░░░░░░░░░░░░░ ░░░░████▓▓▓▓▓▓▓▓▓▓██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░░░████░░░░ ░░░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░██▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░██████████▒▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████████████▒▒▒▒▒▒████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░░░████▓▓░░░░░░░░██▒▒▒▒██████████▓▓▓▓▓▓▓▓▓▓██░░░░░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▒▒▒▒▓▓██▓▓▓▓▓▓██░░░░░░░░ ░░░░████████████████▒▒▒▒▒▒██▓▓▒▒▓▓▒▒▓▓██▓▓██░░░░░░░░░░ ░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▓▓▓▓▓▓▓▓████░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██████░░░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██░░░░░░░░░░░░░░ ░░██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░░░ ░░████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░ ░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓██░░░░░░ ░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓██▓▓██░░░░ ░░░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▓██░░
33
u/oniony Apr 07 '08 edited Apr 07 '08
HMMM PANDORA'S BOX
░░░░░░░░██░░░░░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░████░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░██▓▓████▓▓██░░░░░░██████████░░░░░░░░░░░░░░░░░░ ░░░░░░████▓▓▓▓▓▓▓▓██░░██████▓▓▓▓▓▓████░░░░░░░░░░░░░░░░ ░░░░████▓▓▓▓▓▓▓▓▓▓██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░░░████░░░░ ░░░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░██▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░██████████▒▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████████████▒▒▒▒▒▒████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░░░████▓▓░░░░░░░░██▒▒▒▒██████████▓▓▓▓▓▓▓▓▓▓██░░░░░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▒▒▒▒▓▓██▓▓▓▓▓▓██░░░░░░░░ ░░░░████████████████▒▒▒▒▒▒██▓▓▒▒▓▓▒▒▓▓██▓▓██░░░░░░░░░░ ░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▓▓▓▓▓▓▓▓████░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██████░░░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██░░░░░░░░░░░░░░ ░░██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░░░ ░░████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░ ░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓██░░░░░░ ░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓██▓▓██░░░░ ░░░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▓██░░
→ More replies (5)8
→ More replies (5)3
9
u/ropers Apr 07 '08 edited Apr 07 '08
I've sometimes had trouble with Markdown's link parser/anchor HTML generator when using the standard [reddit!](http://reddit.com) Markdown link syntax:
1. Some sites, e.g. Wikipedia, often have brackets in their URLs, like so:
The trouble is that if you enter that URL in Markdown text, the brackets will prevent the anchor tag HTML from getting generated as intended, because the closing bracket is what Markdown uses to signify the end of the URI. So the Markdown parser generates garbled output. The solution is this: Within the round brackets containing the URL, use the URL-escaped %29 for the actual URL's closing bracket (and possibly %28 for the opening bracket).
2. Some URLs, e.g. those for Archive.org's Wayback Machine, include another http://... URL, like so:
http://web.archive.org/web/20050725010627/http://reddit.com/
This second http://... sequence also confuses Markdown's anchor tag generator when using the standard [reddit!](http://reddit.com) syntax. The solution is to use %3A instead of the second colon within the round brackets containing the URL.
%3A, %28 and %29 are not converted to :, ( and ) in regular Markdown source text, but they are URL-unescaped when used between the [reddit!](http://reddit.com) syntax's round brackets.
8
u/AnteChronos Apr 07 '08 edited Apr 07 '08
Another solution to your first issue is to use the [text](URL) syntax, and then backslash-escape the mid-URL parentheses:
[History of the B Programming Language](http://en.wikipedia.org/wiki/B_\(programming_language\)#History)
5
u/oniony Apr 07 '08
Actually, the little round ones, ( and ), are parentheses. The square ones, [ and ], are brackets. The curly ones, { and } are braces.
I'm a compulsive pendant, sorry.
15
8
u/pasbesoin Apr 07 '08
Anything between the backticks will be rendered in a proportional font
I think you mean fixed-width.
5
2
4
u/broken_hand Apr 07 '08
Why did you make this a self reddit and not just use the daringfireball.net link?
14
u/AnteChronos Apr 07 '08 edited Apr 07 '08
I considered it, but I didn't think it was necessary to go into that level of detail, since I just wanted to present some of the basic formatting concepts. Things like reference-style links and inline images seemed unnecessary.
Also, I'm not convinced that everyone using reddit knows HTML, and the daringfireball syntax page gives all of the syntax in the form of "[this text] produces [this corresponding HTML]". I though that showing the source and the final displayed text would be more useful. Plus, this way you can see that, on reddit, Header 2 looks like a blue Header 4, which is certainly not the expected behavior.
Also, today's been really slow, and typing all of this up kept me busy ;-)
18
u/blamecheney Apr 07 '08
_________________
< i say what what >
-----------------
\ ^__^
\ (oo)_______
(__)\ )\/\
||----w |
|| ||21
1
12
8
u/ropers Apr 07 '08 edited Apr 07 '08
If you want to prevent Markdown's parser from converting a dot-delimeted number at the start of a line ("1.", "2.", "3.", etc.) as a numbered list and/or if you want to manually control the numbering, it's sufficient to escape the dot by using "1\.".
9
3
u/buu700 Jan 25 '10
Thanks a lot ropers! I'm writing a book in Markdown and this really helped a lot for a small part.
2
u/ropers Jan 25 '10
Out of curiosity, what software/platform do you use to write a book in markdown?
2
u/buu700 Jan 25 '10 edited Jan 25 '10
Editor: Vim inside Yakuake (a Quake-style terminal emulator)
Markdown interpreter: Maruku
Custom shell scripts (directories are hardcoded, but that's easy to fix)
When it comes time to publish, though, I'm thinking of trying to get a partnership with reddit to have it run through reddit's Markdown interpreter for the final version.
→ More replies (7)
20
u/ffualo Apr 07 '08
But how do you get that inverted 'b' that I've seen in some posts?
9
14
10
Jan 29 '10
░░░░░░░░██░░░░░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░████░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░██▓▓████▓▓██░░░░░░██████████░░░░░░░░░░░░░░░░░░ ░░░░░░████▓▓▓▓▓▓▓▓██░░██████▓▓▓▓▓▓████░░░░░░░░░░░░░░░░ ░░░░████▓▓▓▓▓▓▓▓▓▓██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░░░████░░░░ ░░░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░██▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░██████████▒▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████████████▒▒▒▒▒▒████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░░░████▓▓░░░░░░░░██▒▒▒▒██████████▓▓▓▓▓▓▓▓▓▓██░░░░░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▒▒▒▒▓▓██▓▓▓▓▓▓██░░░░░░░░ ░░░░████████████████▒▒▒▒▒▒██▓▓▒▒▓▓▒▒▓▓██▓▓██░░░░░░░░░░ ░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▓▓▓▓▓▓▓▓████░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██████░░░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██░░░░░░░░░░░░░░ ░░██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░░░ ░░████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░ ░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓██░░░░░░ ░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓██▓▓██░░░░ ░░░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▓██░░
17
u/McMarthy_was_Liberal Apr 07 '08
█████░░█░░█░░█░░██░░░░░░░░██░████░████░░░░░██░░░░░████░░█░░█ █░░░░░░█░░█░░█░░█░█░░░░░░█░█░█░░█░█░░░░░░░█░░█░░░░█░░░░░█░░█ █░░░░░░████░░█░░█░░█░░░░█░░█░████░████░░░██████░░░█░░░░░████ █░░░░░░█░░█░░█░░█░░░█░░█░░░█░█░░░░█░░░░░█░░░░░░█░░█░░░░░█░░█ █████░░█░░█░░█░░█░░░░██░░░░█░█░░░░████░█░░░░░░░░█░████░░█░░█
→ More replies (11)
5
1
u/thekrone Apr 07 '08
public void main(Strings argv[]){
System.out.println("Hello world!");
}
What language is this supposed to be? System.out.println would indicate Java, but public void main(Strings argv[]){ contradicts that.
10
u/AnteChronos Apr 07 '08
It was actually just some pseudo-code based on Java. I may have gotten some C++ mixed in there, though. It's been a while since I've done any C++, but it still creeps into my code from time to time.
4
u/thekrone Apr 07 '08 edited Apr 07 '08
public static void main(String[] args){ System.out.println("Hello world!"); }3
u/tintub Apr 08 '08
It's perfectly valid java, as long as you have a class called Strings
3
u/thekrone Apr 09 '08
Okay, that's true. However, that method can't be the default main method which is run on application launch.
It is not static, and therefore can't be called in static context. You'd first have to initialize an Object of whatever class that contains that method, then call it explicitly.
It doesn't override the abstract method
public static void main(String[] args)However, you're right. It is valid Java syntax. You win!
2
5
u/utbandit Apr 08 '08 edited Apr 08 '08
░░░░░░░░██░░░░░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░████░░██████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░██▓▓████▓▓██░░░░░░██████████░░░░░░░░░░░░░░░░░░ ░░░░░░████▓▓▓▓▓▓▓▓██░░██████▓▓▓▓▓▓████░░░░░░░░░░░░░░░░ ░░░░████▓▓▓▓▓▓▓▓▓▓██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░░░████░░░░ ░░░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░██▓▓▓▓▓▓▓▓▓▓▓▓▓▓██████▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░██▓▓▓▓▓▓▓▓▓▓████▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░██████████▒▒▒▒▒▒▒▒▒▒▒▒██████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░░░████████████▒▒▒▒▒▒████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██░░░░ ░░░░░░████▓▓░░░░░░░░██▒▒▒▒██████████▓▓▓▓▓▓▓▓▓▓██░░░░░░ ░░░░░░████░░░░░░░░▓▓██▒▒▒▒██▓▓▒▒▒▒▓▓██▓▓▓▓▓▓██░░░░░░░░ ░░░░████████████████▒▒▒▒▒▒██▓▓▒▒▓▓▒▒▓▓██▓▓██░░░░░░░░░░ ░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▒▒▓▓▓▓▓▓▓▓████░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██████░░░░░░░░░░░░░░ ██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓▓▓██░░░░░░░░░░░░░░ ░░██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░░░ ░░░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██░░░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓▓██░░░░░░░░░░░░ ░░██▒▒▒▒▒▒▒▒▒▒██████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░░░ ░░████████████████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████░░░░░░░░ ░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓▓▓██░░░░░░ ░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▓██▓▓██░░░░ ░░░░░░░░░░░░░░░░░░░░░░████▒▒▒▒▒▒▒▒▒▒▒▒████▓▓▓▓▓▓▓▓██░░
4
2
2
1
1
u/monolithdigital Jan 19 '10
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
1
u/Walletau Jun 04 '10
Lorem Ipsum does not work that way!!!
1
u/monolithdigital Jun 04 '10
It's not unionized labour, it does what I tell it to.
Edit: apeasement
→ More replies (2)
1
1
u/darksabrelord Jan 27 '10
item 1: lots of fun stuff
item 2: even more fun stuff
item 3: the last of the fun stuff
1
1
1
1
1
1
1
1
1
1
1
u/011235 Mar 25 '10 edited Mar 25 '10
Let's try out a trick!
Here is a link that you can't click in firefox!
Compare with a normal link.
blue text
1
1
1
1
1
1
1
1
1
u/elephant-skin Jul 12 '10
Hmm ... one thing I dont see here is how to add black out over the text, the kind that people use to hide spoilers in their texts. I searched some other websites about markdown, must be another method then?
2
Jul 19 '10
1
1
u/Swipecat Oct 30 '10
How about:
[mouseover-spoiler](//"Darth Vader is Yoda's father")which gives a popup warning (on Firefox at least) if you click on it:
1
1
1
1
u/shlinton Dec 24 '09
I just found this help page today.
I could never make this line appear as a second line.
Is this working?
→ More replies (7)
1
Jul 20 '10
++
--
2
1
0
0
Sep 22 '10
[deleted]
1
1
u/keskival Jan 15 '11
test
test2
test3
- test
- test2
- test3
. test
. test2
. test3
test
test2
test3
→ More replies (20)2
u/TardisDude Jul 07 '11
test
The fact is we didn't get along well until photography came into its own. Then motion pictures in the early twentieth century. Radio. Television. Things began to have mass." Montag sat in bed, not moving.
→ More replies (4)
0
u/arantius Apr 07 '08
IMO this should have started and ended at "see the official syntax guide".
Yeah, they use markdown. That and the REAL link is all we need.
0
691
u/AnteChronos Apr 07 '08 edited Nov 12 '13
Note: For a full list of markdown syntax, see the official syntax guide. Also note that reddit doesn't support images, for which I am grateful, as that would most definitely be the catalyst needed to turn reddit into 4chan (
/r/circlejerk/, which uses CSS trickery to permit some level of image posting, is a great example of the destructive power of images).PARAGRAPHS
Paragraphs are delimited by a blank line. Simply starting text on a new line won't create a new paragraph; It will remain on the same line in the final, rendered version as the previous line. You need an extra, blank line to start a new paragraph. This is especially important when dealing with quotes and, to a lesser degree, lists.
You can also add non-paragraph line breaks by ending a line with two spaces. The difference is subtle:
Paragraph 1, Line 1
Paragraph 1, Line 2
Paragraph 2
FONT FORMATTING
Italics
Text can be displayed in an italic font by surrounding a word or words with either single asterisks (*) or single underscores (_).
For example:
is displayed as:
Bold
Text can be displayed in a bold font by surrounding a word or words with either double asterisks (*) or double underscores (_).
For example:
is displayed as:
Strikethrough
Text can be displayed in a strikethrough font by surrounding a word or words with double tildes (~~). For example:
is displayed as:
Superscript
Text can be displayed in a superscript font by preceding it with a caret ( ^ ).
is displayed as:
Superscripts can even be nested: justlikethis .
However, note that the superscript font will be reset by a space. To get around this, you can enclose the text in the superscript with parentheses. The parentheses won't be displayed in the comment, and everything inside of them will be superscripted, regardless of spaces:
is displayed as
Headers
Markdown supports 6 levels of headers (some of which don't actually display as headers in reddit):
Header 1
Header 2
Header 3
Header 4
Header 5
Header 6
...which can be created in a couple of different ways. Level 1 and 2 headers can be created by adding a line of equals signs (=) or dashes (-), respectively, underneath the header text.
However, all types of headers can be created with a second method. Simply prepend a number of hashes (#) corresponding to the header level you want, so:
results in:
Note: you can add hashes after the header text to balance out how the source code looks without affecting what is displayed. So:
also produces:
LISTS
Markdown supports two types of lists: ordered and unordered.
Unordered Lists
Prepend each element in the list with either a plus (+), dash (-), or asterisk (*) plus a space. Line openers can be mixed. So
results in
Ordered Lists
Ordered lists work roughly the same way, but you prepend each item in the list with a number plus a period (.) plus a space. Also, it makes no difference what numbers you use. The ordered list will always start with the number 1, and will always increment sequentially. So
results in
Also, you can nest lists, like so:
Ordered list item 1
Bullet 1 in list item 2
Bullet 2 in list item 2
List item 3
Note: If your list items consist of multiple paragraphs, you can force each new paragraph to remain in the previous list item by indenting it by one tab or four spaces. So
results in:
Notice how the spaces in my source were stripped out? What if you need to preserve formatting? That brings us to:
CODE BLOCKS AND INLINE CODE
Inline code is easy. Simply surround any text with backticks (`), not to be confused with apostrophes ('). Anything between the backticks will be rendered in a fixed-width font, and none of the formatting syntax we're exploring will be applied. So
is displayed as:
Note that this is why you should use the normal apostrophe when typing out possessive nouns or contractions. Otherwise you may end up with something like:
Sometimes you need to preserve indentation, too. In those cases, you can create a block code element by starting every line of your code with four spaces (followed by other spaces that will be preserved). You can get results like the following:
LINKS
There are a couple of ways to get HTML links. The easiest is to just paste a valid URL, which will be automatically parsed as a link. Like so:
However, usually you'll want to have text that functions as a link. In that case, include the text inside of square brackets followed by the URL in parentheses. So:
results in:
You can also provide tooltip text for links like so:
results in:
There are other methods of generating links that aren't appropriate for discussion-board style comments. See the Markdown Syntax if you're interested in more info.
BLOCK QUOTES
You'll probably do a lot of quoting of other redditors. In those cases, you'll want to use block quotes. Simple begin each line you want quoted with a right angle bracket (>). Multiple angle brackets can be used for nested quotes. To cause a new paragraph to be quoted, begin that paragraph with another angle bracket. So the following:
Is displayed as:
And finally some unquoted text.
MISCELLANEOUS
Tables
Reddit has the ability to represent tabular data in fancy-looking tables. For example:
Which is produced with the following markdown:
All you need to produce a table is a row of headers separated by "pipes" (|), a row indicating how to justify the columns, and 1 or more rows of data (again, pipe-separated).
The only real "magic" is in the row between the headers and the data. It should ideally be formed with rows dashes separated by pipes. If you add a colon to the left of the dashes for a column, that column will be left-justified. To the right for right justification, and on both sides for centered data. If there's no colon, it defaults to left-justified.
Any number of dashes will do, even just one. You can use none at all if you want it to default to left-justified, but it's just easier to see what you're doing if you put a few in there.
Also note that the pipes (signifying the dividing line between cells) don't have to line up. You just need the same number of them in every row.
Escaping special characters
If you need to display any of the special characters, you can escape that character with a backslash (\). For example:
results in:
Horizontal rules
Finally, to create a horizontal rule, create a separate paragraph with 5 or more asterisks (*).
results in