asciidoctor-rfc 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4f4e13a1c0b1f7b874d877b3af7ac9bb6a9c57e
4
- data.tar.gz: a8568b817911f27790d5f6c650be1b7f7b689b1b
3
+ metadata.gz: b5863fe02ba89d28e9da58e35cebe4502982de33
4
+ data.tar.gz: 2f2b188dbd17dfbe10ec94cf9fdf3133d5e07af5
5
5
  SHA512:
6
- metadata.gz: be627748bf8653eb0c6216f8c407e3a4a6859f73e7e3c6063226c510a8c132f420255a07a717a2c0b68772cf25a6ba99a09e21c4b277392fba9137557e41e71f
7
- data.tar.gz: ee27131d6f964ea7ef0470c2b487212b3a8ae215e32182e9a9f2cb77f39db82bd0cc295969c8831a1443dfb829f4decec1e2773cbf2dfdfe9133b55aab43a95a
6
+ metadata.gz: 4a02f95152d0448df4363d6c77562db8044b70bb9e33612a78903ade801f371f3b1013efc630ef05b3b88f4287d3ddd1a42d634562a95ac33e756edf250576a7
7
+ data.tar.gz: eec672a895df5026b803681f745273ff2e533d59a9e2caa9e4085b180d52f51ad1c7966a2456ca174a05f833d6a918fe0372716f1b0c6852fb9c5b65bb4aa454
@@ -30,7 +30,7 @@ module Asciidoctor
30
30
  }
31
31
 
32
32
  # NOTE: html escaping is performed by Nokogiri
33
- artwork_content = node.lines.join("\n")
33
+ artwork_content = "\n" + node.lines.join("\n") + "\n"
34
34
 
35
35
  ret = noko do |xml|
36
36
  if node.parent.context != :example
@@ -38,10 +38,16 @@ module Asciidoctor
38
38
  anchor: node.id,
39
39
  }
40
40
  xml.figure **attr_code(figure_attributes) do |xml_figure|
41
- xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
41
+ # xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
42
+ xml_figure.artwork **attr_code(artwork_attributes) do |a|
43
+ a.cdata artwork_content
44
+ end
42
45
  end
43
46
  else
44
- xml.artwork artwork_content, **attr_code(artwork_attributes)
47
+ # xml.artwork artwork_content, **attr_code(artwork_attributes)
48
+ xml.artwork **attr_code(artwork_attributes) do |a|
49
+ a.cdata artwork_content
50
+ end
45
51
  end
46
52
  end
47
53
  ret
@@ -57,7 +63,7 @@ module Asciidoctor
57
63
  }
58
64
 
59
65
  # NOTE: html escaping is performed by Nokogiri
60
- artwork_content = node.lines.join("\n")
66
+ artwork_content = "\n" + node.lines.join("\n") + "\n"
61
67
 
62
68
  ret = noko do |xml|
63
69
  if node.parent.context != :example
@@ -65,10 +71,16 @@ module Asciidoctor
65
71
  anchor: node.id,
66
72
  }
67
73
  xml.figure **attr_code(figure_attributes) do |xml_figure|
68
- xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
74
+ # xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
75
+ xml_figure.artwork **attr_code(artwork_attributes) do |a|
76
+ a.cdata artwork_content
77
+ end
69
78
  end
70
79
  else
71
- xml.artwork artwork_content, **attr_code(artwork_attributes)
80
+ # xml.artwork artwork_content, **attr_code(artwork_attributes)
81
+ xml.artwork **attr_code(artwork_attributes) do |a|
82
+ a.cdata artwork_content
83
+ end
72
84
  end
73
85
  end
74
86
  ret
@@ -202,7 +214,7 @@ module Asciidoctor
202
214
 
203
215
  # NOTE: html escaping is performed by Nokogiri
204
216
  sourcecode_content =
205
- sourcecode_attributes[:src].nil? ? node.lines.join("\n") : ""
217
+ sourcecode_attributes[:src].nil? ? "\n" + node.lines.join("\n") + "\n" : ""
206
218
 
207
219
  noko do |xml|
208
220
  if node.parent.context != :example
@@ -210,10 +222,17 @@ module Asciidoctor
210
222
  anchor: node.id,
211
223
  }
212
224
  xml.figure **attr_code(figure_attributes) do |xml_figure|
213
- xml_figure.artwork sourcecode_content, **attr_code(sourcecode_attributes)
225
+ # xml_figure.artwork sourcecode_content, **attr_code(sourcecode_attributes)
226
+ xml_figure.artwork **attr_code(sourcecode_attributes) do |a|
227
+ a.cdata sourcecode_content
228
+ end
229
+
214
230
  end
215
231
  else
216
- xml.artwork sourcecode_content, **attr_code(sourcecode_attributes)
232
+ # xml.artwork sourcecode_content, **attr_code(sourcecode_attributes)
233
+ xml.artwork **attr_code(sourcecode_attributes) do |a|
234
+ a.cdata sourcecode_content
235
+ end
217
236
  end
218
237
  end
219
238
  end
@@ -30,15 +30,21 @@ module Asciidoctor
30
30
  }
31
31
 
32
32
  # NOTE: html escaping is performed by Nokogiri
33
- artwork_content = node.lines.join("\n")
33
+ artwork_content = "\n" + node.lines.join("\n") + "\n"
34
34
 
35
35
  noko do |xml|
36
36
  if node.parent.context != :example
37
37
  xml.figure do |xml_figure|
38
- xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
38
+ # xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
39
+ xml_figure.artwork **attr_code(artwork_attributes) do |a|
40
+ a.cdata artwork_content
41
+ end
39
42
  end
40
43
  else
41
- xml.artwork artwork_content, **attr_code(artwork_attributes)
44
+ # xml.artwork artwork_content, **attr_code(artwork_attributes)
45
+ xml.artwork **attr_code(artwork_attributes) do |a|
46
+ a.cdata artwork_content
47
+ end
42
48
  end
43
49
  end
44
50
  end
@@ -54,15 +60,21 @@ module Asciidoctor
54
60
  }
55
61
 
56
62
  # NOTE: html escaping is performed by Nokogiri
57
- artwork_content = node.lines.join("\n")
63
+ artwork_content = "\n" + node.lines.join("\n") + "\n"
58
64
 
59
65
  noko do |xml|
60
66
  if node.parent.context != :example
61
67
  xml.figure do |xml_figure|
62
- xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
68
+ # xml_figure.artwork artwork_content, **attr_code(artwork_attributes)
69
+ xml_figure.artwork **attr_code(artwork_attributes) do |a|
70
+ a.cdata artwork_content
71
+ end
63
72
  end
64
73
  else
65
- xml.artwork artwork_content, **attr_code(artwork_attributes)
74
+ # xml.artwork artwork_content, **attr_code(artwork_attributes)
75
+ xml.artwork **attr_code(artwork_attributes) do |a|
76
+ a.cdata artwork_content
77
+ end
66
78
  end
67
79
  end
68
80
  end
@@ -211,15 +223,21 @@ module Asciidoctor
211
223
 
212
224
  # NOTE: html escaping is performed by Nokogiri
213
225
  sourcecode_content =
214
- sourcecode_attributes[:src].nil? ? node.lines.join("\n") : ""
226
+ sourcecode_attributes[:src].nil? ? "\n" + node.lines.join("\n") + "\n" : ""
215
227
 
216
228
  noko do |xml|
217
229
  if node.parent.context != :example
218
230
  xml.figure do |xml_figure|
219
- xml_figure.sourcecode sourcecode_content, **attr_code(sourcecode_attributes)
231
+ # xml_figure.sourcecode sourcecode_content, **attr_code(sourcecode_attributes)
232
+ xml_figure.sourcecode **attr_code(sourcecode_attributes) do |a|
233
+ a.cdata sourcecode_content
234
+ end
220
235
  end
221
236
  else
222
- xml.sourcecode sourcecode_content, **attr_code(sourcecode_attributes)
237
+ # xml.sourcecode sourcecode_content, **attr_code(sourcecode_attributes)
238
+ xml.sourcecode **attr_code(sourcecode_attributes) do |a|
239
+ a.cdata sourcecode_content
240
+ end
223
241
  end
224
242
  end
225
243
  end
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module RFC
3
- VERSION = "0.8.2".freeze
3
+ VERSION = "0.8.3".freeze
4
4
  end
5
5
  end
@@ -14,9 +14,9 @@ describe Asciidoctor::RFC::V2::Converter do
14
14
  ====
15
15
  INPUT
16
16
  <figure anchor="id" align="left" alt="Alt Text" title="Figure 1" suppress-title="true">
17
- <artwork name="figure1.txt">
17
+ <artwork name="figure1.txt"><![CDATA[
18
18
  Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
19
- </artwork>
19
+ ]]></artwork>
20
20
  </figure>
21
21
  OUTPUT
22
22
  end
@@ -38,9 +38,9 @@ describe Asciidoctor::RFC::V2::Converter do
38
38
  <preamble>
39
39
  Preamble text
40
40
  </preamble>
41
- <artwork name="figure1.txt">
41
+ <artwork name="figure1.txt"><![CDATA[
42
42
  Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
43
- </artwork>
43
+ ]]></artwork>
44
44
  <postamble>
45
45
  Postamble text
46
46
  </postamble>
@@ -13,8 +13,7 @@ describe Asciidoctor::RFC::V2::Converter do
13
13
  ----
14
14
  INPUT
15
15
  <figure anchor="literal-id">
16
- <artwork name="filename.rb" type="ruby" src="http://example.com/ruby.rb" alt="Alt Text">
17
- </artwork>
16
+ <artwork name="filename.rb" type="ruby" src="http://example.com/ruby.rb" alt="Alt Text"><![CDATA[]]></artwork>
18
17
  </figure>
19
18
  OUTPUT
20
19
  end
@@ -35,8 +34,7 @@ describe Asciidoctor::RFC::V2::Converter do
35
34
  ====
36
35
  INPUT
37
36
  <figure anchor="id">
38
- <artwork name="filename.rb" type="ruby" src="http://example.com/ruby.rb" alt="Alt Text">
39
- </artwork>
37
+ <artwork name="filename.rb" type="ruby" src="http://example.com/ruby.rb" alt="Alt Text"><![CDATA[]]></artwork>
40
38
  </figure>
41
39
  OUTPUT
42
40
  end
@@ -54,12 +52,12 @@ describe Asciidoctor::RFC::V2::Converter do
54
52
  ----
55
53
  INPUT
56
54
  <figure anchor="literal-id">
57
- <artwork name="filename.rb" type="ruby">
55
+ <artwork name="filename.rb" type="ruby"><![CDATA[
58
56
  def listing(node)
59
57
  result = []
60
- result &lt;&lt; "&lt;figure&gt;" if node.parent.context != :example
58
+ result << "<figure>" if node.parent.context != :example
61
59
  end
62
- </artwork>
60
+ ]]></artwork>
63
61
  </figure>
64
62
  OUTPUT
65
63
  end
@@ -71,10 +69,10 @@ describe Asciidoctor::RFC::V2::Converter do
71
69
  Notice that the monospace markup is preserved in the output.
72
70
  INPUT
73
71
  <figure>
74
- <artwork>
72
+ <artwork><![CDATA[
75
73
  This is an example of a paragraph styled with `listing`.
76
74
  Notice that the monospace markup is preserved in the output.
77
- </artwork>
75
+ ]]></artwork>
78
76
  </figure>
79
77
  OUTPUT
80
78
  end
@@ -10,9 +10,9 @@ describe Asciidoctor::RFC::V2::Converter do
10
10
  ....
11
11
  INPUT
12
12
  <figure anchor="literal-id">
13
- <artwork align="left" name="filename" type="abnf" alt="alt_text">
13
+ <artwork align="left" name="filename" type="abnf" alt="alt_text"><![CDATA[
14
14
  Literal contents.
15
- </artwork>
15
+ ]]></artwork>
16
16
  </figure>
17
17
  OUTPUT
18
18
  end
@@ -28,9 +28,9 @@ describe Asciidoctor::RFC::V2::Converter do
28
28
  <1> This is a callout
29
29
  INPUT
30
30
  <figure anchor="literal-id">
31
- <artwork align="left" name="filename" alt="alt_text">
31
+ <artwork align="left" name="filename" alt="alt_text"><![CDATA[
32
32
  Literal contents.
33
- </artwork>
33
+ ]]></artwork>
34
34
  </figure>
35
35
  OUTPUT
36
36
  end
@@ -44,9 +44,9 @@ describe Asciidoctor::RFC::V2::Converter do
44
44
  ++++
45
45
  INPUT
46
46
  <figure>
47
- <artwork align="center">
47
+ <artwork align="center"><![CDATA[
48
48
  sqrt(4) = 2
49
- </artwork>
49
+ ]]></artwork>
50
50
  </figure>
51
51
  OUTPUT
52
52
  end
@@ -64,9 +64,9 @@ describe Asciidoctor::RFC::V2::Converter do
64
64
  ====
65
65
  INPUT
66
66
  <figure anchor="id">
67
- <artwork align="center">
67
+ <artwork align="center"><![CDATA[
68
68
  sqrt(4) = 2
69
- </artwork>
69
+ ]]></artwork>
70
70
  </figure>
71
71
  OUTPUT
72
72
  end
@@ -23,9 +23,9 @@ describe Asciidoctor::RFC::V2::Converter do
23
23
  </list>
24
24
  </t>
25
25
  <figure>
26
- <artwork>
26
+ <artwork><![CDATA[
27
27
  And this is ascii-art
28
- </artwork>
28
+ ]]></artwork>
29
29
  </figure>
30
30
  OUTPUT
31
31
  end
@@ -104,14 +104,16 @@ describe Asciidoctor::RFC::V2::Converter do
104
104
  <entry>
105
105
  ....
106
106
  INPUT
107
- <t>
107
+ <t>
108
108
  <list style="symbols">
109
109
  <t>First</t>
110
110
  <t>Second<figure>
111
- <artwork>&lt;entry&gt;</artwork>
111
+ <artwork><![CDATA[
112
+ <entry>
113
+ ]]></artwork>
112
114
  </figure></t>
113
115
  </list>
114
- </t>
116
+ </t>
115
117
  OUTPUT
116
118
  end
117
119
 
@@ -25,9 +25,9 @@ describe Asciidoctor::RFC::V3::Converter do
25
25
  INPUT
26
26
  <figure anchor="id">
27
27
  <name>Figure 1</name>
28
- <artwork anchor="id2" name="figure1.txt" type="ascii-art">
28
+ <artwork anchor="id2" name="figure1.txt" type="ascii-art"><![CDATA[
29
29
  Figures are only permitted to contain listings (sourcecode), images (artwork), or literal (artwork)
30
- </artwork>
30
+ ]]></artwork>
31
31
  </figure>
32
32
  OUTPUT
33
33
  end
@@ -13,8 +13,7 @@ describe Asciidoctor::RFC::V3::Converter do
13
13
  ----
14
14
  INPUT
15
15
  <figure>
16
- <sourcecode anchor="literal-id" name="filename.rb" type="ruby" src="http://example.com/ruby.rb">
17
- </sourcecode>
16
+ <sourcecode anchor="literal-id" name="filename.rb" type="ruby" src="http://example.com/ruby.rb"><![CDATA[]]></sourcecode>
18
17
  </figure>
19
18
  OUTPUT
20
19
  end
@@ -35,12 +34,12 @@ describe Asciidoctor::RFC::V3::Converter do
35
34
  ====
36
35
  INPUT
37
36
  <figure anchor="id">
38
- <sourcecode anchor="literal-id" name="filename.rb" type="ruby">
37
+ <sourcecode anchor="literal-id" name="filename.rb" type="ruby"><![CDATA[
39
38
  def listing(node)
40
39
  result = []
41
- result &lt;&lt; "&lt;figure&gt;" if node.parent.context != :example
40
+ result << "<figure>" if node.parent.context != :example
42
41
  end
43
- </sourcecode>
42
+ ]]></sourcecode>
44
43
  </figure>
45
44
  OUTPUT
46
45
  end
@@ -58,12 +57,12 @@ describe Asciidoctor::RFC::V3::Converter do
58
57
  ----
59
58
  INPUT
60
59
  <figure>
61
- <sourcecode anchor="literal-id" name="filename.rb" type="ruby">
60
+ <sourcecode anchor="literal-id" name="filename.rb" type="ruby"><![CDATA[
62
61
  def listing(node)
63
62
  result = []
64
- result &lt;&lt; "&lt;figure&gt;" if node.parent.context != :example
63
+ result << "<figure>" if node.parent.context != :example
65
64
  end
66
- </sourcecode>
65
+ ]]></sourcecode>
67
66
  </figure>
68
67
  OUTPUT
69
68
  end
@@ -75,10 +74,10 @@ describe Asciidoctor::RFC::V3::Converter do
75
74
  Notice that the monospace markup is preserved in the output.
76
75
  INPUT
77
76
  <figure>
78
- <sourcecode>
77
+ <sourcecode><![CDATA[
79
78
  This is an example of a paragraph styled with `listing`.
80
79
  Notice that the monospace markup is preserved in the output.
81
- </sourcecode>
80
+ ]]></sourcecode>
82
81
  </figure>
83
82
  OUTPUT
84
83
  end
@@ -10,9 +10,9 @@ describe Asciidoctor::RFC::V3::Converter do
10
10
  ....
11
11
  INPUT
12
12
  <figure>
13
- <artwork anchor="literal-id" align="left" name="filename" type="ascii-art" alt="alt_text">
13
+ <artwork anchor="literal-id" align="left" name="filename" type="ascii-art" alt="alt_text"><![CDATA[
14
14
  Literal contents.
15
- </artwork>
15
+ ]]></artwork>
16
16
  </figure>
17
17
  OUTPUT
18
18
  end
@@ -27,9 +27,9 @@ describe Asciidoctor::RFC::V3::Converter do
27
27
  <1> This is a callout
28
28
  INPUT
29
29
  <figure>
30
- <artwork anchor="literal-id" align="left" name="filename" type="ascii-art" alt="alt_text">
30
+ <artwork anchor="literal-id" align="left" name="filename" type="ascii-art" alt="alt_text"><![CDATA[
31
31
  Literal contents.
32
- </artwork>
32
+ ]]></artwork>
33
33
  </figure>
34
34
  OUTPUT
35
35
  end
@@ -42,9 +42,9 @@ describe Asciidoctor::RFC::V3::Converter do
42
42
  ++++
43
43
  INPUT
44
44
  <figure>
45
- <artwork type="ascii-art" align="center">
45
+ <artwork type="ascii-art" align="center"><![CDATA[
46
46
  sqrt(4) = 2
47
- </artwork>
47
+ ]]></artwork>
48
48
  </figure>
49
49
  OUTPUT
50
50
  end
@@ -61,9 +61,9 @@ describe Asciidoctor::RFC::V3::Converter do
61
61
  ====
62
62
  INPUT
63
63
  <figure anchor="id">
64
- <artwork type="ascii-art" align="center">
64
+ <artwork type="ascii-art" align="center"><![CDATA[
65
65
  sqrt(4) = 2
66
- </artwork>
66
+ ]]></artwork>
67
67
  </figure>
68
68
  OUTPUT
69
69
  end
@@ -68,9 +68,9 @@ describe Asciidoctor::RFC::V3::Converter do
68
68
  <li>Fenced code blocks</li>
69
69
  </ul>
70
70
  <figure>
71
- <artwork type="ascii-art">
71
+ <artwork type="ascii-art"><![CDATA[
72
72
  Wha?
73
- </artwork>
73
+ ]]></artwork>
74
74
  </figure>
75
75
  <t>Yep. AsciiDoc and Markdown share a lot of common syntax already.</t>
76
76
  </blockquote>
@@ -15,16 +15,16 @@ describe Asciidoctor::RFC::V3::Converter do
15
15
  ....
16
16
  ****
17
17
  INPUT
18
- <aside anchor="id">
19
- <t>Sidebar</t>
18
+ <aside anchor="id"><t>Sidebar</t>
20
19
  <t>Another sidebar</t>
21
20
  <ul>
22
21
  <li>This is a list</li>
23
22
  </ul>
24
23
  <figure>
25
- <artwork type="ascii-art">And this is ascii-art</artwork>
26
- </figure>
27
- </aside>
24
+ <artwork type="ascii-art"><![CDATA[
25
+ And this is ascii-art
26
+ ]]></artwork>
27
+ </figure></aside>
28
28
  OUTPUT
29
29
  end
30
30
  end
@@ -201,7 +201,6 @@ versions of xml2rfc.
201
201
 
202
202
  ----
203
203
 
204
-
205
204
  /**** an example C program */
206
205
 
207
206
  #include <stdio.h>
@@ -221,7 +220,6 @@ main(int argc, char *argv[])
221
220
 
222
221
  /* end of file */
223
222
 
224
-
225
223
  ----
226
224
  ====
227
225
 
@@ -1839,7 +1839,6 @@ attribute with value "title".
1839
1839
  ....
1840
1840
  <h1 id="title">HyperText Markup Language Request For
1841
1841
  Comments Format</h1>
1842
-
1843
1842
  ....
1844
1843
 
1845
1844
  Inside a reference, the title is rendered as an HTML &lt;span&gt;
@@ -1914,7 +1913,6 @@ or
1914
1913
 
1915
1914
  ....
1916
1915
  [<a class="xref" href="#RFC1234">RFC1234</a>]
1917
-
1918
1916
  ....
1919
1917
 
1920
1918
  [#element-svg]
@@ -151,7 +151,6 @@ different location.
151
151
  ====
152
152
  ....
153
153
 
154
-
155
154
  STuPiD ```````````````````````````````,
156
155
  Script <----------------------------. ,
157
156
  | ,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-rfc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-26 00:00:00.000000000 Z
11
+ date: 2018-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -475,7 +475,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
475
475
  version: '0'
476
476
  requirements: []
477
477
  rubyforge_project:
478
- rubygems_version: 2.6.12
478
+ rubygems_version: 2.6.14
479
479
  signing_key:
480
480
  specification_version: 4
481
481
  summary: asciidoctor-rfc lets you write Internet-Drafts and RFCs in AsciiDoc.