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 horizontal rule or a blank line.
133
134
> Placing **:** at the left, both, or right sides of a cell gives left-aligned,
135
> centered, or right-aligned text, respectively. By default, both header and
136
> body cells are left-aligned.
137
138
> The leftmost or rightmost **\|** is required only if the first or last column,
139
> respectively, contains at least one blank cell.
140
141
## Diagrams ##
142
143
>
144
~~~~~
145
~~~ pikchr
146
oval "Start" fit; arrow; box "Hello, World!" fit; arrow; oval "Done" fit
147
~~~
148
~~~~~
149
150
> Formatted using [Pikchr](https://pikchr.org/home), resulting in:
151
152
>
153
~~~ pikchr
154
oval "Start" fit; arrow; box "Hello, World!" fit; arrow; oval "Done" fit
155
~~~
156
157
<a id="ftnts"></a>
158
## Footnotes ##
159
160
> Footnotes (or "endnotes") is a Fossil extension of classical Markdown.
161
> Fossil's syntax for footnotes is similar to links and
162
> is distinguished by the use of character **^**
163
> that *immediately* follows an opening bracket.
164
165
> 1. **\(^** footnote's text **)**
166
> 2. **\[** fragment of text **]\(^** a comment about that fragment **\)**
167
> 3. **\[^**&nbsp;label&nbsp;**\]**
168
> 4. **\[** fragment of text **\]\[^**&nbsp;label&nbsp;**\]**
169
> 5. **\[** fragment of text **\]\[^\]**
170
171
> With formats 1 and 2 ("inline footnotes") text of a footnote is provided
172
> in the place where the corresponding numeric mark will be rendered.
173
> With formats 3, 4, and 5 ("reference footnotes") text of a footnote
174
> is supplied elsewhere in the document, as shown below.
175
> Formats 2, 4 and 5 ("span-specific footnotes") mark a specific fragment
176
> that is being commented in the footnote.
177
> Format 5 reuses a fragment of text as a label.
178
> Labels are case-insensitive.
179
180
> ```
181
> [^label]: Footnote definition must start on the first column.
182
> The second line (if any) must be indented by two or more spaces.
183
> Definition continues until indentation drops below that of the 2nd line.
184
>```
185
> Character **^** is not part of a label, it is part of the syntax.
186
> Both a footnote's text and a fragment to which a footnote applies
187
> are subject to further interpretation as Markdown sources.
188
189
## Miscellaneous ##
190
191
> * In-line images are made using **\!\[alt-text\]\(image-URL\)**.
192
> * Use HTML for advanced formatting such as forms, noting that certain
193
> tags are [disallowed in some contexts](/help/safe-html).
194
> * **\<!--** HTML-style comments **-->** are supported.
195
> * Escape special characters (ex: **\[** **\(** **\|** **\***)
196
> using backslash (ex: **\\\[** **\\\(** **\\\|** **\\\***).
197
> * A line consisting of **---**, **\*\*\***, or **\_\_\_** is a horizontal
198
> rule. Spaces and extra **-**/**\***/**_** are allowed.
199
> * Paragraphs enclosed in **\<html\>...\</html\>** is passed through unchanged.
200
> * See [daringfireball.net][] for additional information.
201
> * See this page's [Markdown source](/md_rules?txt=1) for more examples.
202
203
## Special Features For Fossil ##
204
205
> * In hyperlinks, if the URL begins with **/** then the root of the Fossil
206
> repository is prepended. This allows for repository-relative hyperlinks.
207
> * For documents that begin with a top-level heading (ex: **# heading #**),
208
> the heading is omitted from the body of the document and becomes the
209
> document title displayed at the top of the Fossil page.
210
211
[daringfireball.net]: http://daringfireball.net/projects/markdown/syntax
212
213
<a name="intermap"></a>
214
## Interwiki Tag [Map](/intermap)
215

Keyboard Shortcuts

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