Fossil SCM

fossil-scm / src / markdown.md
1
# Markdown Overview #
2
3
## Paragraphs ##
4
5
> Paragraphs are divided by blank lines.
6
> End a line with two or more spaces to force a mid-paragraph line break.
7
8
## Headings ##
9
10
>
11
# Top Level Heading Alternative Top Level Heading
12
# Top Level Heading Variant # =============================
13
>
14
## 2nd Level Heading Alternative 2nd Level Heading
15
## 2nd Level Heading Variant ## -----------------------------
16
>
17
### 3rd Level Heading ### 3rd Level Heading Variant ###
18
#### 4th Level Heading #### 4th Level Heading Variant ####
19
##### 5th Level Heading ##### 5th Level Heading Variant #####
20
###### 6th Level Heading ###### 6th Level Heading Variant ######
21
22
## Links ##
23
24
> 1. **\[display text\]\(URL\)**
25
> 2. **\[display text\]\(URL "Title"\)**
26
> 3. **\[display text\]\(URL 'Title'\)**
27
> 4. **\<URL\>**
28
> 5. **\[display text\]\[label\]**
29
> 6. **\[display text\]\[\]**
30
> 7. **\[display text\]**
31
> 8. **\[\]\(URL\)**
32
33
> With link formats 5, 6, and 7 ("reference links"), the URL is supplied
34
> elsewhere in the document, as shown below. Link formats 6 and 7 reuse
35
> the display text as the label. Labels are case-insensitive. The title
36
> may be split onto the next line with optional indenting.
37
38
> * **\[label\]:&nbsp;URL**
39
> * **\[label\]:&nbsp;URL&nbsp;"Title"**
40
> * **\[label\]:&nbsp;URL&nbsp;'Title'**
41
> * **\[label\]:&nbsp;URL&nbsp;(Title)**
42
43
> If **URL** begins with "http:", "https:', "ftp:' or "mailto:",
44
> it may optionally be written **\<URL\>** (format 4).
45
> Other **URL** formats include:
46
> <ul>
47
> <li> A relative pathname.
48
> <li> A pathname starting with "/" in which case the Fossil server
49
> URL prefix is prepended
50
> <li> A wiki page name, or a wiki page name preceded by "wiki:"
51
> <li> An artifact or ticket hash or hash prefix
52
> <li> A date and time stamp: "YYYY-MM-DD HH:MM:SS" or a subset that
53
> includes at least the day of the month.
54
> <li> An [interwiki link](#intermap) of the form "<i>Tag</i><b>:</b><i>PageName</i>"</ul>
55
56
> In format 8, then the URL becomes the display text. This is useful for
57
> hyperlinks that refer to wiki pages and check-in and ticket hashes.
58
59
## Text Style ##
60
61
> * _\*italic\*_
62
> * *\_italic\_*
63
> * __\*\*bold\*\*__
64
> * **\_\_bold\_\_**
65
> * ___\*\*\*italic+bold\*\*\*___
66
> * ***\_\_\_italic+bold\_\_\_***
67
> * \``code`\`
68
69
> The **\`code\`** construct disables HTML markup, so one can write, for
70
> example, **\`\<html\>\`** to yield **`<html>`**.
71
72
## Lists ##
73
74
> ~~~
75
* bullet item
76
+ bullet item
77
- bullet item
78
1. numbered item
79
2) numbered item
80
~~~
81
82
> A two-level list is created by placing additional whitespace before the
83
> **\***/**+**/**-**/**1.** of the secondary items.
84
85
> ~~~
86
* top-level item
87
* second-level item
88
~~~
89
90
## Block Quotes ##
91
92
> Begin each line of a paragraph with **>** to block quote that paragraph.
93
94
> >
95
> This paragraph is indented
96
> >
97
> > Double-indented paragraph
98
99
## Literal/Verbatim Text - Code Blocks ##
100
101
> For inline text, you can either use \``backticks`\` or the HTML
102
> `<code>` tag.
103
>
104
> For blocks of text or code:
105
>
106
> 1. Indent the text using a tab character or at least four spaces.
107
> 2. Precede the block with an HTML `<pre>` tag and follow it with `</pre>`.
108
> 3. Surround the block by <tt>\`\`\`</tt> (three or more) or <tt>\~\~\~</tt> either at the
109
> left margin or indented no more than three spaces. The first word
110
> on that same line (if any) is used in a “`language-WORD`” CSS style in
111
> the HTML rendering of that code block and is intended for use by
112
> code syntax highlighters. Thus <tt>\`\`\`c</tt> would mark a block of code
113
> in the C programming language. Text to be rendered inside the code block
114
> should therefore start on the next line, not be cuddled up with the
115
> backticks or tildes. See the "Diagrams" section below for the case where
116
> "`language-WORD`" is "pikchr".
117
118
> With the standard skins, verbatim text is rendered in a fixed-width font,
119
> but that is purely a presentation matter, controlled by the skin’s CSS.
120
121
122
## Tables ##
123
124
>
125
| Header 1 | Header 2 | Header 3 |
126
----------------------------------------------
127
| Row 1 Col 1 | Row 1 Col 2 | Row 1 Col 3 |
128
|:Left-aligned |:Centered :| Right-aligned:|
129
| | ← Blank → | |
130
| Row 4 Col 1 | Row 4 Col 2 | Row 4 Col 3 |
131
132
> The first row is a header if followed by a line consisting only of whitespace,
133
> dashes, colons, or pipes.
134
135
> Placing **:** at the left, both, or right sides of a cell gives left-aligned,
136
> centered, or right-aligned text, respectively. By default, both header and
137
> body cells are left-aligned. If there are properly placed pipes and colons
138
> within the line following the header, then these mandate the default
139
> alignments for the respective columns.
140
141
> The leftmost or rightmost **\|** is required only if the first or last column,
142
> respectively, contains at least one blank cell.
143
144
## Diagrams ##
145
146
>
147
~~~~~
148
~~~ pikchr
149
oval "Start" fit; arrow; box "Hello, World!" fit; arrow; oval "Done" fit
150
~~~
151
~~~~~
152
153
> Formatted using [Pikchr](https://pikchr.org/home), resulting in:
154
155
>
156
~~~ pikchr
157
oval "Start" fit; arrow; box "Hello, World!" fit; arrow; oval "Done" fit
158
~~~
159
160
<a id="ftnts"></a>
161
## Footnotes ##
162
163
> Footnotes (or "endnotes") is a Fossil extension of classical Markdown.
164
> Fossil's syntax for footnotes is similar to links and
165
> is distinguished by the use of character **^**
166
> that *immediately* follows an opening bracket.
167
168
> 1. **\(^** footnote's text **)**
169
> 2. **\[** fragment of text **]\(^** a comment about that fragment **\)**
170
> 3. **\[^**&nbsp;label&nbsp;**\]**
171
> 4. **\[** fragment of text **\]\[^**&nbsp;label&nbsp;**\]**
172
> 5. **\[** fragment of text **\]\[^\]**
173
174
> With formats 1 and 2 ("inline footnotes") text of a footnote is provided
175
> in the place where the corresponding numeric mark will be rendered.
176
> With formats 3, 4, and 5 ("reference footnotes") text of a footnote
177
> is supplied elsewhere in the document, as shown below.
178
> Formats 2, 4 and 5 ("span-specific footnotes") mark a specific fragment
179
> that is being commented in the footnote.
180
> Format 5 reuses a fragment of text as a label.
181
> Labels are case-insensitive.
182
183
> ```
184
> [^label]: Footnote definition must start on the first column.
185
> The second line (if any) must be indented by two or more spaces.
186
> Definition continues until indentation drops below that of the 2nd line.
187
>```
188
> Character **^** is not part of a label, it is part of the syntax.
189
> Both a footnote's text and a fragment to which a footnote applies
190
> are subject to further interpretation as Markdown sources.
191
192
## Safe HTML ##
193
194
> Markdown documents may contain raw HTML, filtered to allow the following:
195
>
196
> &lt;a&gt; &lt;abbr&gt; &lt;address&gt; &lt;article&gt; &lt;aside&gt;
197
> &lt;b&gt; &lt;big&gt; &lt;blockquote&gt; &lt;br&gt; &lt;caption&gt;
198
> &lt;center&gt; &lt;cite&gt; &lt;code&gt; &lt;col&gt; &lt;colgroup&gt;
199
> &lt;dd&gt; &lt;del&gt; &lt;details&gt; &lt;dfn&gt; &lt;div&gt; &lt;dl&gt;
200
> &lt;dt&gt; &lt;em&gt; &lt;figcaption&gt; &lt;figure&gt; &lt;font&gt;
201
> &lt;footer&gt; &lt;h1&gt; &lt;h2&gt; &lt;h3&gt; &lt;h4&gt; &lt;h5&gt;
202
> &lt;h6&gt; &lt;header&gt; &lt;hr&gt; &lt;i&gt; &lt;img&gt; &lt;ins&gt;
203
> &lt;kbd&gt; &lt;label&gt; &lt;li&gt; &lt;mark&gt; &lt;meter&gt; &lt;nav&gt;
204
> &lt;nobr&gt; &lt;nowiki&gt; &lt;ol&gt; &lt;p&gt; &lt;picture&gt; &lt;pre&gt;
205
> &lt;progress&gt; &lt;q&gt; &lt;s&gt; &lt;samp&gt; &lt;section&gt; &lt;small&gt;
206
> &lt;source&gt; &lt;span&gt; &lt;strike&gt; &lt;strong&gt; &lt;sub&gt;
207
> &lt;summary&gt; &lt;sup&gt; &lt;table&gt; &lt;tbody&gt; &lt;td&gt;
208
> &lt;tfoot&gt; &lt;th&gt; &lt;thead&gt; &lt;time&gt; &lt;title&gt; &lt;tr&gt;
209
> &lt;tt&gt; &lt;u&gt; &lt;ul&gt; &lt;var&gt; &lt;wbr&gt; &lt;verbatim&gt;
210
>
211
> Any other tag is sent through to the output in a way that causes it to be
212
> visibly called out as disallowed. This is the same whitelist as for
213
> [Fossil Wiki](/wiki_rules) markup.
214
>
215
> Fossil-specific elements **&lt;nowiki&gt;** and **&lt;verbatim&gt;** disable
216
> wiki and Markdown processing within their spans; see
217
> [Wiki formatting rules](/wiki_rules) for details.
218
>
219
> Only a fixed set of attributes is permitted (for example **id**,
220
> **class**, **style**, **href**, **src**, **srcset**, **alt**, **type**,
221
> **datetime**, and **value**). Event handlers, **javascript:** URLs, and
222
> similar constructs are stripped.
223
>
224
> Repository administrators may allow additional unsafe HTML (such as
225
> **&lt;script&gt;** and **&lt;form&gt;**) in some contexts using the
226
> [safe-html setting](/help/safe-html) on the Admin/Wiki page.
227
228
## Miscellaneous ##
229
230
> * In-line images are made using **\!\[alt-text\]\(image-URL\)**.
231
> * Use HTML for advanced formatting; see [Safe HTML](#safe-html) above.
232
> * **\<!--** HTML-style comments **-->** are allowed through only when
233
> the safe-HTML rules are bypassed.
234
> * Escape special characters (ex: **\[** **\(** **\|** **\***)
235
> using backslash (ex: **\\\[** **\\\(** **\\\|** **\\\***).
236
> * A line consisting of **---**, **\*\*\***, or **\_\_\_** is a horizontal
237
> rule. Spaces and extra **-**/**\***/**_** are allowed.
238
> * Paragraphs enclosed in **\<html\>...\</html\>** is passed through unchanged.
239
> * See [daringfireball.net][] for additional information.
240
> * See this page's [Markdown source](/md_rules?txt=1) for more examples.
241
242
## Special Features For Fossil ##
243
244
> * In hyperlinks, if the URL begins with **/** then the root of the Fossil
245
> repository is prepended. This allows for repository-relative hyperlinks.
246
> * For documents that begin with a top-level heading (ex: **# heading #**),
247
> the heading is omitted from the body of the document and becomes the
248
> document title displayed at the top of the Fossil page.
249
250
[daringfireball.net]: http://daringfireball.net/projects/markdown/syntax
251
252
<a name="intermap"></a>
253
## Interwiki Tag [Map](/intermap)
254

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button