isodoc 1.6.2 → 1.6.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +2 -12
  3. data/.hound.yml +3 -1
  4. data/.rubocop.yml +4 -6
  5. data/Rakefile +2 -2
  6. data/isodoc.gemspec +3 -2
  7. data/lib/isodoc-yaml/i18n-en.yaml +1 -0
  8. data/lib/isodoc-yaml/i18n-fr.yaml +1 -0
  9. data/lib/isodoc-yaml/i18n-zh-Hans.yaml +1 -0
  10. data/lib/isodoc.rb +0 -2
  11. data/lib/isodoc/convert.rb +7 -1
  12. data/lib/isodoc/function/blocks.rb +5 -4
  13. data/lib/isodoc/function/cleanup.rb +52 -43
  14. data/lib/isodoc/function/inline.rb +7 -7
  15. data/lib/isodoc/function/references.rb +32 -51
  16. data/lib/isodoc/function/section.rb +28 -16
  17. data/lib/isodoc/function/table.rb +21 -22
  18. data/lib/isodoc/function/terms.rb +6 -7
  19. data/lib/isodoc/function/to_word_html.rb +6 -3
  20. data/lib/isodoc/function/utils.rb +181 -163
  21. data/lib/isodoc/gem_tasks.rb +8 -9
  22. data/lib/isodoc/headlesshtml_convert.rb +8 -7
  23. data/lib/isodoc/html_convert.rb +5 -1
  24. data/lib/isodoc/html_function/comments.rb +14 -12
  25. data/lib/isodoc/html_function/footnotes.rb +14 -7
  26. data/lib/isodoc/html_function/html.rb +30 -26
  27. data/lib/isodoc/html_function/postprocess.rb +191 -182
  28. data/lib/isodoc/html_function/sectionsplit.rb +230 -0
  29. data/lib/isodoc/metadata.rb +22 -20
  30. data/lib/isodoc/metadata_contributor.rb +31 -28
  31. data/lib/isodoc/pdf_convert.rb +11 -13
  32. data/lib/isodoc/presentation_function/bibdata.rb +61 -30
  33. data/lib/isodoc/presentation_function/inline.rb +34 -27
  34. data/lib/isodoc/presentation_function/section.rb +54 -19
  35. data/lib/isodoc/presentation_xml_convert.rb +2 -0
  36. data/lib/isodoc/sassc_importer.rb +1 -1
  37. data/lib/isodoc/version.rb +1 -1
  38. data/lib/isodoc/word_function/postprocess.rb +50 -36
  39. data/lib/isodoc/xref.rb +2 -0
  40. data/lib/isodoc/xref/xref_counter.rb +1 -2
  41. data/lib/isodoc/xref/xref_gen.rb +21 -14
  42. data/lib/isodoc/xref/xref_gen_seq.rb +60 -35
  43. data/lib/isodoc/xref/xref_sect_gen.rb +15 -15
  44. data/spec/assets/scripts_override.html +3 -0
  45. data/spec/isodoc/blocks_spec.rb +624 -997
  46. data/spec/isodoc/cleanup_spec.rb +40 -42
  47. data/spec/isodoc/i18n_spec.rb +694 -821
  48. data/spec/isodoc/inline_spec.rb +482 -328
  49. data/spec/isodoc/metadata_spec.rb +384 -379
  50. data/spec/isodoc/postproc_spec.rb +163 -55
  51. data/spec/isodoc/presentation_xml_spec.rb +355 -278
  52. data/spec/isodoc/ref_spec.rb +5 -5
  53. data/spec/isodoc/section_spec.rb +216 -199
  54. data/spec/isodoc/sectionsplit_spec.rb +190 -0
  55. data/spec/isodoc/table_spec.rb +41 -42
  56. data/spec/isodoc/terms_spec.rb +84 -84
  57. data/spec/isodoc/xref_spec.rb +974 -932
  58. metadata +22 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4d6934377164c2124ffca74e9ac663f4761d9a2cd98724d3214282d92afd086
4
- data.tar.gz: b4ee6a1da7b45282dc01c025495b0071a3dcd382a5d76d31d4caeb299c3bf1f9
3
+ metadata.gz: ffc474474290bb4fbd16f4e488e94366bd18e22d19c8041fbc5a01858fefb346
4
+ data.tar.gz: 753d8c7b604eb1afe6eaea153e58d1eec4a249676eec23b480181566a9f37557
5
5
  SHA512:
6
- metadata.gz: f49d1f973ae0ee52d01c5d608057c04c44afe180427215a880158d13d322fb87fb0d8ee4d486dcdb35cf652645044194ac5bf322987fcbdc73aca3aae4966766
7
- data.tar.gz: 190b64f33fff0f3455ed7efbbb22f3f917b1249253f745ee61c9314a3638ad904cf005c8916c7734da7c962765e458d25ded2712bdf155d2f0a221d60ee7e789
6
+ metadata.gz: 68977dc8fe66bc0d62cce9676dc55479a0789bcf68e6d5e0f12f2e7d586c777b1d37be754385fb71856ba80fa9aca60d2d3dbadeeee6f9ecbb7b47660c2fb57f
7
+ data.tar.gz: 54a4312fb6b6b353146e28a7844e7e0daaf77a19d5754c34e520d0514f8c73610be103986b61140b3605fa3d7bd6851f2c27eefe6c3101723e624fd87fead776
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@master
34
24
 
@@ -49,5 +39,5 @@ jobs:
49
39
  with:
50
40
  token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
51
41
  repository: ${{ github.repository }}
52
- event-type: notify
42
+ event-type: tests-passed
53
43
  client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,12 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rspec/core/rake_task"
3
- require 'isodoc/gem_tasks'
3
+ require "isodoc/gem_tasks"
4
4
 
5
5
  IsoDoc::GemTasks.install
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
- task default: :spec
8
+ task default: :spec
data/isodoc.gemspec CHANGED
@@ -26,14 +26,14 @@ Gem::Specification.new do |spec|
26
26
  spec.require_paths = ["lib"]
27
27
  spec.files = `git ls-files`.split("\n")
28
28
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
29
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
29
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
30
30
 
31
31
  spec.add_dependency "asciimath"
32
32
  spec.add_dependency "html2doc", "~> 1.1.1"
33
33
  spec.add_dependency "htmlentities", "~> 4.3.4"
34
34
  spec.add_dependency "liquid", "~> 4"
35
35
  spec.add_dependency "metanorma", ">= 1.2.0"
36
- spec.add_dependency "nokogiri", "~> 1.10.4"
36
+ spec.add_dependency "nokogiri", "~> 1.11.0"
37
37
  spec.add_dependency "relaton-cli"
38
38
  spec.add_dependency "roman-numerals"
39
39
  spec.add_dependency "thread_safe"
@@ -50,5 +50,6 @@ Gem::Specification.new do |spec|
50
50
  spec.add_development_dependency "rubocop", "~> 1.5.2"
51
51
  spec.add_development_dependency "sassc", "~> 2.4.0"
52
52
  spec.add_development_dependency "simplecov", "~> 0.15"
53
+ spec.add_development_dependency "metanorma-iso"
53
54
  spec.add_development_dependency "timecop", "~> 0.9"
54
55
  end
@@ -14,6 +14,7 @@ termsdefsymbols: Terms, definitions and symbols
14
14
  termsdefabbrev: Terms, definitions and abbreviated terms
15
15
  normref: Normative references
16
16
  bibliography: Bibliography
17
+ preface: Preface
17
18
  clause: Clause
18
19
  annex: Annex
19
20
  appendix: Appendix
@@ -14,6 +14,7 @@ termsdefsymbols: Terms, définitions et symboles
14
14
  termsdefabbrev: Terms, définitions et termes abrégés
15
15
  normref: Références normatives
16
16
  bibliography: Bibliographie
17
+ preface: Préface
17
18
  clause: Article
18
19
  annex: Annexe
19
20
  appendix: Appendice
@@ -14,6 +14,7 @@ termsdefsymbols: 术语、定义、符号和代号
14
14
  termsdefabbrev: 术语、定义、符号和缩略语
15
15
  normref: 规范性引用文件
16
16
  bibliography: 参考文献
17
+ preface: 序言
17
18
  clause: 条
18
19
  annex: 附件
19
20
  appendix: 附录
data/lib/isodoc.rb CHANGED
@@ -8,7 +8,6 @@ require "mime/types"
8
8
  require "image_size"
9
9
  require "set"
10
10
  require "pp"
11
- require "uuidtools"
12
11
  require "html2doc"
13
12
  require "liquid"
14
13
  require "htmlentities"
@@ -26,5 +25,4 @@ require "isodoc/xref"
26
25
  require "isodoc/i18n"
27
26
 
28
27
  module IsoDoc
29
-
30
28
  end
@@ -32,10 +32,13 @@ module IsoDoc
32
32
  # monospace: font to use for monospace text
33
33
  # suppressheadingnumbers: suppress heading numbers for clauses
34
34
  # scripts: Scripts file for HTML
35
+ # scripts_override: Override scripts file for HTML
35
36
  # scripts_pdf: Scripts file for PDF (not used in XSLT PDF)
36
37
  # datauriimage: Encode images in HTML output as data URIs
37
38
  # break_up_urls_in_tables: whether to insert spaces in URLs in tables
38
39
  # every 40-odd chars
40
+ # sectionsplit: split up HTML output on sections
41
+ # bare: do not insert any prefatory material (coverpage, boilerplate)
39
42
  def initialize(options)
40
43
  @libdir ||= File.dirname(__FILE__) # rubocop:disable Lint/DisjunctiveAssignmentInConstructor
41
44
  options.merge!(default_fonts(options)) do |_, old, new|
@@ -64,12 +67,15 @@ module IsoDoc
64
67
  @scripts = options[:scripts] ||
65
68
  File.join(File.dirname(__FILE__), "base_style", "scripts.html")
66
69
  @scripts_pdf = options[:scripts_pdf]
70
+ @scripts_override = options[:scripts_override]
67
71
  @i18nyaml = options[:i18nyaml]
68
72
  @ulstyle = options[:ulstyle]
69
73
  @olstyle = options[:olstyle]
70
74
  @datauriimage = options[:datauriimage]
71
75
  @suppressheadingnumbers = options[:suppressheadingnumbers]
72
76
  @break_up_urls_in_tables = options[:break_up_urls_in_tables] == "true"
77
+ @sectionsplit = options[:sectionsplit] == "true"
78
+ @bare = options[:bare]
73
79
  @termdomain = ""
74
80
  @termexample = false
75
81
  @note = false
@@ -150,7 +156,7 @@ module IsoDoc
150
156
  [docxml, filename, dir]
151
157
  end
152
158
 
153
- def convert(input_filename, file = nil, debug = false,
159
+ def convert(input_filename, file = nil, debug = false,
154
160
  output_filename = nil)
155
161
  file = File.read(input_filename, encoding: "utf-8") if file.nil?
156
162
  @openmathdelim, @closemathdelim = extract_delims(file)
@@ -14,10 +14,11 @@ module IsoDoc::Function
14
14
  end
15
15
  end
16
16
 
17
- def figure_name_parse(node, div, name)
18
- return if name.nil?
17
+ def figure_name_parse(_node, div, name)
18
+ return if name.nil?
19
+
19
20
  div.p **{ class: "FigureTitle", style: "text-align:center;" } do |p|
20
- name.children.each { |n| parse(n, div) }
21
+ name.children.each { |n| parse(n, p) }
21
22
  end
22
23
  end
23
24
 
@@ -61,7 +62,7 @@ module IsoDoc::Function
61
62
  end
62
63
 
63
64
  def sourcecode_name_parse(node, div, name)
64
- return if name.nil?
65
+ return if name.nil?
65
66
 
66
67
  div.p **{ class: "SourceTitle", style: "text-align:center;" } do |p|
67
68
  name.children.each { |n| parse(n, p) }
@@ -1,16 +1,17 @@
1
1
  module IsoDoc::Function
2
2
  module Cleanup
3
3
  def textcleanup(docxml)
4
- docxml = termref_cleanup(passthrough_cleanup(docxml))
4
+ termref_cleanup(passthrough_cleanup(docxml))
5
5
  end
6
6
 
7
7
  def termref_cleanup(docxml)
8
- docxml.
9
- gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/, l10n(", #{@i18n.modified} [/TERMREF]")).
10
- gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ").
11
- gsub(/\[TERMREF\]\s*/, l10n("[#{@i18n.source}: ")).
12
- gsub(%r{\s*\[\/TERMREF\]\s*}, l10n("]")).
13
- gsub(/\s*\[MODIFICATION\]/, l10n(", #{@i18n.modified} &mdash; "))
8
+ docxml
9
+ .gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/,
10
+ l10n(", #{@i18n.modified} [/TERMREF]"))
11
+ .gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ")
12
+ .gsub(/\[TERMREF\]\s*/, l10n("[#{@i18n.source}: "))
13
+ .gsub(%r{\s*\[/TERMREF\]\s*}, l10n("]"))
14
+ .gsub(/\s*\[MODIFICATION\]/, l10n(", #{@i18n.modified} &mdash; "))
14
15
  end
15
16
 
16
17
  def passthrough_cleanup(docxml)
@@ -21,7 +22,7 @@ module IsoDoc::Function
21
22
  end
22
23
 
23
24
  def cleanup(docxml)
24
- @i18n ||= i18n_init(@lang, @script)
25
+ @i18n ||= i18n_init(@lang, @script)
25
26
  comment_cleanup(docxml)
26
27
  footnote_cleanup(docxml)
27
28
  inline_header_cleanup(docxml)
@@ -34,30 +35,36 @@ module IsoDoc::Function
34
35
 
35
36
  def table_long_strings_cleanup(docxml)
36
37
  return unless @break_up_urls_in_tables == true
38
+
37
39
  docxml.xpath("//td | //th").each do |d|
38
40
  d.traverse do |n|
39
41
  next unless n.text?
42
+
40
43
  n.replace(HTMLEntities.new.encode(
41
- break_up_long_strings(n.text)))
44
+ break_up_long_strings(n.text),
45
+ ))
42
46
  end
43
47
  end
44
48
  end
45
49
 
46
- def break_up_long_strings(t)
47
- return t if t.match(/^\s*$/)
48
- t.split(/(?=\s)/).map do |w|
49
- (/^\s*$/.match(t) or w.size < 30) ? w :
50
+ def break_up_long_strings(text)
51
+ return text if /^\s*$/.match?(text)
52
+
53
+ text.split(/(?=\s)/).map do |w|
54
+ if /^\s*$/.match(text) || (w.size < 30) then w
55
+ else
50
56
  w.scan(/.{,30}/).map do |w1|
51
- (w1.size < 30) ? w1 : break_up_long_strings1(w1)
52
- end.join
57
+ w1.size < 30 ? w1 : break_up_long_strings1(w1)
58
+ end.join
59
+ end
53
60
  end.join
54
61
  end
55
62
 
56
- def break_up_long_strings1(w1)
57
- s = w1.split(%r{(?<=[,.?+;/=])})
58
- if s.size == 1 then w1 + " "
63
+ def break_up_long_strings1(text)
64
+ s = text.split(%r{(?<=[,.?+;/=])})
65
+ if s.size == 1 then "#{text} "
59
66
  else
60
- s[-1] = " " + s[-1]
67
+ s[-1] = " #{s[-1]}"
61
68
  s.join
62
69
  end
63
70
  end
@@ -78,11 +85,11 @@ module IsoDoc::Function
78
85
  docxml
79
86
  end
80
87
 
81
- def figure_get_or_make_dl(t)
82
- dl = t.at(".//dl")
88
+ def figure_get_or_make_dl(elem)
89
+ dl = elem.at(".//dl")
83
90
  if dl.nil?
84
- t.add_child("<p><b>#{@i18n.key}</b></p><dl></dl>")
85
- dl = t.at(".//dl")
91
+ elem.add_child("<p><b>#{@i18n.key}</b></p><dl></dl>")
92
+ dl = elem.at(".//dl")
86
93
  end
87
94
  dl
88
95
  end
@@ -91,10 +98,10 @@ module IsoDoc::Function
91
98
  "//div[@class = 'figure'][descendant::aside]"\
92
99
  "[not(descendant::div[@class = 'figure'])]".freeze
93
100
 
94
- def figure_aside_process(f, aside, key)
101
+ def figure_aside_process(elem, aside, key)
95
102
  # get rid of footnote link, it is in diagram
96
- f&.at("./a[@class='TableFootnoteRef']")&.remove
97
- fnref = f.at(".//span[@class='TableFootnoteRef']/..")
103
+ elem&.at("./a[@class='TableFootnoteRef']")&.remove
104
+ fnref = elem.at(".//span[@class='TableFootnoteRef']/..")
98
105
  dt = key.add_child("<dt></dt>").first
99
106
  dd = key.add_child("<dd></dd>").first
100
107
  fnref.parent = dt
@@ -109,6 +116,7 @@ module IsoDoc::Function
109
116
  def figure_cleanup(docxml)
110
117
  docxml.xpath(FIGURE_WITH_FOOTNOTES).each do |f|
111
118
  next unless f.at(".//aside[not(ancestor::p[@class = 'FigureTitle'])]")
119
+
112
120
  key = figure_get_or_make_dl(f)
113
121
  f.xpath(".//aside").each do |aside|
114
122
  figure_aside_process(f, aside, key)
@@ -137,12 +145,13 @@ module IsoDoc::Function
137
145
  docxml
138
146
  end
139
147
 
140
- def merge_fnref_into_fn_text(a)
141
- fn = a.at('.//span[@class="TableFootnoteRef"]/..')
148
+ def merge_fnref_into_fn_text(elem)
149
+ fn = elem.at('.//span[@class="TableFootnoteRef"]/..')
142
150
  n = fn.next_element
143
151
  n&.children&.first&.add_previous_sibling(fn.remove)
144
152
  end
145
153
 
154
+ # preempt html2doc putting MsoNormal under TableFootnote class
146
155
  def table_footnote_cleanup(docxml)
147
156
  docxml.xpath("//table[descendant::aside]").each do |t|
148
157
  t.xpath(".//aside").each do |a|
@@ -152,36 +161,36 @@ module IsoDoc::Function
152
161
  t << a.remove
153
162
  end
154
163
  end
155
- # preempt html2doc putting MsoNormal there
156
164
  docxml.xpath("//p[not(self::*[@class])]"\
157
165
  "[ancestor::*[@class = 'TableFootnote']]").each do |p|
158
166
  p["class"] = "TableFootnote"
159
167
  end
160
168
  end
161
169
 
162
- def remove_bottom_border(td)
163
- td["style"] =
164
- td["style"].gsub(/border-bottom:[^;]+;/, "border-bottom:0pt;")
170
+ def remove_bottom_border(cell)
171
+ cell["style"] =
172
+ cell["style"].gsub(/border-bottom:[^;]+;/, "border-bottom:0pt;")
165
173
  end
166
174
 
167
- def table_get_or_make_tfoot(t)
168
- tfoot = t.at(".//tfoot")
175
+ def table_get_or_make_tfoot(table)
176
+ tfoot = table.at(".//tfoot")
169
177
  if tfoot.nil?
170
- t.add_child("<tfoot></tfoot>")
171
- tfoot = t.at(".//tfoot")
178
+ table.add_child("<tfoot></tfoot>")
179
+ tfoot = table.at(".//tfoot")
172
180
  else
173
181
  tfoot.xpath(".//td | .//th").each { |td| remove_bottom_border(td) }
174
182
  end
175
183
  tfoot
176
184
  end
177
185
 
178
- def new_fullcolspan_row(t, tfoot)
186
+ def new_fullcolspan_row(table, tfoot)
179
187
  # how many columns in the table?
180
188
  cols = 0
181
- t.at(".//tr").xpath("./td | ./th").each do |td|
189
+ table.at(".//tr").xpath("./td | ./th").each do |td|
182
190
  cols += (td["colspan"] ? td["colspan"].to_i : 1)
183
191
  end
184
- style = %{border-top:0pt;border-bottom:#{IsoDoc::Function::Table::SW} 1.5pt;}
192
+ style =
193
+ %{border-top:0pt;border-bottom:#{IsoDoc::Function::Table::SW} 1.5pt;}
185
194
  tfoot.add_child("<tr><td colspan='#{cols}' style='#{style}'/></tr>")
186
195
  tfoot.xpath(".//td").last
187
196
  end
@@ -206,12 +215,12 @@ module IsoDoc::Function
206
215
 
207
216
  def symbols_cleanup(docxml); end
208
217
 
209
- def table_footnote_reference_format(a)
210
- a
218
+ def table_footnote_reference_format(link)
219
+ link
211
220
  end
212
221
 
213
- def footnote_reference_format(a)
214
- a
222
+ def footnote_reference_format(link)
223
+ link
215
224
  end
216
225
  end
217
226
  end
@@ -3,11 +3,12 @@ require_relative "inline_simple"
3
3
  module IsoDoc::Function
4
4
  module Inline
5
5
  def link_parse(node, out)
6
- out.a **attr_code(href: node["target"], title: node["alt"]) do |l|
6
+ url = node["target"]
7
+ node["updatetype"] == "true" and url = suffix_url(url)
8
+ out.a **attr_code(href: url, title: node["alt"]) do |l|
7
9
  if node.text.empty?
8
10
  l << node["target"].sub(/^mailto:/, "")
9
- else
10
- node.children.each { |n| parse(n, l) }
11
+ else node.children.each { |n| parse(n, l) }
11
12
  end
12
13
  end
13
14
  end
@@ -79,8 +80,7 @@ module IsoDoc::Function
79
80
  "#{@openmathdelim}#{HTMLEntities.new.encode(node.text)}"\
80
81
  "#{@closemathdelim}"
81
82
  when "MathML" then node.first_element_child.to_s
82
- else
83
- HTMLEntities.new.encode(node.text)
83
+ else HTMLEntities.new.encode(node.text)
84
84
  end
85
85
  out.span **{ class: "stem" } do |span|
86
86
  span.parent.add_child ooml
@@ -123,13 +123,13 @@ module IsoDoc::Function
123
123
  end
124
124
 
125
125
  def add_parse(node, out)
126
- out.span **{class: "addition"} do |e|
126
+ out.span **{ class: "addition" } do |e|
127
127
  node.children.each { |n| parse(n, e) }
128
128
  end
129
129
  end
130
130
 
131
131
  def del_parse(node, out)
132
- out.span **{class: "deletion"} do |e|
132
+ out.span **{ class: "deletion" } do |e|
133
133
  node.children.each { |n| parse(n, e) }
134
134
  end
135
135
  end