Advanced Markdown

Tue 27 January 2015

Filed under General

Advanced markdown

~~Scratch this.~~

Of course, there is the basic markdown docs like this one from GitHub. Or this one or this one.
But as I writing my posts for this blog or for reddit, I encountered challenges that those basic docs didn't address. So I googled further and found some solutions. I share here:

Escapes

Markdown provides backslash (\) escapes for the following characters:

char name
\ backslash
` backtick
* asterisk
_ underscore
{} curly braces
[] square brackets
() parentheses
# hash mark
+ plus sign
- minus sign (hyphen)
. dot
! exclamation mark

There are other characters that backslash cannot escape. For those you can use the ascii
| |
^ ^
~ ~

For example:

Pipe (|)
- If you are trying to put a pipe into a table (tables are created using pipes), it could cause problems, so you might use the | instead, as set1|set2.

Caret (^)
- Sometimes, the caret is used to make a superscript, like an exponent. But if you are trying to display the actual caret as in set1^set2, you can also write it as set1^set2

Tilde (~) - In Markdown, the tilde creates a strikethrough. If you want to display the tilde, you can write it as ~~Scratch this.~~

Linebreaks

End a line with two spaces to add a <br/> linebreak:

Bookmarks/ Anchors

Mark the spot where you'd like the anchor/ bookmark like so: <a name="requests">requests module </a>.
And to refer to it, you'd write it like any link:
[previous post](http://www.deekras.com/using-a-weather-api-forecastio.html#requests) In the actual link, at the end, you add the #name_of_bookmark.

Markdown for Reddit**

http://reddittext.com/

what's interesting specifically for reddit
- Code Four or more leading spaces will display as code, and will scroll rather than wrap.


Comments


DeeKras.com © Dee Kras Powered by Pelican and Twitter Bootstrap. Icons by Font Awesome and Font Awesome More