asciidoctor-rfc 0.8.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +3 -0
- data/.rubocop.ribose.yml +65 -0
- data/.rubocop.tb.yml +640 -0
- data/.rubocop.yml +13 -30
- data/.travis.yml +8 -3
- data/CODE_OF_CONDUCT.md +46 -0
- data/Gemfile +8 -1
- data/LICENSE +21 -17
- data/README.adoc +471 -52
- data/asciidoctor-rfc.gemspec +14 -13
- data/lib/asciidoctor-rfc.rb +4 -4
- data/lib/asciidoctor/rfc/common/base.rb +304 -58
- data/lib/asciidoctor/rfc/common/front.rb +3 -3
- data/lib/asciidoctor/rfc/v2/base.rb +71 -82
- data/lib/asciidoctor/rfc/v2/blocks.rb +33 -10
- data/lib/asciidoctor/rfc/v2/converter.rb +0 -3
- data/lib/asciidoctor/rfc/v2/inline_anchor.rb +35 -20
- data/lib/asciidoctor/rfc/v2/lists.rb +11 -13
- data/lib/asciidoctor/rfc/v2/table.rb +11 -9
- data/lib/asciidoctor/rfc/v2/validate.rb +18 -724
- data/lib/asciidoctor/rfc/v3/base.rb +75 -102
- data/lib/asciidoctor/rfc/v3/blocks.rb +7 -9
- data/lib/asciidoctor/rfc/v3/converter.rb +0 -1
- data/lib/asciidoctor/rfc/v3/front.rb +14 -7
- data/lib/asciidoctor/rfc/v3/inline_anchor.rb +12 -9
- data/lib/asciidoctor/rfc/v3/lists.rb +31 -45
- data/lib/asciidoctor/rfc/v3/table.rb +2 -2
- data/lib/asciidoctor/rfc/v3/validate.rb +19 -2153
- data/lib/asciidoctor/rfc/v3/validate.rng +1 -1
- data/lib/asciidoctor/rfc/version.rb +1 -1
- data/rfc2629-other.ent +61 -0
- data/rfc2629-xhtml.ent +165 -0
- data/rfc2629.dtd +312 -0
- data/spec/asciidoctor/rfc/v2/biblio_spec.rb +9 -0
- data/spec/asciidoctor/rfc/v2/comments_spec.rb +67 -1
- data/spec/asciidoctor/rfc/v2/crossref_spec.rb +127 -5
- data/spec/asciidoctor/rfc/v2/date_spec.rb +24 -28
- data/spec/asciidoctor/rfc/v2/dlist_spec.rb +5 -5
- data/spec/asciidoctor/rfc/v2/image_spec.rb +2 -2
- data/spec/asciidoctor/rfc/v2/inline_formatting_spec.rb +28 -0
- data/spec/asciidoctor/rfc/v2/listing_spec.rb +2 -2
- data/spec/asciidoctor/rfc/v2/literal_spec.rb +4 -4
- data/spec/asciidoctor/rfc/v2/preamble_spec.rb +1 -1
- data/spec/asciidoctor/rfc/v2/quote_spec.rb +1 -1
- data/spec/asciidoctor/rfc/v2/references_spec.rb +210 -3
- data/spec/asciidoctor/rfc/v2/section_spec.rb +33 -0
- data/spec/asciidoctor/rfc/v2/table_spec.rb +40 -1
- data/spec/asciidoctor/rfc/v2/text_spec.rb +71 -14
- data/spec/asciidoctor/rfc/v2/ulist_spec.rb +1 -1
- data/spec/asciidoctor/rfc/v3/biblio_spec.rb +13 -0
- data/spec/asciidoctor/rfc/v3/comments_spec.rb +71 -0
- data/spec/asciidoctor/rfc/v3/crossref_spec.rb +7 -0
- data/spec/asciidoctor/rfc/v3/dlist_spec.rb +4 -4
- data/spec/asciidoctor/rfc/v3/literal_spec.rb +1 -1
- data/spec/asciidoctor/rfc/v3/preamble_spec.rb +1 -1
- data/spec/asciidoctor/rfc/v3/references_spec.rb +208 -3
- data/spec/asciidoctor/rfc/v3/series_info_spec.rb +1 -1
- data/spec/asciidoctor/rfc/v3/table_spec.rb +70 -1
- data/spec/examples/README.adoc +42 -6
- data/spec/examples/biblio-insert-v2.adoc +29 -0
- data/spec/examples/biblio-insert-v3.adoc +30 -0
- data/spec/examples/davies-template-bare-06.adoc +1 -0
- data/spec/examples/draft-iab-html-rfc-bis.xml.adoc +2300 -0
- data/spec/examples/draft-iab-html-rfc-bis.xml.orig +1999 -0
- data/spec/examples/draft-iab-html-rfc-bis.xml.txt +2298 -0
- data/spec/examples/draft-iab-rfc-framework-bis.xml.adoc +662 -0
- data/spec/examples/draft-iab-rfc-framework-bis.xml.orig +476 -0
- data/spec/examples/draft-ietf-core-block-xx.mkd.adoc +8 -33
- data/spec/examples/hoffmanv2.xml.adoc +4 -0
- data/spec/examples/mib-doc-template-xml-06.adoc +6 -8
- data/spec/examples/refs-v2-database.xml +86 -0
- data/spec/examples/refs-v2.adoc +49 -0
- data/spec/examples/refs-v2.xml +50 -0
- data/spec/examples/refs-v2/AsciiDoc.xml +8 -0
- data/spec/examples/refs-v2/AsciiMathML.xml +8 -0
- data/spec/examples/refs-v2/IETF-BibXML.xml +9 -0
- data/spec/examples/refs-v2/MathJax.xml +8 -0
- data/spec/examples/refs-v2/NroffEdit.xml +8 -0
- data/spec/examples/refs-v2/TeX-LaTeX.xml +8 -0
- data/spec/examples/refs-v2/abarth +17 -0
- data/spec/examples/refs-v2/asciidoctor-bibliography.xml +19 -0
- data/spec/examples/refs-v2/asciidoctor-manual.xml +11 -0
- data/spec/examples/refs-v2/asciidoctor-rfc.xml +18 -0
- data/spec/examples/refs-v2/asciidoctor.xml +10 -0
- data/spec/examples/refs-v2/draftr.xml +8 -0
- data/spec/examples/refs-v2/kramdown-rfc2629.xml +8 -0
- data/spec/examples/refs-v2/lyx2rfc.xml +8 -0
- data/spec/examples/refs-v2/mmark.xml +9 -0
- data/spec/examples/refs-v2/pandoc2rfc.xml +8 -0
- data/spec/examples/refs-v2/reference.RFC.2119.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.5385.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.7328.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.7749.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.7763.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.7764.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.7990.xml +7 -0
- data/spec/examples/refs-v2/reference.RFC.7991.xml +7 -0
- data/spec/examples/refs-v3-database.xml +137 -0
- data/spec/examples/refs-v3.adoc +57 -0
- data/spec/examples/refs-v3.xml +90 -0
- data/spec/examples/refs-v3/AsciiDoc.xml +8 -0
- data/spec/examples/refs-v3/AsciiMathML.xml +8 -0
- data/spec/examples/refs-v3/IETF-BibXML.xml +9 -0
- data/spec/examples/refs-v3/MathJax.xml +8 -0
- data/spec/examples/refs-v3/NroffEdit.xml +8 -0
- data/spec/examples/refs-v3/TeX-LaTeX.xml +8 -0
- data/spec/examples/refs-v3/abarth +17 -0
- data/spec/examples/refs-v3/asciidoctor-bibliography.xml +19 -0
- data/spec/examples/refs-v3/asciidoctor-manual.xml +11 -0
- data/spec/examples/refs-v3/asciidoctor-rfc.xml +18 -0
- data/spec/examples/refs-v3/asciidoctor.xml +10 -0
- data/spec/examples/refs-v3/draftr.xml +8 -0
- data/spec/examples/refs-v3/kramdown-rfc2629.xml +8 -0
- data/spec/examples/refs-v3/lyx2rfc.xml +8 -0
- data/spec/examples/refs-v3/mathrefs.xml +19 -0
- data/spec/examples/refs-v3/mmark.xml +9 -0
- data/spec/examples/refs-v3/pandoc2rfc.xml +8 -0
- data/spec/examples/refs-v3/reference.RFC.2119.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.5385.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.7328.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.7749.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.7763.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.7764.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.7990.xml +7 -0
- data/spec/examples/refs-v3/reference.RFC.7991.xml +7 -0
- data/spec/examples/rfc2100.md.adoc +57 -44
- data/spec/examples/rfc3514.md.adoc +1 -1
- data/spec/examples/rfc6350.adoc +701 -695
- data/spec/examples/rfc6350.txt.orig +3372 -0
- data/spec/examples/rfc6350_refs.xml +774 -0
- data/spec/examples/rfc748.md.adoc +1 -1
- data/spec/examples/rfc7511.md.adoc +3 -3
- data/spec/examples/skel.mkd.adoc +1 -0
- data/spec/examples/stupid-s.mkd.adoc +4 -4
- metadata +94 -8
- data/spec/examples/rfc6350.bib +0 -763
@@ -0,0 +1,9 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Asciidoctor::RFC::V2::Converter do
|
4
|
+
# it "processes v2 sample biblio file" do
|
5
|
+
# system("rm -f spec/examples/refs-v2.new.xml")
|
6
|
+
# system("bin/asciidoctor-rfc2 -r asciidoctor-bibliography spec/examples/refs-v2.adoc -o spec/examples/refs-v2.new.xml")
|
7
|
+
# expect(File.read("spec/examples/refs-v2.new.xml")).to be_equivalent_to File.read("spec/examples/refs-v2.xml")
|
8
|
+
# end
|
9
|
+
end
|
@@ -208,7 +208,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
208
208
|
. They are allergic to *cinnamon*.
|
209
209
|
. More than two glasses of orange juice in 24 hours makes them howl in harmony with alarms and sirens.
|
210
210
|
. Celery makes them sad.
|
211
|
-
|
211
|
+
|
212
212
|
....
|
213
213
|
<tagging>
|
214
214
|
....
|
@@ -317,4 +317,70 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
317
317
|
</rfc>
|
318
318
|
OUTPUT
|
319
319
|
end
|
320
|
+
|
321
|
+
it "renders inline XML comments" do
|
322
|
+
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
|
323
|
+
= Document title
|
324
|
+
Author
|
325
|
+
|
326
|
+
== Section 1
|
327
|
+
A:: B [comment]#This is a comment# C D
|
328
|
+
C [comment]#This is another comment#:: D
|
329
|
+
INPUT
|
330
|
+
<section anchor="_section_1" title="Section 1">
|
331
|
+
<t>
|
332
|
+
<list style="hanging">
|
333
|
+
<t hangText="A"><vspace blankLines="1"/>B <!--This is a comment--> C D</t>
|
334
|
+
<t hangText="C "><vspace blankLines="1"/>D</t>
|
335
|
+
</list>
|
336
|
+
</t>
|
337
|
+
</section>
|
338
|
+
OUTPUT
|
339
|
+
end
|
340
|
+
|
341
|
+
it "renders XML comment paragraphs" do
|
342
|
+
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
|
343
|
+
= Document title
|
344
|
+
Author
|
345
|
+
|
346
|
+
== Section 1
|
347
|
+
[.comment]
|
348
|
+
This is a
|
349
|
+
_paragraph comment_.
|
350
|
+
INPUT
|
351
|
+
<section anchor="_section_1" title="Section 1">
|
352
|
+
<!--This is a _paragraph comment_.-->
|
353
|
+
</section>
|
354
|
+
OUTPUT
|
355
|
+
end
|
356
|
+
|
357
|
+
it "renders XML comment blocks" do
|
358
|
+
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
|
359
|
+
= Document title
|
360
|
+
Author
|
361
|
+
|
362
|
+
== Section 1
|
363
|
+
[.comment]
|
364
|
+
--
|
365
|
+
This is a
|
366
|
+
_paragraph comment_.
|
367
|
+
|
368
|
+
And the comment runs over
|
369
|
+
|
370
|
+
several paragraphs.
|
371
|
+
--
|
372
|
+
INPUT
|
373
|
+
<section anchor="_section_1" title="Section 1">
|
374
|
+
<!--This is a
|
375
|
+
_paragraph comment_.
|
376
|
+
|
377
|
+
And the comment runs over
|
378
|
+
|
379
|
+
several paragraphs.
|
380
|
+
-->
|
381
|
+
</section>
|
382
|
+
OUTPUT
|
383
|
+
end
|
384
|
+
|
385
|
+
|
320
386
|
end
|
@@ -48,6 +48,9 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
48
48
|
|
49
49
|
== Section 4
|
50
50
|
See <<crossreference,format=counter: text>>
|
51
|
+
|
52
|
+
== Section 5
|
53
|
+
See <<crossreference,format=title>>
|
51
54
|
INPUT
|
52
55
|
<?xml version="1.0" encoding="US-ASCII"?>
|
53
56
|
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
|
@@ -70,18 +73,22 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
70
73
|
<section anchor="_section_4" title="Section 4">
|
71
74
|
<t>See <xref format="counter" target="crossreference">text</xref></t>
|
72
75
|
</section>
|
76
|
+
<section anchor="_section_5" title="Section 5">
|
77
|
+
<t>See <xref format="title" target="crossreference"/></t>
|
78
|
+
</section>
|
73
79
|
</middle>
|
74
80
|
</rfc>
|
75
81
|
OUTPUT
|
76
82
|
end
|
77
83
|
|
78
|
-
it "renders cross-references
|
84
|
+
it "renders cross-references" do
|
79
85
|
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
80
86
|
= Document title
|
81
87
|
:abbrev: abbrev_value
|
82
88
|
:docName:
|
83
89
|
Author
|
84
90
|
|
91
|
+
[[crossreference]]
|
85
92
|
== Section 1
|
86
93
|
|
87
94
|
== Section 2
|
@@ -90,6 +97,56 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
90
97
|
== Section 3
|
91
98
|
See <<crossreference,text>>
|
92
99
|
|
100
|
+
== Section 4
|
101
|
+
See <<crossreference,format=counter: text>>
|
102
|
+
|
103
|
+
== Section 5
|
104
|
+
See <<crossreference,format=title>>
|
105
|
+
INPUT
|
106
|
+
<?xml version="1.0" encoding="US-ASCII"?>
|
107
|
+
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
|
108
|
+
|
109
|
+
<rfc
|
110
|
+
submissionType="IETF">
|
111
|
+
<front>
|
112
|
+
<title abbrev="abbrev_value">Document title</title>
|
113
|
+
<author fullname="Author"/>
|
114
|
+
<date day="1" month="January" year="2000"/>
|
115
|
+
</front><middle>
|
116
|
+
<section anchor="crossreference" title="Section 1">
|
117
|
+
</section>
|
118
|
+
<section anchor="_section_2" title="Section 2">
|
119
|
+
<t>See <xref target="crossreference"></xref>.</t>
|
120
|
+
</section>
|
121
|
+
<section anchor="_section_3" title="Section 3">
|
122
|
+
<t>See <xref target="crossreference">text</xref></t>
|
123
|
+
</section>
|
124
|
+
<section anchor="_section_4" title="Section 4">
|
125
|
+
<t>See <xref format="counter" target="crossreference">text</xref></t>
|
126
|
+
</section>
|
127
|
+
<section anchor="_section_5" title="Section 5">
|
128
|
+
<t>See <xref format="title" target="crossreference"/></t>
|
129
|
+
</section>
|
130
|
+
</middle>
|
131
|
+
</rfc>
|
132
|
+
OUTPUT
|
133
|
+
end
|
134
|
+
|
135
|
+
it "does not support fragments in cross-references to bibliography" do
|
136
|
+
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
137
|
+
= Document title
|
138
|
+
:abbrev: abbrev_value
|
139
|
+
:docName:
|
140
|
+
Author
|
141
|
+
|
142
|
+
== Section 1
|
143
|
+
|
144
|
+
== Section 2
|
145
|
+
See <<crossreference#fragment1>>.
|
146
|
+
|
147
|
+
== Section 3
|
148
|
+
See <<crossreference#fragment1,text>>
|
149
|
+
|
93
150
|
[bibliography]
|
94
151
|
== References
|
95
152
|
++++
|
@@ -138,6 +195,71 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
138
195
|
</rfc>
|
139
196
|
OUTPUT
|
140
197
|
end
|
198
|
+
|
199
|
+
it "renders cross-references with dots to bibliography" do
|
200
|
+
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
201
|
+
= Document title
|
202
|
+
:abbrev: abbrev_value
|
203
|
+
:docName:
|
204
|
+
Author
|
205
|
+
|
206
|
+
== Section 1
|
207
|
+
|
208
|
+
== Section 2
|
209
|
+
See <<cross.reference>>.
|
210
|
+
|
211
|
+
== Section 3
|
212
|
+
See <<cross.reference,text>>
|
213
|
+
|
214
|
+
[bibliography]
|
215
|
+
== References
|
216
|
+
++++
|
217
|
+
<reference anchor='cross.reference' target='https://tools.ietf.org/html/rfc7253'>
|
218
|
+
<front>
|
219
|
+
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
|
220
|
+
<author initials="T." surname="Krovetz">
|
221
|
+
<organization>Sacramento State</organization>
|
222
|
+
</author>
|
223
|
+
<date month='May' year='2014'/>
|
224
|
+
</front>
|
225
|
+
</reference>
|
226
|
+
++++
|
227
|
+
INPUT
|
228
|
+
<?xml version="1.0" encoding="US-ASCII"?>
|
229
|
+
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
|
230
|
+
|
231
|
+
<rfc
|
232
|
+
submissionType="IETF">
|
233
|
+
<front>
|
234
|
+
<title abbrev="abbrev_value">Document title</title>
|
235
|
+
<author fullname="Author"/>
|
236
|
+
<date day="1" month="January" year="2000"/>
|
237
|
+
</front><middle>
|
238
|
+
<section anchor="_section_1" title="Section 1">
|
239
|
+
</section>
|
240
|
+
<section anchor="_section_2" title="Section 2">
|
241
|
+
<t>See <xref target="cross.reference"></xref>.</t>
|
242
|
+
</section>
|
243
|
+
<section anchor="_section_3" title="Section 3">
|
244
|
+
<t>See <xref target="cross.reference">text</xref></t>
|
245
|
+
</section>
|
246
|
+
</middle><back>
|
247
|
+
<references title="References">
|
248
|
+
<reference anchor='cross.reference' target='https://tools.ietf.org/html/rfc7253'>
|
249
|
+
<front>
|
250
|
+
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
|
251
|
+
<author initials="T." surname="Krovetz">
|
252
|
+
<organization>Sacramento State</organization>
|
253
|
+
</author>
|
254
|
+
<date month='May' year='2014'/>
|
255
|
+
</front>
|
256
|
+
</reference>
|
257
|
+
</references>
|
258
|
+
</back>
|
259
|
+
</rfc>
|
260
|
+
OUTPUT
|
261
|
+
end
|
262
|
+
|
141
263
|
it "renders relref references" do
|
142
264
|
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
143
265
|
= Document title
|
@@ -189,10 +311,10 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
189
311
|
<date day="1" month="January" year="2000"/>
|
190
312
|
</front><middle>
|
191
313
|
<section anchor="_section_1" title="Section 1">
|
192
|
-
|
193
|
-
<xref target="crossreference">
|
194
|
-
<xref target="crossreference
|
195
|
-
<xref target="crossreference
|
314
|
+
<t>See Section 1.3 of <xref target="crossreference"/>
|
315
|
+
<xref target="crossreference">text</xref>, Section 1.4
|
316
|
+
<xref target="crossreference"/> (Section 2.5.3)
|
317
|
+
<xref target="crossreference">6.2a: text</xref></t>
|
196
318
|
</section>
|
197
319
|
</middle><back>
|
198
320
|
<references title="References">
|
@@ -145,45 +145,41 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
145
145
|
it "supplies today's date if no date given" do
|
146
146
|
# today's date is frozen at 2000-01-01 by spec_helper
|
147
147
|
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
148
|
-
|
149
|
-
|
150
|
-
|
148
|
+
= Document title
|
149
|
+
:docName:
|
150
|
+
Author
|
151
151
|
INPUT
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
<rfc
|
156
|
-
submissionType="IETF">
|
152
|
+
<?xml version="1.0" encoding="US-ASCII"?>
|
153
|
+
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
|
154
|
+
<rfc submissionType="IETF">
|
157
155
|
<front>
|
158
156
|
<title>Document title</title>
|
159
157
|
<author fullname="Author"/>
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
158
|
+
<date day="1" month="January" year="2000"/>
|
159
|
+
</front><middle>
|
160
|
+
</middle>
|
161
|
+
</rfc>
|
164
162
|
OUTPUT
|
165
163
|
end
|
166
164
|
|
167
165
|
it "supplies today's date if invalid date given" do
|
168
166
|
# today's date is frozen at 2000-01-01 by spec_helper
|
169
167
|
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
168
|
+
= Document title
|
169
|
+
:docName:
|
170
|
+
:date: fred
|
171
|
+
Author
|
174
172
|
INPUT
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
</middle>
|
186
|
-
</rfc>
|
173
|
+
<?xml version="1.0" encoding="US-ASCII"?>
|
174
|
+
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
|
175
|
+
<rfc submissionType="IETF">
|
176
|
+
<front>
|
177
|
+
<title>Document title</title>
|
178
|
+
<author fullname="Author"/>
|
179
|
+
<date day="1" month="January" year="2000"/>
|
180
|
+
</front><middle>
|
181
|
+
</middle>
|
182
|
+
</rfc>
|
187
183
|
OUTPUT
|
188
184
|
end
|
189
185
|
end
|
@@ -48,13 +48,13 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
48
48
|
<title>Document title</title>
|
49
49
|
<author fullname="Author"/>
|
50
50
|
<date day="1" month="January" year="2000"/>
|
51
|
-
|
51
|
+
|
52
52
|
</front><middle>
|
53
53
|
<section anchor="_section_1" title="Section 1">
|
54
54
|
<t>
|
55
55
|
<list hangIndent="5" style="hanging">
|
56
|
-
<t hangText="A"><vspace blankLines="
|
57
|
-
<t hangText="C"><vspace blankLines="
|
56
|
+
<t hangText="A"><vspace blankLines="0"/>B</t>
|
57
|
+
<t hangText="C"><vspace blankLines="0"/>D</t>
|
58
58
|
</list>
|
59
59
|
</t>
|
60
60
|
</section>
|
@@ -148,7 +148,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
148
148
|
Author
|
149
149
|
|
150
150
|
== Section 1
|
151
|
-
A::
|
151
|
+
A::
|
152
152
|
+
|
153
153
|
B
|
154
154
|
INPUT
|
@@ -191,7 +191,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
191
191
|
|
192
192
|
== Section 1
|
193
193
|
Notes1::
|
194
|
-
Notes2:: Definition
|
194
|
+
Notes2:: Definition
|
195
195
|
INPUT
|
196
196
|
<section anchor="_section_1" title="Section 1">
|
197
197
|
<t>
|
@@ -7,7 +7,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
7
7
|
[align=center,alt=alt_text,type=img/jpeg]
|
8
8
|
image::http:://www.example/org/filename.jpg[]
|
9
9
|
INPUT
|
10
|
-
<figure>
|
10
|
+
<figure anchor="id">
|
11
11
|
<artwork name="Title" align="center" alt="alt_text" type="img/jpeg" src="http:://www.example/org/filename.jpg"/>
|
12
12
|
</figure>
|
13
13
|
OUTPUT
|
@@ -35,7 +35,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
35
35
|
.Title
|
36
36
|
image::http:://www.example/org/filename.jpg[alt_text,300,200]
|
37
37
|
INPUT
|
38
|
-
<figure>
|
38
|
+
<figure anchor="id">
|
39
39
|
<artwork name="Title" alt="alt_text" src="http:://www.example/org/filename.jpg" width="300" height="200"/>
|
40
40
|
</figure>
|
41
41
|
OUTPUT
|
@@ -186,4 +186,32 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
186
186
|
</section>
|
187
187
|
OUTPUT
|
188
188
|
end
|
189
|
+
it "removes markup within spanx" do
|
190
|
+
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2, header_footer: true)).to be_equivalent_to <<~'OUTPUT'
|
191
|
+
= Document title
|
192
|
+
:abbrev: abbrev_value
|
193
|
+
:docName:
|
194
|
+
Author
|
195
|
+
|
196
|
+
== Section 1
|
197
|
+
`This is http://www.example.com _a_ *citation*`
|
198
|
+
INPUT
|
199
|
+
<?xml version="1.0" encoding="US-ASCII"?>
|
200
|
+
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
|
201
|
+
|
202
|
+
<rfc
|
203
|
+
submissionType="IETF">
|
204
|
+
<front>
|
205
|
+
<title abbrev="abbrev_value">Document title</title>
|
206
|
+
<author fullname="Author"/>
|
207
|
+
<date day="1" month="January" year="2000"/>
|
208
|
+
</front><middle>
|
209
|
+
|
210
|
+
<section anchor="_section_1" title="Section 1">
|
211
|
+
<t><spanx style="verb">This is a citation</spanx></t>
|
212
|
+
</section>
|
213
|
+
</middle>
|
214
|
+
</rfc>
|
215
|
+
OUTPUT
|
216
|
+
end
|
189
217
|
end
|
@@ -12,7 +12,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
12
12
|
end
|
13
13
|
----
|
14
14
|
INPUT
|
15
|
-
<figure>
|
15
|
+
<figure anchor="literal-id">
|
16
16
|
<artwork name="filename.rb" type="ruby" src="http://example.com/ruby.rb" alt="Alt Text">
|
17
17
|
</artwork>
|
18
18
|
</figure>
|
@@ -53,7 +53,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
53
53
|
end
|
54
54
|
----
|
55
55
|
INPUT
|
56
|
-
<figure>
|
56
|
+
<figure anchor="literal-id">
|
57
57
|
<artwork name="filename.rb" type="ruby">
|
58
58
|
def listing(node)
|
59
59
|
result = []
|
@@ -9,7 +9,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
9
9
|
Literal contents.
|
10
10
|
....
|
11
11
|
INPUT
|
12
|
-
<figure>
|
12
|
+
<figure anchor="literal-id">
|
13
13
|
<artwork align="left" name="filename" type="abnf" alt="alt_text">
|
14
14
|
Literal contents.
|
15
15
|
</artwork>
|
@@ -27,7 +27,7 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
27
27
|
....
|
28
28
|
<1> This is a callout
|
29
29
|
INPUT
|
30
|
-
<figure>
|
30
|
+
<figure anchor="literal-id">
|
31
31
|
<artwork align="left" name="filename" alt="alt_text">
|
32
32
|
Literal contents.
|
33
33
|
</artwork>
|
@@ -50,11 +50,11 @@ describe Asciidoctor::RFC::V2::Converter do
|
|
50
50
|
</figure>
|
51
51
|
OUTPUT
|
52
52
|
end
|
53
|
-
|
53
|
+
|
54
54
|
it "renders stem as a literal within an example" do
|
55
55
|
expect(Asciidoctor.convert(<<~'INPUT', backend: :rfc2)).to be_equivalent_to <<~'OUTPUT'
|
56
56
|
:stem:
|
57
|
-
|
57
|
+
|
58
58
|
[#id]
|
59
59
|
====
|
60
60
|
[stem]
|