maruku 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/{maruku0.3 → marudown} +6 -14
- data/bin/maruku +1 -1
- data/bin/marutest +37 -9
- data/docs/TOFIX.html +22 -0
- data/docs/TOFIX.md +3 -0
- data/docs/changelog-0.2.13.html +30 -0
- data/docs/changelog-0.2.13.md +6 -0
- data/docs/changelog-0.3.html +19 -5
- data/docs/faq.html +51 -40
- data/docs/faq.md +3 -3
- data/docs/hidden_o_n_squared.md +10 -0
- data/docs/index.html +84 -396
- data/docs/markdown_syntax.html +139 -330
- data/docs/markdown_syntax.md +80 -93
- data/docs/maruku.html +84 -396
- data/docs/maruku.md +88 -158
- data/docs/proposal.html +13 -106
- data/docs/proposal.md +3 -3
- data/docs/todo.html +38 -28
- data/lib/maruku.rb +77 -11
- data/lib/maruku/attributes.rb +186 -0
- data/lib/maruku/defaults.rb +40 -0
- data/lib/maruku/errors_management.rb +55 -39
- data/lib/maruku/helpers.rb +156 -72
- data/lib/maruku/input/charsource.rb +319 -0
- data/lib/maruku/{html_helper.rb → input/html_helper.rb} +30 -9
- data/lib/maruku/input/linesource.rb +111 -0
- data/lib/maruku/input/parse_block.rb +562 -0
- data/lib/maruku/{parse_doc.rb → input/parse_doc.rb} +60 -28
- data/lib/maruku/{parse_span_better.rb → input/parse_span_better.rb} +226 -256
- data/lib/maruku/input/type_detection.rb +137 -0
- data/lib/maruku/maruku.rb +33 -0
- data/lib/maruku/{to_html.rb → output/to_html.rb} +151 -132
- data/lib/maruku/{to_latex.rb → output/to_latex.rb} +31 -35
- data/lib/maruku/{to_latex_entities.rb → output/to_latex_entities.rb} +25 -3
- data/lib/maruku/output/to_latex_strings.rb +64 -0
- data/lib/maruku/output/to_markdown.rb +164 -0
- data/lib/maruku/{to_s.rb → output/to_s.rb} +6 -0
- data/lib/maruku/string_utils.rb +12 -181
- data/lib/maruku/structures.rb +91 -67
- data/lib/maruku/structures_inspect.rb +78 -0
- data/lib/maruku/structures_iterators.rb +24 -2
- data/lib/maruku/tests/benchmark.rb +41 -9
- data/lib/maruku/tests/new_parser.rb +317 -286
- data/lib/maruku/tests/tests.rb +20 -0
- data/lib/maruku/toc.rb +64 -64
- data/lib/maruku/usage/example1.rb +33 -0
- data/lib/maruku/version.rb +8 -2
- data/tests/unittest/abbreviations.md +27 -16
- data/tests/unittest/attributes/attributes.md +89 -0
- data/tests/unittest/attributes/circular.md +51 -0
- data/tests/unittest/attributes/default.md +47 -0
- data/tests/unittest/blank.md +10 -6
- data/tests/unittest/blanks_in_code.md +26 -26
- data/tests/unittest/code.md +9 -9
- data/tests/unittest/code2.md +12 -13
- data/tests/unittest/code3.md +34 -34
- data/tests/unittest/easy.md +9 -7
- data/tests/unittest/email.md +9 -7
- data/tests/unittest/encoding/iso-8859-1.md +41 -4
- data/tests/unittest/encoding/utf-8.md +6 -5
- data/tests/unittest/entities.md +52 -80
- data/tests/unittest/escaping.md +47 -35
- data/tests/unittest/extra_dl.md +19 -29
- data/tests/unittest/extra_header_id.md +31 -24
- data/tests/unittest/extra_table1.md +14 -32
- data/tests/unittest/footnotes.md +58 -42
- data/tests/unittest/headers.md +11 -11
- data/tests/unittest/hrule.md +14 -24
- data/tests/unittest/images.md +41 -26
- data/tests/unittest/inline_html.md +104 -56
- data/tests/unittest/inline_html2.md +38 -0
- data/tests/unittest/links.md +74 -33
- data/tests/unittest/list1.md +18 -15
- data/tests/unittest/list2.md +31 -13
- data/tests/unittest/list3.md +29 -28
- data/tests/unittest/list4.md +103 -12
- data/tests/unittest/lists.md +86 -53
- data/tests/unittest/lists6.md +53 -0
- data/tests/unittest/lists7.md +31 -0
- data/tests/unittest/lists_after_paragraph.md +105 -71
- data/tests/unittest/lists_ol.md +149 -73
- data/tests/unittest/misc_sw.md +366 -326
- data/tests/unittest/notyet/escape.md +10 -10
- data/tests/unittest/notyet/header_after_par.md +20 -14
- data/tests/unittest/notyet/ticks.md +8 -35
- data/tests/unittest/notyet/triggering.md +72 -45
- data/tests/unittest/olist.md +78 -0
- data/tests/unittest/one.md +5 -3
- data/tests/unittest/paragraph.md +5 -3
- data/tests/unittest/paragraph_rules/dont_merge_ref.md +15 -9
- data/tests/unittest/paragraph_rules/tab_is_blank.md +9 -5
- data/tests/unittest/paragraphs.md +21 -26
- data/tests/unittest/recover/recover_links.md +6 -5
- data/tests/unittest/references/long_example.md +39 -30
- data/tests/unittest/references/spaces_and_numbers.md +2 -2
- data/tests/unittest/syntax_hl.md +33 -31
- data/tests/unittest/test.md +4 -6
- data/tests/unittest/wrapping.md +43 -26
- metadata +160 -139
- data/docs/markdown_extra2.html +0 -87
- data/docs/markdown_extra2.md +0 -83
- data/docs/markdown_syntax_2.html +0 -152
- data/lib/maruku/parse_block.rb +0 -564
- data/lib/maruku/parse_span.rb +0 -451
- data/lib/maruku/to_latex_strings.rb +0 -59
- data/lib/maruku/to_markdown.rb +0 -110
- data/lib/test.rb +0 -29
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.
|
2
|
+
rubygems_version: 0.9.0
|
3
3
|
specification_version: 1
|
4
4
|
name: maruku
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
date: 2007-01-
|
6
|
+
version: 0.4.0
|
7
|
+
date: 2007-01-06 00:00:00 +01:00
|
8
8
|
summary: A Markdown interpreter in Ruby
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- lib
|
11
11
|
email: andrea@rubyforge.org
|
12
12
|
homepage: http://maruku.rubyforge.org
|
13
13
|
rubyforge_project:
|
@@ -18,149 +18,170 @@ bindir: bin
|
|
18
18
|
has_rdoc: false
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
25
24
|
version:
|
26
25
|
platform: ruby
|
26
|
+
signing_key:
|
27
|
+
cert_chain:
|
28
|
+
post_install_message:
|
27
29
|
authors:
|
28
|
-
|
30
|
+
- Andrea Censi
|
29
31
|
files:
|
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
|
-
|
32
|
+
- lib/maruku.rb
|
33
|
+
- lib/maruku/attributes.rb
|
34
|
+
- lib/maruku/defaults.rb
|
35
|
+
- lib/maruku/errors_management.rb
|
36
|
+
- lib/maruku/helpers.rb
|
37
|
+
- lib/maruku/maruku.rb
|
38
|
+
- lib/maruku/string_utils.rb
|
39
|
+
- lib/maruku/structures.rb
|
40
|
+
- lib/maruku/structures_inspect.rb
|
41
|
+
- lib/maruku/structures_iterators.rb
|
42
|
+
- lib/maruku/toc.rb
|
43
|
+
- lib/maruku/version.rb
|
44
|
+
- lib/maruku/input/charsource.rb
|
45
|
+
- lib/maruku/input/html_helper.rb
|
46
|
+
- lib/maruku/input/linesource.rb
|
47
|
+
- lib/maruku/input/parse_block.rb
|
48
|
+
- lib/maruku/input/parse_doc.rb
|
49
|
+
- lib/maruku/input/parse_span_better.rb
|
50
|
+
- lib/maruku/input/type_detection.rb
|
51
|
+
- lib/maruku/output/to_html.rb
|
52
|
+
- lib/maruku/output/to_latex.rb
|
53
|
+
- lib/maruku/output/to_latex_entities.rb
|
54
|
+
- lib/maruku/output/to_latex_strings.rb
|
55
|
+
- lib/maruku/output/to_markdown.rb
|
56
|
+
- lib/maruku/output/to_s.rb
|
57
|
+
- lib/maruku/tests/benchmark.rb
|
58
|
+
- lib/maruku/tests/new_parser.rb
|
59
|
+
- lib/maruku/tests/tests.rb
|
60
|
+
- lib/maruku/usage/example1.rb
|
61
|
+
- docs/changelog-0.2.13.md
|
62
|
+
- docs/changelog-0.3.md
|
63
|
+
- docs/faq.md
|
64
|
+
- docs/hidden_o_n_squared.md
|
65
|
+
- docs/markdown_syntax.md
|
66
|
+
- docs/maruku.md
|
67
|
+
- docs/proposal.md
|
68
|
+
- docs/todo.md
|
69
|
+
- docs/TOFIX.md
|
70
|
+
- docs/changelog-0.2.13.html
|
71
|
+
- docs/changelog-0.3.html
|
72
|
+
- docs/faq.html
|
73
|
+
- docs/index.html
|
74
|
+
- docs/markdown_syntax.html
|
75
|
+
- docs/maruku.html
|
76
|
+
- docs/proposal.html
|
77
|
+
- docs/todo.html
|
78
|
+
- docs/TOFIX.html
|
79
|
+
- tests/bugs/code_in_links.md
|
80
|
+
- tests/bugs/complex_escaping.md
|
81
|
+
- tests/others/abbreviations.md
|
82
|
+
- tests/others/blank.md
|
83
|
+
- tests/others/code.md
|
84
|
+
- tests/others/code2.md
|
85
|
+
- tests/others/code3.md
|
86
|
+
- tests/others/email.md
|
87
|
+
- tests/others/entities.md
|
88
|
+
- tests/others/escaping.md
|
89
|
+
- tests/others/extra_dl.md
|
90
|
+
- tests/others/extra_header_id.md
|
91
|
+
- tests/others/extra_table1.md
|
92
|
+
- tests/others/footnotes.md
|
93
|
+
- tests/others/headers.md
|
94
|
+
- tests/others/hrule.md
|
95
|
+
- tests/others/images.md
|
96
|
+
- tests/others/inline_html.md
|
97
|
+
- tests/others/links.md
|
98
|
+
- tests/others/list1.md
|
99
|
+
- tests/others/list2.md
|
100
|
+
- tests/others/list3.md
|
101
|
+
- tests/others/lists.md
|
102
|
+
- tests/others/lists_after_paragraph.md
|
103
|
+
- tests/others/lists_ol.md
|
104
|
+
- tests/others/misc_sw.md
|
105
|
+
- tests/others/one.md
|
106
|
+
- tests/others/paragraphs.md
|
107
|
+
- tests/others/sss06.md
|
108
|
+
- tests/others/test.md
|
109
|
+
- tests/unittest/abbreviations.md
|
110
|
+
- tests/unittest/blank.md
|
111
|
+
- tests/unittest/blanks_in_code.md
|
112
|
+
- tests/unittest/code.md
|
113
|
+
- tests/unittest/code2.md
|
114
|
+
- tests/unittest/code3.md
|
115
|
+
- tests/unittest/easy.md
|
116
|
+
- tests/unittest/email.md
|
117
|
+
- tests/unittest/entities.md
|
118
|
+
- tests/unittest/escaping.md
|
119
|
+
- tests/unittest/extra_dl.md
|
120
|
+
- tests/unittest/extra_header_id.md
|
121
|
+
- tests/unittest/extra_table1.md
|
122
|
+
- tests/unittest/footnotes.md
|
123
|
+
- tests/unittest/headers.md
|
124
|
+
- tests/unittest/hrule.md
|
125
|
+
- tests/unittest/images.md
|
126
|
+
- tests/unittest/inline_html.md
|
127
|
+
- tests/unittest/inline_html2.md
|
128
|
+
- tests/unittest/links.md
|
129
|
+
- tests/unittest/list1.md
|
130
|
+
- tests/unittest/list2.md
|
131
|
+
- tests/unittest/list3.md
|
132
|
+
- tests/unittest/list4.md
|
133
|
+
- tests/unittest/lists.md
|
134
|
+
- tests/unittest/lists6.md
|
135
|
+
- tests/unittest/lists7.md
|
136
|
+
- tests/unittest/lists_after_paragraph.md
|
137
|
+
- tests/unittest/lists_ol.md
|
138
|
+
- tests/unittest/misc_sw.md
|
139
|
+
- tests/unittest/olist.md
|
140
|
+
- tests/unittest/one.md
|
141
|
+
- tests/unittest/paragraph.md
|
142
|
+
- tests/unittest/paragraphs.md
|
143
|
+
- tests/unittest/syntax_hl.md
|
144
|
+
- tests/unittest/test.md
|
145
|
+
- tests/unittest/wrapping.md
|
146
|
+
- tests/unittest/attributes/attributes.md
|
147
|
+
- tests/unittest/attributes/circular.md
|
148
|
+
- tests/unittest/attributes/default.md
|
149
|
+
- tests/unittest/encoding/iso-8859-1.md
|
150
|
+
- tests/unittest/encoding/utf-8.md
|
151
|
+
- tests/unittest/notyet/escape.md
|
152
|
+
- tests/unittest/notyet/header_after_par.md
|
153
|
+
- tests/unittest/notyet/ticks.md
|
154
|
+
- tests/unittest/notyet/triggering.md
|
155
|
+
- tests/unittest/paragraph_rules/dont_merge_ref.md
|
156
|
+
- tests/unittest/paragraph_rules/tab_is_blank.md
|
157
|
+
- tests/unittest/recover/recover_links.md
|
158
|
+
- tests/unittest/references/long_example.md
|
159
|
+
- tests/unittest/references/spaces_and_numbers.md
|
160
|
+
- tests/utf8-files/simple.md
|
161
|
+
- bin/marudown
|
162
|
+
- bin/maruku
|
163
|
+
- bin/marutest
|
164
|
+
- bin/marutex
|
148
165
|
test_files: []
|
166
|
+
|
149
167
|
rdoc_options: []
|
168
|
+
|
150
169
|
extra_rdoc_files: []
|
170
|
+
|
151
171
|
executables:
|
152
|
-
|
153
|
-
|
172
|
+
- maruku
|
173
|
+
- marutex
|
154
174
|
extensions: []
|
175
|
+
|
155
176
|
requirements: []
|
177
|
+
|
156
178
|
dependencies:
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
version:
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: syntax
|
181
|
+
version_requirement:
|
182
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: 1.0.0
|
187
|
+
version:
|
data/docs/markdown_extra2.html
DELETED
@@ -1,87 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8'?>
|
2
|
-
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
|
3
|
-
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
|
4
|
-
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
|
5
|
-
<head>
|
6
|
-
<title></title>
|
7
|
-
|
8
|
-
<link href='style.css' rel='stylesheet' type='text/css' />
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
<h2 id='syntax_for_metadata'>Syntax for meta-data</h2>
|
12
|
-
|
13
|
-
<h3 id='shortcuts'>Shortcuts</h3>
|
14
|
-
|
15
|
-
<p>One sure thing is that in attributes list <code>#myid</code> is a shortcut for <code>id: myid</code> and <code>.myclass</code> is a shortcut for <code>class: myclass</code>.</p>
|
16
|
-
|
17
|
-
<h3 id='metadata_for_headers'>Meta-data for headers</h3>
|
18
|
-
|
19
|
-
<p>For headers, you want to put metadata in the <code>{}</code> on the same line:</p>
|
20
|
-
|
21
|
-
<pre><code>### Header ### {#myid}
|
22
|
-
|
23
|
-
Header {#myid .myclass}
|
24
|
-
------
|
25
|
-
</code></pre>
|
26
|
-
|
27
|
-
<h3 id='metadata_for_blocklevel_elements'>Meta-data for block-level elements</h3>
|
28
|
-
|
29
|
-
<p>For paragraphs and other block-level elements, you want to put the <code>{}</code> on the line below:</p>
|
30
|
-
|
31
|
-
<pre><code>This is a paragraph.
|
32
|
-
Line 2 of the paragraph.
|
33
|
-
|
34
|
-
{#myid .myclass}
|
35
|
-
|
36
|
-
A quote with a citation url:
|
37
|
-
> Who said that?
|
38
|
-
{cite=google.com}
|
39
|
-
</code></pre>
|
40
|
-
|
41
|
-
<h3 id='metadata_for_spanlevel_elements'>Meta-data for span-level elements</h3>
|
42
|
-
|
43
|
-
<p>Moreover, you want to use a similar syntax for span-level elements. For example, in this:</p>
|
44
|
-
|
45
|
-
<pre><code>This is a paragraph. *chunky*{#id1}
|
46
|
-
{#id2}</code></pre>
|
47
|
-
|
48
|
-
<p>you are setting the id attribute to the <code>em</code> element to <code>id1</code> and the id of the paragraph to <code>id2</code>.</p>
|
49
|
-
|
50
|
-
<p>This works also for links, like this:</p>
|
51
|
-
|
52
|
-
<pre><code>This is [a link][ref]{#myid rel=abc rev=abc}
|
53
|
-
</code></pre>
|
54
|
-
|
55
|
-
<p>For images, it should be that </p>
|
56
|
-
|
57
|
-
<pre><code>This is 
|
58
|
-
</code></pre>
|
59
|
-
|
60
|
-
<p>is equivalent to</p>
|
61
|
-
|
62
|
-
<pre><code>This is {title="fresh carrots"}
|
63
|
-
</code></pre>
|
64
|
-
|
65
|
-
<h3 id='using_references'>Using references</h3>
|
66
|
-
|
67
|
-
<p>Then, it is possible to use references: <code>{<number>}</code> is threated as a reference (it is not ambiguous as attribute names cannot start with digits) and one can write:</p>
|
68
|
-
|
69
|
-
<pre><code>### My header ### {1}
|
70
|
-
This is a paragraph with
|
71
|
-
para para para
|
72
|
-
{2}
|
73
|
-
|
74
|
-
{1}: #header-id
|
75
|
-
{2}: #paragraph-id</code></pre>
|
76
|
-
|
77
|
-
<p>which is equivalent to:</p>
|
78
|
-
|
79
|
-
<pre><code>### My header ### {#header-id}
|
80
|
-
This is a paragraph with
|
81
|
-
para para para
|
82
|
-
{#paragraph-id}</code></pre>
|
83
|
-
|
84
|
-
<div class='maruku_signature'>
|
85
|
-
<hr />
|
86
|
-
<span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown interpreter'>Maruku</a> at 00:21 on Wednesday, January 03rd, 2007.</span></div>
|
87
|
-
</body></html>
|
data/docs/markdown_extra2.md
DELETED
@@ -1,83 +0,0 @@
|
|
1
|
-
CSS: style.css
|
2
|
-
LaTeX_use_listings: true
|
3
|
-
html_use_syntax: true
|
4
|
-
|
5
|
-
Syntax for meta-data
|
6
|
-
--------------------
|
7
|
-
|
8
|
-
### Shortcuts ###
|
9
|
-
|
10
|
-
One sure thing is that in attributes list `#myid` is a shortcut
|
11
|
-
for `id: myid` and `.myclass` is a shortcut for `class: myclass`.
|
12
|
-
|
13
|
-
### Meta-data for headers ###
|
14
|
-
|
15
|
-
For headers, you want to put metadata in the `{}` on the same line:
|
16
|
-
|
17
|
-
### Header ### {#myid}
|
18
|
-
|
19
|
-
Header {#myid .myclass}
|
20
|
-
------
|
21
|
-
|
22
|
-
### Meta-data for block-level elements ###
|
23
|
-
|
24
|
-
For paragraphs and other block-level elements, you want to put
|
25
|
-
the `{}` on the line below:
|
26
|
-
|
27
|
-
This is a paragraph.
|
28
|
-
Line 2 of the paragraph.
|
29
|
-
|
30
|
-
{#myid .myclass}
|
31
|
-
|
32
|
-
A quote with a citation url:
|
33
|
-
> Who said that?
|
34
|
-
{cite=google.com}
|
35
|
-
|
36
|
-
### Meta-data for span-level elements ###
|
37
|
-
|
38
|
-
Moreover, you want to use a similar syntax for span-level elements.
|
39
|
-
For example, in this:
|
40
|
-
|
41
|
-
This is a paragraph. *chunky*{#id1}
|
42
|
-
{#id2}
|
43
|
-
|
44
|
-
you are setting the id attribute to the `em` element to `id1`
|
45
|
-
and the id of the paragraph to `id2`.
|
46
|
-
|
47
|
-
This works also for links, like this:
|
48
|
-
|
49
|
-
This is [a link][ref]{#myid rel=abc rev=abc}
|
50
|
-
|
51
|
-
For images, it should be that
|
52
|
-
|
53
|
-
This is 
|
54
|
-
|
55
|
-
is equivalent to
|
56
|
-
|
57
|
-
This is {title="fresh carrots"}
|
58
|
-
|
59
|
-
### Using references ###
|
60
|
-
|
61
|
-
Then, it is possible to use references: `{<number>}` is threated
|
62
|
-
as a reference (it is not ambiguous as attribute names cannot start
|
63
|
-
with digits) and one can write:
|
64
|
-
|
65
|
-
### My header ### {1}
|
66
|
-
This is a paragraph with
|
67
|
-
para para para
|
68
|
-
{2}
|
69
|
-
|
70
|
-
{1}: #header-id
|
71
|
-
{2}: #paragraph-id
|
72
|
-
|
73
|
-
which is equivalent to:
|
74
|
-
|
75
|
-
### My header ### {#header-id}
|
76
|
-
This is a paragraph with
|
77
|
-
para para para
|
78
|
-
{#paragraph-id}
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|