From 8ad537a9ba9889234a63c5a38caeab3e225856e4 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 8 Jan 2016 14:35:16 +0800 Subject: unfuck markdown doc --- markdown.html.markdown | 50 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 32 insertions(+), 18 deletions(-) (limited to 'markdown.html.markdown') diff --git a/markdown.html.markdown b/markdown.html.markdown index 8961c995..05eeecbe 100644 --- a/markdown.html.markdown +++ b/markdown.html.markdown @@ -26,6 +26,7 @@ specific to a certain parser. ## HTML Elements Markdown is a superset of HTML, so any HTML file is valid Markdown. + ```markdown + +
+```ruby
 def foobar
     puts "Hello world!"
 end
-\`\`\` 
-```
+```
The above text doesn't require indenting, plus Github will use syntax highlighting of the language you specify after the \`\`\` @@ -212,6 +216,7 @@ highlighting of the language you specify after the \`\`\` Horizontal rules (`
`) are easily added with three or more asterisks or hyphens, with or without spaces. + ```markdown *** --- @@ -228,58 +233,64 @@ the text to display in hard brackets [] followed by the url in parentheses () [Click me!](http://test.com/) ``` You can also add a link title using quotes inside the parentheses. + ```markdown [Click me!](http://test.com/ "Link to Test.com") ``` Relative paths work too. + ```markdown [Go to music](/music/). ``` + Markdown also supports reference style links. -```markdown -[Click this link][link1] for more info about it! -[Also check out this link][foobar] if you want to. -[link1]: http://test.com/ "Cool!" -[foobar]: http://foobar.biz/ "Alright!" -``` +
[Click this link][link1] for more info about it!
+[Also check out this link][foobar] if you want to.
+
+[link1]: http://test.com/ "Cool!"
+[foobar]: http://foobar.biz/ "Alright!"
+ The title can also be in single quotes or in parentheses, or omitted entirely. The references can be anywhere in your document and the reference IDs can be anything so long as they are unique. There is also "implicit naming" which lets you use the link text as the id. -```markdown -[This][] is a link. -[this]: http://thisisalink.com/ -``` +
[This][] is a link.
+
+[this]: http://thisisalink.com/
+ But it's not that commonly used. ## Images Images are done the same way as links but with an exclamation point in front! + ```markdown ![This is the alt-attribute for my image](http://imgur.com/myimage.jpg "An optional title") ``` + And reference style works as expected. -```markdown -![This is the alt-attribute.][myimage] -[myimage]: relative/urls/cool/image.jpg "if you need a title, it's here" -``` +
![This is the alt-attribute.][myimage]
 
+[myimage]: relative/urls/cool/image.jpg "if you need a title, it's here"
## Miscellany ### Auto-links + ```markdown is equivalent to [http://testwebsite.com/](http://testwebsite.com/) ``` ### Auto-links for emails + ```markdown ``` ### Escaping characters + ```markdown I want to type *this text surrounded by asterisks* but I don't want it to be in italics, so I do this: \*this text surrounded by asterisks\*. @@ -288,6 +299,7 @@ in italics, so I do this: \*this text surrounded by asterisks\*. ### Keyboard keys In Github Flavored Markdown, you can use a `` tag to represent keyboard keys. + ```markdown Your computer crashed? Try sending a Ctrl+Alt+Del @@ -296,6 +308,7 @@ Your computer crashed? Try sending a Tables are only available in Github Flavored Markdown and are slightly cumbersome, but if you really want it: + ```markdown | Col1 | Col2 | Col3 | | :----------- | :------: | ------------: | @@ -309,5 +322,6 @@ Col 1 | Col2 | Col3 :-- | :-: | --: Ugh this is so ugly | make it | stop ``` + --- For more info, check out John Gruber's official post of syntax [here](http://daringfireball.net/projects/markdown/syntax) and Adam Pritchard's great cheatsheet [here](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet). -- cgit v1.2.3 From 484300f1db4509b08ed48526c61fcfcb48a6152b Mon Sep 17 00:00:00 2001 From: Zach Latta Date: Tue, 23 Feb 2016 16:12:44 -0800 Subject: Fix capitalization of GitHub --- markdown.html.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'markdown.html.markdown') diff --git a/markdown.html.markdown b/markdown.html.markdown index 05eeecbe..b4ad3202 100644 --- a/markdown.html.markdown +++ b/markdown.html.markdown @@ -72,8 +72,8 @@ __And so is this text.__ *__And this!__* ``` -In Github Flavored Markdown, which is used to render markdown files on -Github, we also have strikethrough: +In GitHub Flavored Markdown, which is used to render markdown files on +GitHub, we also have strikethrough: ```markdown ~~This text is rendered with strikethrough.~~ @@ -200,7 +200,7 @@ Inline code can be created using the backtick character ` John didn't even know what the `go_to()` function did! ``` -In Github Flavored Markdown, you can use a special syntax for code +In GitHub Flavored Markdown, you can use a special syntax for code
 ```ruby
@@ -209,7 +209,7 @@ def foobar
 end
 ```
-The above text doesn't require indenting, plus Github will use syntax +The above text doesn't require indenting, plus GitHub will use syntax highlighting of the language you specify after the \`\`\` ## Horizontal rule @@ -298,7 +298,7 @@ in italics, so I do this: \*this text surrounded by asterisks\*. ### Keyboard keys -In Github Flavored Markdown, you can use a `` tag to represent keyboard keys. +In GitHub Flavored Markdown, you can use a `` tag to represent keyboard keys. ```markdown Your computer crashed? Try sending a @@ -306,7 +306,7 @@ Your computer crashed? Try sending a ``` ### Tables -Tables are only available in Github Flavored Markdown and are slightly +Tables are only available in GitHub Flavored Markdown and are slightly cumbersome, but if you really want it: ```markdown -- cgit v1.2.3 From 2f772fff3ec4192d7fcda6b7335a46cf73bed435 Mon Sep 17 00:00:00 2001 From: Divay Prakash Date: Fri, 18 Mar 2016 12:31:55 +0530 Subject: fixed content extending beyond 80 chars --- markdown.html.markdown | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'markdown.html.markdown') diff --git a/markdown.html.markdown b/markdown.html.markdown index b4ad3202..bdf42368 100644 --- a/markdown.html.markdown +++ b/markdown.html.markdown @@ -7,7 +7,9 @@ filename: markdown.md --- -Markdown was created by John Gruber in 2004. It's meant to be an easy to read and write syntax which converts easily to HTML (and now many other formats as well). +Markdown was created by John Gruber in 2004. It's meant to be an easy to read +and write syntax which converts easily to HTML (and now many other formats as +well). Markdown also varies in implementation from one parser to a next. This guide will attempt to clarify when features are universal or when they are @@ -28,9 +30,10 @@ specific to a certain parser. Markdown is a superset of HTML, so any HTML file is valid Markdown. ```markdown - + ``` ## Headings @@ -214,8 +217,8 @@ highlighting of the language you specify after the \`\`\` ## Horizontal rule -Horizontal rules (`
`) are easily added with three or more asterisks or hyphens, -with or without spaces. +Horizontal rules (`
`) are easily added with three or more asterisks or +hyphens, with or without spaces. ```markdown *** @@ -298,7 +301,8 @@ in italics, so I do this: \*this text surrounded by asterisks\*. ### Keyboard keys -In GitHub Flavored Markdown, you can use a `` tag to represent keyboard keys. +In GitHub Flavored Markdown, you can use a `` tag to represent keyboard +keys. ```markdown Your computer crashed? Try sending a -- cgit v1.2.3