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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
---
source: ferritin/src/tests.rs
expression: "render_interactive_for_tests(Commands::get(\"fixture-crate::markdown_test\"))"
---
" Item: markdown_test ╻"
" Kind: Module ┃"
" Visibility: Public ┃"
" Defined at: fixture_crate::markdown_test ┃"
" In crate: fixture-crate (0.1.0) ┃"
" ┃"
" Markdown: Syntax ┃"
" ════════════════════════════════════════════════════════════════════════════┃"
" ┃"
" ◦ Overview ┃"
" ▪ Philosophy ┃"
" ┃"
" ▪ Inline HTML ┃"
" ┃"
" ▪ Automatic Escaping for Special Characters ┃"
" ┃"
" ◦ Block Elements ┃"
" ▪ Paragraphs and Line Breaks ┃"
" ┃"
" ▪ Headers ┃"
" ┃"
" ▪ Blockquotes ┃"
" ┃"
" ▪ Lists ┃"
" ┃"
" ▪ Code Blocks ┃"
" ┃"
" ▪ Horizontal Rules ┃"
" ┃"
" ◦ Span Elements ┃"
" ▪ Links ┃"
" ┃"
" ▪ Emphasis ┃"
" ┃"
" ▪ Code ┃"
" ┃"
" ▪ Images ┃"
" ┃"
" ◦ Miscellaneous ┃"
" ▪ Backslash Escapes ┃"
" ┃"
" ▪ Automatic Links ┃"
" ┃"
" Note: This document is itself written using Markdown; you can see the ┃"
" source for it by adding '.text' to the URL. ┃"
" ┃"
"─── • ─── • ─── • ─── • ─── • ─── • ─── • ─── • ─── • ─── • ─── • ─── • ─── • ─┃"
" ┃"
" Overview ┃"
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃"
" ┃"
" Philosophy ┃"
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃"
" ┃"
" Markdown is intended to be as easy-to-read and easy-to-write as is feasible.┃"
" ┃"
" Readability, however, is emphasized above all else. A Markdown-formatted ┃"
" document should be publishable as-is, as plain text, without looking like ┃"
" it's been marked up with tags or formatting instructions. While Markdown's ┃"
" syntax has been influenced by several existing text-to-HTML filters -- ┃"
" including Setext, atx, Textile, reStructuredText, Grutatext, and EtText -- ┃"
" the single biggest source of inspiration for Markdown's syntax is the ┃"
" format of plain text email. ┃"
" ┃"
" Block Elements ┃"
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃"
" ┃"
" Paragraphs and Line Breaks ┃"
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃"
" ┃"
" A paragraph is simply one or more consecutive lines of text, separated by ┃"
" one or more blank lines. (A blank line is any line that looks like a blank ┃"
" line -- a line containing nothing but spaces or tabs is considered blank.) ┃"
" Normal paragraphs should not be indented with spaces or tabs. ┃"
" ┃"
" The implication of the "one or more consecutive lines of text" rule is that ┃"
" Markdown supports "hard-wrapped" text paragraphs. This differs significantly┃"
" from most other text-to-HTML formatters (including Movable Type's "Convert ┃"
" Line Breaks" option) which translate every line break character in a ┃"
" paragraph into a <br /> tag. ┃"
" ┃"
" When you do want to insert a <br /> break tag using Markdown, you end a ┃"
" line with two or more spaces, then type return. ┃"
" ┃"
" Headers ┃"
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃"
" ┃"
" Markdown supports two styles of headers, Setext 1 and atx 2. ┃"
" ┃"
" Optionally, you may "close" atx-style headers. This is purely cosmetic -- ┃"
" you can use this if you think it looks better. The closing hashes don't ┃"
" even need to match the number of hashes used to open the header. (The ┃"
" number of opening hashes determines the header level.) ┃"
" ┃"
" Blockquotes ┃"
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┃"
" ┃"
" Markdown uses email-style > characters for blockquoting. If you're familiar ┃"
" with quoting passages of text in an email message, then you know how to ┃"
" create a blockquote in Markdown. It looks best if you hard wrap the text ╹"
" and put a > before every line: "
" "
" ┃ This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, "
" ┃ consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. "
" ┃ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. "
" ┃ "
" ┃ Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id "
" ┃ sem consectetuer libero luctus adipiscing. "
" "
" Markdown allows you to be lazy and only put the > before the first line of "
" a hard-wrapped paragraph: "
" "
" ┃ This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, "
" ┃ consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. "
" ┃ Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. "
" "
" ┃ Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse id "
" ┃ sem consectetuer libero luctus adipiscing. "
" "
" Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding "
" additional levels of >: "
" "
" ┃ This is the first level of quoting. "
" ┃ "
" ┃ ┃ This is nested blockquote. "
" ┃ "
" ┃ Back to the first level. "
" "
" Blockquotes can contain other Markdown elements, including headers, lists, "
" and code blocks: "
" "
" ┃ This is a header. "
" ┃ ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ "
" ┃ "
" ┃ ▪ This is the first list item. "
" ┃ "
" ┃ ▪ This is the second list item. "
" ┃ "
" ┃ Here's some example code: "
" ┃ "
" ╭───────────────────────────────────────────────❬rust❭─╮ "
" │ return shell_exec("echo $input | $markdown_script"); │ "
" ╰──────────────────────────────────────────────────────╯ "
" "
" "
" Any decent text editor should make email-style quoting easy. For example, "
" with BBEdit, you can make a selection and choose Increase Quote Level from "
" the Text menu. "
" "
" Lists "
" ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ "
" "
" Markdown supports ordered (numbered) and unordered (bulleted) lists. "
" "
" Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as "
" list markers: "
" "
" ◦ Red "
" "
" ◦ Green "
" "
" ◦ Blue "
" "
" is equivalent to: "
" "
" ◦ Red "
" "
" ◦ Green "
" "
" ◦ Blue "
" "
" and: "
" "
" ◦ Red "
" "
" ◦ Green "
" "
" ◦ Blue "
" "
" Ordered lists use numbers followed by periods: "
" "
" ◦ Bird "
" "
" ◦ McHale "
" "
" ◦ Parish "
" "
" It's important to note that the actual numbers you use to mark the list "
" have no effect on the HTML output Markdown produces. The HTML Markdown "
" produces from the above list is: "
" "
" If you instead wrote the list in Markdown like this: "
" "
" ◦ Bird "
" "
" ◦ McHale "
" "
" ◦ Parish "
"▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂"
" ferritin - q:quit ?:help ←/→:history g:go s:search l:list c:code "