forked from revolunet/sublimetext-markdown-preview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample.html
151 lines (100 loc) · 5 KB
/
sample.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<h1 id="sample-markdown-cheat-sheet">Sample Markdown Cheat Sheet</h1>
<p>This is a sample markdown file to help you write Markdown quickly :)</p>
<p>If you use the fabulous <a href="http://sublimetext.com">Sublime Text 2 editor</a> along with the <a href="https://github.com/revolunet/sublimetext-markdown-preview">Markdown Preview plugin</a>, open your ST2 Palette with <code>CMD+P</code> then choose <code>Markdown Preview in browser</code> to see the result in your browser.</p>
<h2 id="text-basics">Text basics</h2>
<p>this is <em>italic</em> and this is <strong>bold</strong> . another <em>italic</em> and another <strong>bold</strong></p>
<p>this is <code>important</code> text. and percentage signs : % and <code>%</code></p>
<p>This is a paragraph with a footnote (builtin parser only). <sup class="footnote-ref" id="fnref-note-id"><a href="#fn-note-id">1</a></sup> </p>
<p>Insert <code>[ toc ]</code> without spaces to generate a table of contents (builtin parser only).</p>
<h2 id="indentation">Indentation</h2>
<blockquote>
<p>Here is some indented text</p>
<blockquote>
<p>even more indented</p>
</blockquote>
</blockquote>
<h2 id="titles">Titles</h2>
<h1 id="big-title-h1">Big title (h1)</h1>
<h2 id="middle-title-h2">Middle title (h2)</h2>
<h3 id="smaller-title-h3">Smaller title (h3)</h3>
<h4 id="and-so-on-hx">and so on (hX)</h4>
<h5 id="and-so-on-hx-2">and so on (hX)</h5>
<h6 id="and-so-on-hx-3">and so on (hX)</h6>
<h2 id="example-lists-1">Example lists (1)</h2>
<ul>
<li>bullets can be <code>-</code>, <code>+</code>, or <code>*</code></li>
<li>bullet list 1</li>
<li><p>bullet list 2</p>
<ul>
<li>sub item 1</li>
<li><p>sub item 2</p>
<p>with indented text inside</p></li>
</ul></li>
<li><p>bullet list 3</p></li>
<li>bullet list 4</li>
<li>bullet list 5</li>
</ul>
<h2 id="links">Links</h2>
<p>This is an <a href="http://lmgtfy.com/">example inline link</a> and <a href="http://lmgtfy.com/" title="Hello, world">another one with a title</a>.</p>
<p>Links can also be reference based : <a href="http://revolunet.com">reference 1</a> or <a href="http://revolunet.com" title="rich web apps">reference 2 with title</a>.</p>
<p>References are usually placed at the bottom of the document</p>
<h2 id="images">Images</h2>
<p>A sample image :</p>
<p><img src="http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg" alt="revolunet logo" title="revolunet logo" /></p>
<p>As links, images can also use references instead of inline links :</p>
<p><img src="http://www.revolunet.com/static/parisjs8/img/logo-revolunet-carre.jpg" alt="revolunet logo" title="revolunet logo" /></p>
<h2 id="code">Code</h2>
<p>It's quite easy to show code in markdown files.</p>
<p>Backticks can be used to <code>highlight</code> some words.</p>
<p>Also, any indented block is considered a code block. If <code>enable_highlight</code> is <code>true</code>, syntax highlighting will be included (for the builtin parser - the github parser does this automatically).</p>
<pre><code><script>
document.location = 'http://lmgtfy.com/?q=markdown+cheat+sheet';
</script>
</code></pre>
<h2 id="math">Math</h2>
<p>When <code>enable_mathjax</code> is <code>true</code>, inline math can be included \(\frac{\pi}{2}\)</p>
<p>Alternatively, math can be written on its own line:</p>
<p>$$F(\omega) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^{\infty} f(t) \, e^{ - i \omega t}dt$$</p>
<h2 id="github-flavored-markdown">GitHub Flavored Markdown</h2>
<p>If you use the Github parser, you can use some of <a href="http://github.github.com/github-flavored-markdown/">Github Flavored Markdown</a> syntax :</p>
<ul>
<li>User/Project@SHA: revolunet/sublimetext-markdown-preview@7da61badeda468b5019869d11000307e07e07401</li>
<li>User/Project#Issue: revolunet/sublimetext-markdown-preview#1</li>
<li>User : @revolunet</li>
</ul>
<p>Some Python code :</p>
<pre><code>import random
class CardGame(object):
""" a sample python class """
NB_CARDS = 32
def __init__(self, cards=5):
self.cards = random.sample(range(self.NB_CARDS), 5)
print 'ready to play'
</code></pre>
<p>Some Javascript code :</p>
<pre><code>var config = {
duration: 5,
comment: 'WTF'
}
// callbacks beauty un action
async_call('/path/to/api', function(json) {
another_call(json, function(result2) {
another_another_call(result2, function(result3) {
another_another_another_call(result3, function(result4) {
alert('And if all went well, i got my result :)');
});
});
});
})
</code></pre>
<p>The Github Markdown also brings some <a href="http://www.emoji-cheat-sheet.com/">nice Emoji support</a> : :+1: :heart: :beer:</p>
<h2 id="about">About</h2>
<p>This plugin and this sample file is proudly brought to you by the <a href="http://revolunet.com">revolunet team</a></p>
<div class="footnotes">
<hr />
<ol>
<li id="fn-note-id">
<p>This is the text of the note. <a href="#fnref-note-id" class="footnoteBackLink" title="Jump back to footnote 1 in the text.">↩</a></p>
</li>
</ol>
</div>