Markdown
Articles
| Contributors | Last edited | Owner | ||
|---|---|---|---|---|
|
|
2 |
andrea
Markdown
|
||
|
andrea/markdown
repo_no_desc
|
||||
Markdown is a lightweight markup language for creating rich- or formatted text using a plain text editor. It was created in 2004 by John Gruber. It is widely used in online forums, blogs, documentation pages, and `README` files.
---
The following is a gist of Markdown example text, copied from the raw of https://gist.github.com/mrnugget/2384233
---
## H2 - Item 1 - Item 2 - Item3 ## Blockquotes The next few lines should be a blockquote > 'Sometimes I look up to the sky and I wish that someday someone would quote me. Like in a block. Seriously.' ## Now the code Here is a little bit of Ruby code, to test code blocks. Intended with 4 spaces. def mymethod(arg) puts "Hello #{arg}" end Let's hope this works. Here is some more code, wrapped in 3 backticks: ~~~ruby module MarkdownToHtml def body_to_html convert_to_html(body) end protected def mymethod(supercool, arg) myarray = [] myhash = {hello: "dude", bye: "dude} puts "Why is that dude? end ~~~ Here is some more code again, this time with 4 spaces intended: def convert_to_html(string) markdown = Redcarpet::Markdown.new( Redcarpet::Render::HTML.new(hard_wrap: true), no_intra_emphasis: true, autolink: true, fenced_code_blocks: true ) Redcarpet::Render::SmartyPants.render(markdown.render(string)) end Hope that works. ## JavaScript Code I do hope highlight.js catches javascript. ```javascript $(function() { var myvar = "hello"; alert("Foobar"); console.log("Hello there, my friend!"); function hellodude(name) { console.log("I just wanted to say: Hello"); $(".hello").html("My Friend! Welcome back!); } }); ``` This better work. ## Autolinks http://www.thisshouldbealink.de This is [an example](http://example.com/ "Title") inline link.