@@ -24,26 +24,32 @@ the output.
24
24
Example:
25
25
26
26
``` md
27
- Footnotes[^1] have a label [^@#$%] and the footnote's content .
27
+ Footnotes have a name, a reference [^1], and a definition [^@#$%].
28
28
29
- [^1]: This is a footnote content .
30
- [^@#$%]: A footnote on the label: "@#$%".
29
+ [^1]: This is a footnote definition .
30
+ [^@#$%]: A footnote with the name "@#$%".
31
31
```
32
32
33
- A footnote label must start with a caret ` ^ ` and may contain any inline text
34
- (including spaces) between a set of square brackets ` [] ` . Only the first
35
- caret has any special meaning.
36
-
37
- A footnote content must start with the label followed by a colon and at least
38
- one space. The label used to define the content must exactly match the label used
39
- in the body (including capitalization and white space). The content would then
40
- follow the label either on the same line or on the next line. The content may
41
- contain multiple lines, paragraphs, code blocks, blockquotes and most any other
42
- markdown syntax. The additional lines must be indented one level (four spaces or
43
- one tab).
44
-
45
- When working with multiple blocks, it may be helpful to start the content on a
46
- separate line from the label which defines the content. This way the entire block
33
+ A ** footnote name** is a string that uniquely identifies a footnote within the
34
+ document. It may contain any character which is valid for an HTML id attribute
35
+ (including spaces). Examples: ` 1 ` in ` [^1] ` and ` @#$% ` in ` [^@#$%] ` .
36
+
37
+ A ** footnote reference** is a link within the text body to a footnote definition.
38
+ A footnote reference contains the footnote name prefixed by a caret ` ^ ` and enclosed
39
+ in square brackets ` [] ` . Examples: ` [^1] ` and ` [^@#$%] ` . In the output, footnote
40
+ references are replaced by a superscript number that links to the footnote definition.
41
+
42
+ A ** footnote definition** must start with the corresponding footnote reference
43
+ followed by a colon and at least one space. The reference must exactly match
44
+ the reference used in the body (including capitalization and white space).
45
+ The content of the definition would then follow either on the same line
46
+ (` [^1]: This is a footnote definition. ` ) or on the next line.
47
+ Footnote definitions may contain multiple lines, paragraphs, code blocks,
48
+ blockquotes and most any other markdown syntax. The additional lines must be
49
+ indented one level (four spaces or one tab).
50
+
51
+ When working with multiple blocks, it may be helpful to start the definition on a
52
+ separate line from the reference which defines the content. This way the entire block
47
53
is indented consistently and any errors are more easily discernible by the author.
48
54
49
55
``` md
@@ -118,7 +124,7 @@ Resetting Instance State
118
124
119
125
Footnote definitions are stored within the ` markdown.Markdown ` class instance between
120
126
multiple runs of the class. This allows footnotes from all runs to be included in
121
- output, with links and references that are unique, even though the class has been
127
+ output, with links and references that are unique, even though the class has been
122
128
called multiple times.
123
129
124
130
However, if needed, the definitions can be cleared between runs by calling ` reset ` .
0 commit comments