asciidoctor-iso 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +7 -10
  3. data/README.adoc +118 -6
  4. data/asciidoctor-iso.gemspec +1 -4
  5. data/lib/asciidoctor-iso.rb +2 -0
  6. data/lib/asciidoctor/iso/base.rb +20 -95
  7. data/lib/asciidoctor/iso/blocks.rb +47 -39
  8. data/lib/asciidoctor/iso/cleanup.rb +25 -97
  9. data/lib/asciidoctor/iso/cleanup_block.rb +10 -1
  10. data/lib/asciidoctor/iso/cleanup_ref.rb +100 -0
  11. data/lib/asciidoctor/iso/converter.rb +5 -2
  12. data/lib/asciidoctor/iso/front.rb +52 -24
  13. data/lib/asciidoctor/iso/html/header.html +10 -10
  14. data/lib/asciidoctor/iso/html/html_iso_intro.html +1 -1
  15. data/lib/asciidoctor/iso/html/html_iso_titlepage.html +5 -5
  16. data/lib/asciidoctor/iso/html/htmlstyle.css +0 -21
  17. data/lib/asciidoctor/iso/html/isodoc.css +13 -28
  18. data/lib/asciidoctor/iso/html/word_iso_intro.html +2 -2
  19. data/lib/asciidoctor/iso/html/word_iso_titlepage.html +7 -7
  20. data/lib/asciidoctor/iso/html/wordstyle.css +998 -0
  21. data/lib/asciidoctor/iso/inline.rb +128 -0
  22. data/lib/asciidoctor/iso/isodoc.rng +1516 -0
  23. data/lib/asciidoctor/iso/isostandard.rnc +38 -39
  24. data/lib/asciidoctor/iso/isostandard.rng +529 -1276
  25. data/lib/asciidoctor/iso/isostandard_diff.rnc +40 -56
  26. data/lib/asciidoctor/iso/lists.rb +30 -28
  27. data/lib/asciidoctor/iso/macros.rb +37 -0
  28. data/lib/asciidoctor/iso/section.rb +1 -1
  29. data/lib/asciidoctor/iso/utils.rb +9 -0
  30. data/lib/asciidoctor/iso/validate.rb +41 -120
  31. data/lib/asciidoctor/iso/validate_section.rb +117 -0
  32. data/lib/asciidoctor/iso/validate_style.rb +5 -7
  33. data/lib/asciidoctor/iso/version.rb +1 -1
  34. data/spec/examples/rice.adoc +41 -8
  35. data/spec/examples/rice.doc +2885 -2859
  36. data/spec/examples/rice.html +316 -649
  37. data/spec/examples/rice.preview.html +51 -10
  38. data/spec/examples/rice.xml +418 -343
  39. metadata +12 -50
  40. data/lib/asciidoctor/iso/inline_anchor.rb +0 -59
  41. data/lib/asciidoctor/iso/validate.make.sh +0 -8
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-iso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
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-02-06 00:00:00.000000000 Z
11
+ date: 2018-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.5.6
27
- - !ruby/object:Gem::Dependency
28
- name: asciimath
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: htmlentities
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,34 +38,6 @@ dependencies:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
40
  version: 4.3.4
55
- - !ruby/object:Gem::Dependency
56
- name: image_size
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: mime-types
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
41
  - !ruby/object:Gem::Dependency
84
42
  name: nokogiri
85
43
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +67,7 @@ dependencies:
109
67
  - !ruby/object:Gem::Version
110
68
  version: '0'
111
69
  - !ruby/object:Gem::Dependency
112
- name: ruby-xslt
70
+ name: thread_safe
113
71
  requirement: !ruby/object:Gem::Requirement
114
72
  requirements:
115
73
  - - ">="
@@ -123,7 +81,7 @@ dependencies:
123
81
  - !ruby/object:Gem::Version
124
82
  version: '0'
125
83
  - !ruby/object:Gem::Dependency
126
- name: thread_safe
84
+ name: uuidtools
127
85
  requirement: !ruby/object:Gem::Requirement
128
86
  requirements:
129
87
  - - ">="
@@ -137,7 +95,7 @@ dependencies:
137
95
  - !ruby/object:Gem::Version
138
96
  version: '0'
139
97
  - !ruby/object:Gem::Dependency
140
- name: uuidtools
98
+ name: html2doc
141
99
  requirement: !ruby/object:Gem::Requirement
142
100
  requirements:
143
101
  - - ">="
@@ -151,7 +109,7 @@ dependencies:
151
109
  - !ruby/object:Gem::Version
152
110
  version: '0'
153
111
  - !ruby/object:Gem::Dependency
154
- name: html2doc
112
+ name: isodoc
155
113
  requirement: !ruby/object:Gem::Requirement
156
114
  requirements:
157
115
  - - ">="
@@ -332,6 +290,7 @@ files:
332
290
  - lib/asciidoctor/iso/blocks.rb
333
291
  - lib/asciidoctor/iso/cleanup.rb
334
292
  - lib/asciidoctor/iso/cleanup_block.rb
293
+ - lib/asciidoctor/iso/cleanup_ref.rb
335
294
  - lib/asciidoctor/iso/converter.rb
336
295
  - lib/asciidoctor/iso/front.rb
337
296
  - lib/asciidoctor/iso/html/header.html
@@ -341,16 +300,19 @@ files:
341
300
  - lib/asciidoctor/iso/html/isodoc.css
342
301
  - lib/asciidoctor/iso/html/word_iso_intro.html
343
302
  - lib/asciidoctor/iso/html/word_iso_titlepage.html
344
- - lib/asciidoctor/iso/inline_anchor.rb
303
+ - lib/asciidoctor/iso/html/wordstyle.css
304
+ - lib/asciidoctor/iso/inline.rb
305
+ - lib/asciidoctor/iso/isodoc.rng
345
306
  - lib/asciidoctor/iso/isostandard.rnc
346
307
  - lib/asciidoctor/iso/isostandard.rng
347
308
  - lib/asciidoctor/iso/isostandard_diff.rnc
348
309
  - lib/asciidoctor/iso/lists.rb
310
+ - lib/asciidoctor/iso/macros.rb
349
311
  - lib/asciidoctor/iso/section.rb
350
312
  - lib/asciidoctor/iso/table.rb
351
313
  - lib/asciidoctor/iso/utils.rb
352
- - lib/asciidoctor/iso/validate.make.sh
353
314
  - lib/asciidoctor/iso/validate.rb
315
+ - lib/asciidoctor/iso/validate_section.rb
354
316
  - lib/asciidoctor/iso/validate_style.rb
355
317
  - lib/asciidoctor/iso/version.rb
356
318
  - spec/examples/rice.adoc
@@ -1,59 +0,0 @@
1
- module Asciidoctor
2
- module ISO
3
- module InlineAnchor
4
-
5
- def is_refid?(x)
6
- @refids.include? x
7
- end
8
-
9
- def inline_anchor(node)
10
- case node.type
11
- when :xref
12
- inline_anchor_xref node
13
- when :link
14
- inline_anchor_link node
15
- when :bibref
16
- inline_anchor_bibref node
17
- else
18
- warning(node, "unknown anchor type", node.type.inspect)
19
- end
20
- end
21
-
22
- def inline_anchor_xref(node)
23
- f = "inline"
24
- c = node.text
25
- matched = /^fn(: (?<text>.*))?$/.match node.text
26
- unless matched.nil?
27
- f = "footnote"
28
- c = matched[:text]
29
- end
30
- t = node.target.gsub(/^#/, "").gsub(%r{(.)(\.xml)?#.*$}, "\\1")
31
- noko { |xml| xml.xref c, **attr_code(target: t, type: f) }.join
32
- end
33
-
34
- def inline_anchor_link(node)
35
- contents = node.text
36
- contents = nil if node.target.gsub(%r{^mailto:}, "") == node.text
37
- attributes = { "target": node.target }
38
- noko do |xml|
39
- xml.link contents, **attr_code(attributes)
40
- end.join
41
- end
42
-
43
- def inline_anchor_bibref(node)
44
- eref_contents = node.target == node.text ? nil : node.text
45
- eref_attributes = { id: node.target }
46
- @refids << node.target
47
- noko do |xml|
48
- xml.ref eref_contents, **attr_code(eref_attributes)
49
- end.join
50
- end
51
-
52
- def inline_callout(node)
53
- noko do |xml|
54
- xml.callout node.text
55
- end.join
56
- end
57
- end
58
- end
59
- end
@@ -1,8 +0,0 @@
1
- if [[ ! -d jing-trang ]]; then
2
- git clone https://github.com/relaxng/jing-trang.git
3
- fi
4
- cd jing-trang
5
- ./ant
6
- cd ..
7
- java -jar jing-trang/build/trang.jar -I rnc -O rng validate.rnc validate.rng
8
-