|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+# Markdown Syntax
|
|
|
2
|
+
|
|
|
3
|
+(todo: include class names for enabling these features)
|
|
|
4
|
+
|
|
|
5
|
+## Block Formats
|
|
|
6
|
+
|
|
|
7
|
+Formats that apply to one or more lines.
|
|
|
8
|
+
|
|
|
9
|
+### Paragraph
|
|
|
10
|
+
|
|
|
11
|
+Any contiguous set of lines not formatted like one of the other formats below is treated as a paragraph. Paragraphs are separated by double blank lines.
|
|
|
12
|
+
|
|
|
13
|
+```markdown
|
|
|
14
|
+Lorem ipsum dolor
|
|
|
15
|
+sit amet.
|
|
|
16
|
+
|
|
|
17
|
+New paragraph begins.
|
|
|
18
|
+```
|
|
|
19
|
+
|
|
|
20
|
+### Headers
|
|
|
21
|
+
|
|
|
22
|
+Headers are marked with one or more leading hashes.
|
|
|
23
|
+
|
|
|
24
|
+```markdown
|
|
|
25
|
+# Header 1 has one hash
|
|
|
26
|
+
|
|
|
27
|
+## Header 2 has two hashes
|
|
|
28
|
+
|
|
|
29
|
+###### Up to header 6
|
|
|
30
|
+
|
|
|
31
|
+## Optional Matched Hashes At The End ##
|
|
|
32
|
+```
|
|
|
33
|
+
|
|
|
34
|
+Alternately, H1 and H2 can be marked with underlines.
|
|
|
35
|
+
|
|
|
36
|
+```markdown
|
|
|
37
|
+Header 1 underlined with equals
|
|
|
38
|
+===============================
|
|
|
39
|
+
|
|
|
40
|
+Header 2 with hyphens. Number of underline chars doesn't matter
|
|
|
41
|
+---
|
|
|
42
|
+```
|
|
|
43
|
+
|
|
|
44
|
+### Lists
|
|
|
45
|
+
|
|
|
46
|
+Unordered lists are bulleted with an asterisk, plus, or hyphen and space.
|
|
|
47
|
+
|
|
|
48
|
+```markdown
|
|
|
49
|
+* Item
|
|
|
50
|
++ Any of these
|
|
|
51
|
+- Work as bullets
|
|
|
52
|
+```
|
|
|
53
|
+
|
|
|
54
|
+Lists can be nested with one or more spaces below an item.
|
|
|
55
|
+
|
|
|
56
|
+```markdown
|
|
|
57
|
+* Item
|
|
|
58
|
+ * Sublist
|
|
|
59
|
+ * Sublist
|
|
|
60
|
+* Item
|
|
|
61
|
+```
|
|
|
62
|
+
|
|
|
63
|
+Ordered lists start with a number, period, and space.
|
|
|
64
|
+
|
|
|
65
|
+```markdown
|
|
|
66
|
+1. Item
|
|
|
67
|
+2. Item
|
|
|
68
|
+3. Item
|
|
|
69
|
+```
|
|
|
70
|
+
|
|
|
71
|
+Again, they can be nested.
|
|
|
72
|
+
|
|
|
73
|
+```markdown
|
|
|
74
|
+1. Item
|
|
|
75
|
+ 1. Subitem
|
|
|
76
|
+ 2. Subitem
|
|
|
77
|
+2. Item
|
|
|
78
|
+```
|
|
|
79
|
+
|
|
|
80
|
+The first number dictates where the numbering begins. The numbers on the other items are ignored and incremented by one.
|
|
|
81
|
+
|
|
|
82
|
+```markdown
|
|
|
83
|
+5. Rendered as a 5
|
|
|
84
|
+1. Rendered as a 6
|
|
|
85
|
+1. Rendered as a 7
|
|
|
86
|
+```
|
|
|
87
|
+
|
|
|
88
|
+### Blockquote
|
|
|
89
|
+
|
|
|
90
|
+Blockquotes enclose lengthy quoted content in an indented block.
|
|
|
91
|
+
|
|
|
92
|
+```markdown
|
|
|
93
|
+Lorem Ipsum said:
|
|
|
94
|
+
|
|
|
95
|
+> Dolor sit amet
|
|
|
96
|
+> adipiscing.
|
|
|
97
|
+```
|
|
|
98
|
+
|
|
|
99
|
+### Code Blocks
|
|
|
100
|
+
|
|
|
101
|
+Blocks of preformatted code can be enclosed in triple backticks.
|
|
|
102
|
+
|
|
|
103
|
+```markdown
|
|
|
104
|
+```
|
|
|
105
|
+function foo() {
|
|
|
106
|
+ return 'bar';
|
|
|
107
|
+}
|
|
|
108
|
+```
|
|
|
109
|
+```
|
|
|
110
|
+
|
|
|
111
|
+Alternately, lines indented by at least four spaces or a tab character will be interpreted as code blocks.
|
|
|
112
|
+
|
|
|
113
|
+```markdown
|
|
|
114
|
+ function foo() {
|
|
|
115
|
+ return 'bar';
|
|
|
116
|
+ }
|
|
|
117
|
+```
|
|
|
118
|
+
|
|
|
119
|
+### Horizontal Rule
|
|
|
120
|
+
|
|
|
121
|
+Horizontal divider lines are written as 3 or more hyphens or asterisks on a line by themselves, with or without interstitial whitespace.
|
|
|
122
|
+
|
|
|
123
|
+```markdown
|
|
|
124
|
+---
|
|
|
125
|
+
|
|
|
126
|
+***
|
|
|
127
|
+
|
|
|
128
|
+- - - -
|
|
|
129
|
+
|
|
|
130
|
+* * * * * * *
|
|
|
131
|
+```
|
|
|
132
|
+
|
|
|
133
|
+### Tables
|
|
|
134
|
+
|
|
|
135
|
+Tables consist of one header row and any number of body rows
|
|
|
136
|
+
|
|
|
137
|
+```markdown
|
|
|
138
|
+Header | Row | Here
|
|
|
139
|
+---------|-----|-----
|
|
|
140
|
+Cell | 123 | xyz
|
|
|
141
|
+Next row | 543 | abc
|
|
|
142
|
+```
|
|
|
143
|
+
|
|
|
144
|
+The pipe characters do not have to line up.
|
|
|
145
|
+
|
|
|
146
|
+Rows can optionally have leading and/or trailing pipes. This is required for a single column table.
|
|
|
147
|
+
|
|
|
148
|
+```markdown
|
|
|
149
|
+| One column |
|
|
|
150
|
+| --- |
|
|
|
151
|
+| 123 |
|
|
|
152
|
+| 234 |
|
|
|
153
|
+```
|
|
|
154
|
+
|
|
|
155
|
+Columns can be right, center, or left aligned with colons in the divider line.
|
|
|
156
|
+
|
|
|
157
|
+```markdown
|
|
|
158
|
+| Left | Center | Right |
|
|
|
159
|
+| :--- | :----: | ----: |
|
|
|
160
|
+| 1 | 2 | 3 |
|
|
|
161
|
+```
|
|
|
162
|
+
|
|
|
163
|
+### Definition List
|
|
|
164
|
+
|
|
|
165
|
+Definition lists show terms with definitions below them. Useful for glossaries.
|
|
|
166
|
+
|
|
|
167
|
+```markdown
|
|
|
168
|
+term
|
|
|
169
|
+: definition of term
|
|
|
170
|
+another
|
|
|
171
|
+: definition of another
|
|
|
172
|
+: alternate definition of another
|
|
|
173
|
+```
|
|
|
174
|
+
|
|
|
175
|
+### Abbreviation Definition
|
|
|
176
|
+
|
|
|
177
|
+Abbreviations can be defined anywhere in the document. Anywhere that abbreviation appears in the document will have a mouseover title showing the expanded definition. The definition is plaintext only (no markdown).
|
|
|
178
|
+
|
|
|
179
|
+```markdown
|
|
|
180
|
+*[ABC]: Always Be Closing
|
|
|
181
|
+```
|
|
|
182
|
+
|
|
|
183
|
+### CSS Modifiers
|
|
|
184
|
+
|
|
|
185
|
+Many block structures can be modified with CSS classes, IDs, or other simple HTML attributes inside curly braces.
|
|
|
186
|
+
|
|
|
187
|
+```markdown
|
|
|
188
|
+# Header {.mycssclass}
|
|
|
189
|
+
|
|
|
190
|
+--- {#mydividerid}
|
|
|
191
|
+
|
|
|
192
|
+| Table | {style=color:green;}
|
|
|
193
|
+|---|
|
|
|
194
|
+|123|
|
|
|
195
|
+
|
|
|
196
|
+# Multiple Modifiers {.linkclass #linkid lang=en}
|
|
|
197
|
+```
|
|
|
198
|
+
|
|
|
199
|
+## Inline Formats
|
|
|
200
|
+
|
|
|
201
|
+Formats that apply within a block to style runs of words or inject other content within text.
|
|
|
202
|
+
|
|
|
203
|
+### Strong
|
|
|
204
|
+
|
|
|
205
|
+Text can be marked as bold by enclosing it in double asterisks.
|
|
|
206
|
+
|
|
|
207
|
+```markdown
|
|
|
208
|
+Some **bold** text. Can also use __underscores__.
|
|
|
209
|
+```
|
|
|
210
|
+
|
|
|
211
|
+### Emphasis
|
|
|
212
|
+
|
|
|
213
|
+Text can be marked as italic by enclosing it in single underscores or single asterisks.
|
|
|
214
|
+
|
|
|
215
|
+```markdown
|
|
|
216
|
+Some _italic_ text. Can also use *asterisks*.
|
|
|
217
|
+```
|
|
|
218
|
+
|
|
|
219
|
+### Strikethrough
|
|
|
220
|
+
|
|
|
221
|
+Text can be stricken out using tildes, singly or in pairs.
|
|
|
222
|
+
|
|
|
223
|
+```markdown
|
|
|
224
|
+Not ~~this text~~. Not ~this text~ either.
|
|
|
225
|
+```
|
|
|
226
|
+
|
|
|
227
|
+### Code
|
|
|
228
|
+
|
|
|
229
|
+Words can be rendered in monospace font using single backticks.
|
|
|
230
|
+
|
|
|
231
|
+```markdown
|
|
|
232
|
+The name of the function is `foo()`.
|
|
|
233
|
+```
|
|
|
234
|
+
|
|
|
235
|
+### Link
|
|
|
236
|
+
|
|
|
237
|
+Linking to a document is done with marked text and a URL.
|
|
|
238
|
+
|
|
|
239
|
+```markdown
|
|
|
240
|
+Click [here](page.html).
|
|
|
241
|
+```
|
|
|
242
|
+
|
|
|
243
|
+An optional mouseover title can be added to the link after the URL.
|
|
|
244
|
+
|
|
|
245
|
+```markdown
|
|
|
246
|
+Click [here](page.html "Goes to a neat page").
|
|
|
247
|
+```
|
|
|
248
|
+
|
|
|
249
|
+Repetitive or lengthy URLs can be referenced out and defined elsewhere in the document.
|
|
|
250
|
+
|
|
|
251
|
+```markdown
|
|
|
252
|
+Click [here][foo] or [here][foo] or [even here][foo] to go to the same place.
|
|
|
253
|
+
|
|
|
254
|
+[foo]: page.html "Optional title"
|
|
|
255
|
+```
|
|
|
256
|
+
|
|
|
257
|
+Lastly, to make a link with the URL as the link text, you can use angle brackets.
|
|
|
258
|
+
|
|
|
259
|
+```markdown
|
|
|
260
|
+Go visit <page.html>.
|
|
|
261
|
+```
|
|
|
262
|
+
|
|
|
263
|
+### Image
|
|
|
264
|
+
|
|
|
265
|
+An image is similar to link syntax with an exclamation in front. Instead of clickable link text, the text is alt text for the image.
|
|
|
266
|
+
|
|
|
267
|
+```markdown
|
|
|
268
|
+
|
|
|
269
|
+```
|
|
|
270
|
+
|
|
|
271
|
+Images also support title attributes.
|
|
|
272
|
+
|
|
|
273
|
+```markdown
|
|
|
274
|
+
|
|
|
275
|
+```
|
|
|
276
|
+
|
|
|
277
|
+Images also support referenced URLs.
|
|
|
278
|
+
|
|
|
279
|
+```markdown
|
|
|
280
|
+![alt text][foo]
|
|
|
281
|
+
|
|
|
282
|
+[foo]: https://picsum.photos/100/75
|
|
|
283
|
+```
|
|
|
284
|
+
|
|
|
285
|
+Images can be made clickable by enclosing them in a link where the link text goes.
|
|
|
286
|
+
|
|
|
287
|
+```markdown
|
|
|
288
|
+[](page.html)
|
|
|
289
|
+```
|
|
|
290
|
+
|
|
|
291
|
+### Footnote
|
|
|
292
|
+
|
|
|
293
|
+Footnotes can be inserted into text. The text of the footnotes is added to the bottom of the document, regardless of where they're defined.
|
|
|
294
|
+
|
|
|
295
|
+```markdown
|
|
|
296
|
+Lorem ipsum[^1] dolor sit[^2] amet.
|
|
|
297
|
+
|
|
|
298
|
+[^1]: Further information here
|
|
|
299
|
+[^2]: See _Interesting Book_, pg 213
|
|
|
300
|
+```
|
|
|
301
|
+
|
|
|
302
|
+### HTML Tags
|
|
|
303
|
+
|
|
|
304
|
+Currently all HTML tags and attributes are permitted, when markdown syntax doesn't do what you want.
|