isodoc 1.6.4 → 1.7.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.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.rubocop.yml +1 -1
- data/isodoc.gemspec +2 -1
- data/lib/isodoc-yaml/i18n-ar.yaml +19 -25
- data/lib/isodoc-yaml/i18n-de.yaml +1 -0
- data/lib/isodoc-yaml/i18n-en.yaml +2 -0
- data/lib/isodoc-yaml/i18n-es.yaml +1 -0
- data/lib/isodoc-yaml/i18n-fr.yaml +2 -0
- data/lib/isodoc-yaml/i18n-ru.yaml +1 -0
- data/lib/isodoc-yaml/i18n-zh-Hans.yaml +2 -0
- data/lib/isodoc/convert.rb +4 -2
- data/lib/isodoc/function/blocks.rb +6 -5
- data/lib/isodoc/function/references.rb +33 -52
- data/lib/isodoc/function/section.rb +0 -1
- data/lib/isodoc/function/table.rb +21 -22
- data/lib/isodoc/function/terms.rb +6 -7
- data/lib/isodoc/gem_tasks.rb +8 -9
- data/lib/isodoc/html_convert.rb +5 -1
- data/lib/isodoc/html_function/comments.rb +12 -12
- data/lib/isodoc/html_function/html.rb +2 -2
- data/lib/isodoc/html_function/postprocess.rb +195 -185
- data/lib/isodoc/html_function/sectionsplit.rb +244 -0
- data/lib/isodoc/metadata.rb +22 -20
- data/lib/isodoc/metadata_contributor.rb +31 -28
- data/lib/isodoc/presentation_function/bibdata.rb +7 -0
- data/lib/isodoc/presentation_function/block.rb +7 -4
- data/lib/isodoc/presentation_function/inline.rb +7 -12
- data/lib/isodoc/presentation_function/section.rb +38 -1
- data/lib/isodoc/presentation_xml_convert.rb +2 -0
- data/lib/isodoc/version.rb +1 -1
- data/lib/isodoc/xref.rb +10 -7
- data/lib/isodoc/xref/xref_anchor.rb +45 -44
- data/lib/isodoc/xref/xref_counter.rb +113 -103
- data/lib/isodoc/xref/xref_gen.rb +39 -11
- data/spec/isodoc/blocks_spec.rb +184 -447
- data/spec/isodoc/cleanup_spec.rb +40 -42
- data/spec/isodoc/i18n_spec.rb +694 -821
- data/spec/isodoc/inline_spec.rb +197 -208
- data/spec/isodoc/metadata_spec.rb +384 -379
- data/spec/isodoc/postproc_spec.rb +121 -30
- data/spec/isodoc/presentation_xml_spec.rb +4 -4
- data/spec/isodoc/ref_spec.rb +5 -5
- data/spec/isodoc/section_spec.rb +216 -199
- data/spec/isodoc/sectionsplit_spec.rb +190 -0
- data/spec/isodoc/table_spec.rb +41 -42
- data/spec/isodoc/terms_spec.rb +1 -1
- data/spec/isodoc/xref_spec.rb +684 -1020
- metadata +19 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e07a78782a0c09a2c70525f1d7d4b8f5d34ea8d731c3dbc5860b7386250c1e56
|
4
|
+
data.tar.gz: bb3ddf0e119c8cf4b4d25c70ba381dba043020c132edd13fc4934bb08871594e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba808db07e817492e8ceb891771ec1df67f8d4dfab34896eb2eca9accd45ccf110745a5844276e52f1f20c6542cf1d33fdaad816ea3ce0ff264465bd4f4c8d4c
|
7
|
+
data.tar.gz: 0124e13883ab5d0c5f0561c62b924920ae0d73bc4980024f77336a4aed919d175c0f51a464e3574f910ea77ba15bccbf0d86c7e14707a6f4b7bf038ff7f1d80a
|
data/.github/workflows/rake.yml
CHANGED
data/.rubocop.yml
CHANGED
data/isodoc.gemspec
CHANGED
@@ -26,7 +26,7 @@ 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.
|
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"
|
@@ -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
|
@@ -18,29 +18,23 @@ clause: فقرة
|
|
18
18
|
annex: ملحق
|
19
19
|
appendix: تذييل
|
20
20
|
no_terms_boilerplate: |
|
21
|
-
<p
|
21
|
+
<p>لم يتم سرد أي مصطلحات وتعريفات في هذا المستند.</p>
|
22
22
|
internal_terms_boilerplate: |
|
23
|
-
<p
|
24
|
-
the following terms and definitions apply.</p>
|
23
|
+
<p>لأغراض هذا المستند، تنطبق المصطلحات والتعريفات التالية.</p>
|
25
24
|
norm_with_refs_pref:
|
26
|
-
|
27
|
-
that some or all of their content constitutes requirements of this
|
28
|
-
document. For dated references, only the edition cited applies.
|
29
|
-
For undated references, the latest edition of the referenced
|
30
|
-
document (including any amendments) applies.
|
25
|
+
تتم الإشارة إلى المستندات التالية في النص بحيث يشكل بعض أو كل محتوياتها متطلبات هذا المستند. للحصول على مراجع مؤرخة، تطبق النسخة المشار إليها فقط. بالنسبة للمراجع غير المؤرخة ، تنطبق أحدث طبعة من الوثيقة المشار إليها (بما في ذلك أي تعديلات).
|
31
26
|
norm_empty_pref:
|
32
|
-
|
27
|
+
لا توجد مراجع معيارية في هذه الوثيقة.
|
33
28
|
external_terms_boilerplate: |
|
34
|
-
<p>
|
35
|
-
the terms and definitions given in % apply.</p>
|
29
|
+
<p> لأغراض هذا المستند ، تنطبق المصطلحات والتعريفات الواردة في%. </ p>
|
36
30
|
internal_external_terms_boilerplate: |
|
37
|
-
<p
|
38
|
-
|
39
|
-
term_defined_in: "[term defined in %]"
|
31
|
+
<p>لأغراض هذه الوثيقة ،تنطبق المصطلحات والتعاريف الواردة في % وما يلي.</p>
|
32
|
+
term_defined_in: "[المصطلح المحدد في %]"
|
40
33
|
note: ملاحظة
|
41
34
|
note_xref: ملاحظة
|
42
|
-
termnote:
|
35
|
+
termnote: ملاحظة % للقيد
|
43
36
|
list: قائمة
|
37
|
+
deflist: قائمة تعريف
|
44
38
|
figure: شكل
|
45
39
|
formula: معادلة
|
46
40
|
inequality: عدم مساواة
|
@@ -48,16 +42,16 @@ table: جدول
|
|
48
42
|
requirement: مطلب
|
49
43
|
recommendation: توصية
|
50
44
|
permission: إذن
|
51
|
-
key:
|
45
|
+
key: مفتاح
|
52
46
|
example: مثال
|
53
47
|
example_xref: مثال
|
54
48
|
where: حيث
|
55
49
|
wholeoftext: كامل النص
|
56
|
-
draft_label:
|
57
|
-
inform_annex:
|
58
|
-
norm_annex:
|
50
|
+
draft_label: مسودة
|
51
|
+
inform_annex: إخباري
|
52
|
+
norm_annex: مقياسي
|
59
53
|
modified: معدلة
|
60
|
-
deprecated:
|
54
|
+
deprecated: مهمل
|
61
55
|
source: مصدر
|
62
56
|
and: و
|
63
57
|
all_parts: كل الأجزاء
|
@@ -78,8 +72,8 @@ subject: موضوع
|
|
78
72
|
inherits: يرث
|
79
73
|
admonition:
|
80
74
|
danger: خطر
|
81
|
-
warning:
|
82
|
-
caution:
|
75
|
+
warning: تحذير
|
76
|
+
caution: حذر
|
83
77
|
important: مهم
|
84
78
|
safety precautions: احتياطات السلامة
|
85
79
|
locality:
|
@@ -108,9 +102,9 @@ inflection:
|
|
108
102
|
ملاحظة:
|
109
103
|
sg: ملاحظة
|
110
104
|
pl: ملاحظات
|
111
|
-
"
|
112
|
-
sg:
|
113
|
-
pl:
|
105
|
+
"ملاحظة % للقيد":
|
106
|
+
sg: ملاحظة % للقيد
|
107
|
+
pl: ملاحظات % للقيد
|
114
108
|
قائمة:
|
115
109
|
sg: قائمة
|
116
110
|
pl: قوائم
|
@@ -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
|
@@ -41,6 +42,7 @@ note: NOTE
|
|
41
42
|
note_xref: Note
|
42
43
|
termnote: Note % to entry
|
43
44
|
list: List
|
45
|
+
deflist: Definition List
|
44
46
|
figure: Figure
|
45
47
|
formula: Formula
|
46
48
|
inequality: Formula
|
@@ -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
|
@@ -37,6 +38,7 @@ figure: Figure
|
|
37
38
|
formula: Formule
|
38
39
|
inequality: Formule
|
39
40
|
list: Liste
|
41
|
+
deflist: Liste de définitions
|
40
42
|
table: Tableau
|
41
43
|
requirement: Exigence
|
42
44
|
recommendation: Recommandation
|
@@ -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: 附录
|
@@ -39,6 +40,7 @@ figure: 图
|
|
39
40
|
formula: 公式
|
40
41
|
inequality: 公式
|
41
42
|
list: 列项
|
43
|
+
deflist: 定义列表
|
42
44
|
table: 表
|
43
45
|
requirement: 要求
|
44
46
|
recommendation: 建议
|
data/lib/isodoc/convert.rb
CHANGED
@@ -37,6 +37,7 @@ module IsoDoc
|
|
37
37
|
# datauriimage: Encode images in HTML output as data URIs
|
38
38
|
# break_up_urls_in_tables: whether to insert spaces in URLs in tables
|
39
39
|
# every 40-odd chars
|
40
|
+
# sectionsplit: split up HTML output on sections
|
40
41
|
# bare: do not insert any prefatory material (coverpage, boilerplate)
|
41
42
|
def initialize(options)
|
42
43
|
@libdir ||= File.dirname(__FILE__) # rubocop:disable Lint/DisjunctiveAssignmentInConstructor
|
@@ -73,6 +74,7 @@ module IsoDoc
|
|
73
74
|
@datauriimage = options[:datauriimage]
|
74
75
|
@suppressheadingnumbers = options[:suppressheadingnumbers]
|
75
76
|
@break_up_urls_in_tables = options[:break_up_urls_in_tables] == "true"
|
77
|
+
@sectionsplit = options[:sectionsplit] == "true"
|
76
78
|
@bare = options[:bare]
|
77
79
|
@termdomain = ""
|
78
80
|
@termexample = false
|
@@ -143,7 +145,7 @@ module IsoDoc
|
|
143
145
|
end
|
144
146
|
|
145
147
|
def convert_init(file, input_filename, debug)
|
146
|
-
docxml = Nokogiri::XML(file)
|
148
|
+
docxml = Nokogiri::XML(file) { |config| config.huge }
|
147
149
|
filename, dir = init_file(input_filename, debug)
|
148
150
|
docxml.root.default_namespace = ""
|
149
151
|
lang = docxml&.at(ns("//bibdata/language"))&.text and @lang = lang
|
@@ -154,7 +156,7 @@ module IsoDoc
|
|
154
156
|
[docxml, filename, dir]
|
155
157
|
end
|
156
158
|
|
157
|
-
def convert(input_filename, file = nil, debug = false,
|
159
|
+
def convert(input_filename, file = nil, debug = false,
|
158
160
|
output_filename = nil)
|
159
161
|
file = File.read(input_filename, encoding: "utf-8") if file.nil?
|
160
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(
|
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,
|
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) }
|
@@ -224,7 +225,7 @@ module IsoDoc::Function
|
|
224
225
|
end
|
225
226
|
|
226
227
|
def svg_parse(node, out)
|
227
|
-
out
|
228
|
+
out.parent.add_child(node)
|
228
229
|
end
|
229
230
|
end
|
230
231
|
end
|
@@ -10,9 +10,9 @@ module IsoDoc::Function
|
|
10
10
|
end
|
11
11
|
|
12
12
|
# TODO generate formatted ref if not present
|
13
|
-
def nonstd_bibitem(list,
|
14
|
-
list.p **attr_code(iso_bibitem_entry_attrs(
|
15
|
-
ids = bibitem_ref_code(
|
13
|
+
def nonstd_bibitem(list, bib, ordinal, biblio)
|
14
|
+
list.p **attr_code(iso_bibitem_entry_attrs(bib, biblio)) do |ref|
|
15
|
+
ids = bibitem_ref_code(bib)
|
16
16
|
identifiers = render_identifier(ids)
|
17
17
|
if biblio then ref_entry_code(ref, ordinal, identifiers, ids)
|
18
18
|
else
|
@@ -20,21 +20,21 @@ module IsoDoc::Function
|
|
20
20
|
ref << ", #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
21
21
|
end
|
22
22
|
ref << ", " unless biblio && !identifiers[1]
|
23
|
-
reference_format(
|
23
|
+
reference_format(bib, ref)
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
27
|
-
def std_bibitem_entry(list,
|
28
|
-
list.p **attr_code(iso_bibitem_entry_attrs(
|
29
|
-
identifiers = render_identifier(bibitem_ref_code(
|
27
|
+
def std_bibitem_entry(list, bib, ordinal, biblio)
|
28
|
+
list.p **attr_code(iso_bibitem_entry_attrs(bib, biblio)) do |ref|
|
29
|
+
identifiers = render_identifier(bibitem_ref_code(bib))
|
30
30
|
if biblio then ref_entry_code(ref, ordinal, identifiers, nil)
|
31
31
|
else
|
32
32
|
ref << (identifiers[0] || identifiers[1]).to_s
|
33
33
|
ref << ", #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
34
34
|
end
|
35
|
-
date_note_process(
|
35
|
+
date_note_process(bib, ref)
|
36
36
|
ref << ", " unless biblio && !identifiers[1]
|
37
|
-
reference_format(
|
37
|
+
reference_format(bib, ref)
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -45,20 +45,20 @@ module IsoDoc::Function
|
|
45
45
|
t[1] and r << (t[1]).to_s
|
46
46
|
end
|
47
47
|
|
48
|
-
def pref_ref_code(
|
49
|
-
|
48
|
+
def pref_ref_code(bib)
|
49
|
+
bib.at(ns("./docidentifier[not(@type = 'DOI' or @type = 'metanorma' "\
|
50
50
|
"or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"))
|
51
51
|
end
|
52
52
|
|
53
53
|
# returns [metanorma, non-metanorma, DOI/ISSN/ISBN] identifiers
|
54
|
-
def bibitem_ref_code(
|
55
|
-
id =
|
56
|
-
id1 = pref_ref_code(
|
57
|
-
id2 =
|
54
|
+
def bibitem_ref_code(bib)
|
55
|
+
id = bib.at(ns("./docidentifier[@type = 'metanorma']"))
|
56
|
+
id1 = pref_ref_code(bib)
|
57
|
+
id2 = bib.at(ns("./docidentifier[@type = 'DOI' or @type = 'ISSN' or "\
|
58
58
|
"@type = 'ISBN']"))
|
59
59
|
return [id, id1, id2] if id || id1 || id2
|
60
60
|
|
61
|
-
id = Nokogiri::XML::Node.new("docidentifier",
|
61
|
+
id = Nokogiri::XML::Node.new("docidentifier", bib.document)
|
62
62
|
id << "(NO ID)"
|
63
63
|
[nil, id, nil]
|
64
64
|
end
|
@@ -72,20 +72,10 @@ module IsoDoc::Function
|
|
72
72
|
num
|
73
73
|
end
|
74
74
|
|
75
|
-
def render_identifier(
|
76
|
-
[
|
77
|
-
|
78
|
-
|
79
|
-
nil
|
80
|
-
else
|
81
|
-
docid_prefix(id[1]["type"], id[1].text.sub(/^\[/, "").sub(/\]$/, ""))
|
82
|
-
end,
|
83
|
-
if id[2].nil?
|
84
|
-
nil
|
85
|
-
else
|
86
|
-
docid_prefix(id[2]["type"], id[2].text.sub(/^\[/, "").sub(/\]$/, ""))
|
87
|
-
end,
|
88
|
-
]
|
75
|
+
def render_identifier(ident)
|
76
|
+
[bracket_if_num(ident[0]),
|
77
|
+
ident[1].nil? ? nil : ident[1].text.sub(/^\[/, "").sub(/\]$/, ""),
|
78
|
+
ident[2].nil? ? nil : ident[2].text.sub(/^\[/, "").sub(/\]$/, "")]
|
89
79
|
end
|
90
80
|
|
91
81
|
def docid_prefix(prefix, docid)
|
@@ -97,19 +87,20 @@ module IsoDoc::Function
|
|
97
87
|
def omit_docid_prefix(prefix)
|
98
88
|
return true if prefix.nil? || prefix.empty?
|
99
89
|
|
100
|
-
%w(ISO IEC IEV ITU W3C csd metanorma rfc-anchor)
|
90
|
+
%w(ISO IEC IEV ITU W3C csd metanorma repository rfc-anchor)
|
91
|
+
.include? prefix
|
101
92
|
end
|
102
93
|
|
103
|
-
def date_note_process(
|
104
|
-
date_note =
|
94
|
+
def date_note_process(bib, ref)
|
95
|
+
date_note = bib.at(ns("./note[@type = 'Unpublished-Status']"))
|
105
96
|
return if date_note.nil?
|
106
97
|
|
107
98
|
date_note.children.first.replace("<p>#{date_note.content}</p>")
|
108
99
|
footnote_parse(date_note, ref)
|
109
100
|
end
|
110
101
|
|
111
|
-
def iso_bibitem_entry_attrs(
|
112
|
-
{ id:
|
102
|
+
def iso_bibitem_entry_attrs(bib, biblio)
|
103
|
+
{ id: bib["id"], class: biblio ? "Biblio" : "NormRef" }
|
113
104
|
end
|
114
105
|
|
115
106
|
def iso_title(bib)
|
@@ -130,22 +121,21 @@ module IsoDoc::Function
|
|
130
121
|
insert_tab(ref, 1)
|
131
122
|
end
|
132
123
|
|
133
|
-
def reference_format(bib,
|
124
|
+
def reference_format(bib, out)
|
134
125
|
if ftitle = bib.at(ns("./formattedref"))
|
135
|
-
ftitle&.children&.each { |n| parse(n,
|
126
|
+
ftitle&.children&.each { |n| parse(n, out) }
|
136
127
|
else
|
137
|
-
|
138
|
-
|
139
|
-
title&.children&.each { |n| parse(n, i) }
|
128
|
+
out.i do |i|
|
129
|
+
iso_title(bib)&.children&.each { |n| parse(n, i) }
|
140
130
|
end
|
141
131
|
end
|
142
132
|
end
|
143
133
|
|
144
134
|
def is_standard(bib)
|
145
135
|
ret = false
|
136
|
+
drop = %w(metanorma DOI ISSN ISBN)
|
146
137
|
bib.xpath(ns("./docidentifier")).each do |id|
|
147
|
-
next if id["type"].nil? ||
|
148
|
-
%w(metanorma DOI ISSN ISBN).include?(id["type"])
|
138
|
+
next if id["type"].nil? || drop.include?(id["type"])
|
149
139
|
|
150
140
|
ret = true
|
151
141
|
end
|
@@ -180,8 +170,7 @@ module IsoDoc::Function
|
|
180
170
|
clause_name(num, f.at(ns("./title")), div, nil)
|
181
171
|
if f.name == "clause"
|
182
172
|
f.elements.each { |e| parse(e, div) unless e.name == "title" }
|
183
|
-
else
|
184
|
-
biblio_list(f, div, false)
|
173
|
+
else biblio_list(f, div, false)
|
185
174
|
end
|
186
175
|
end
|
187
176
|
num
|
@@ -212,13 +201,5 @@ module IsoDoc::Function
|
|
212
201
|
biblio_list(node, div, true)
|
213
202
|
end
|
214
203
|
end
|
215
|
-
|
216
|
-
def format_ref(ref, prefix, _isopub, _date, _allparts)
|
217
|
-
ref = docid_prefix(prefix, ref)
|
218
|
-
return "[#{ref}]" if ref && /^\d+$/.match(ref) && !prefix &&
|
219
|
-
!/^\[.*\]$/.match(ref)
|
220
|
-
|
221
|
-
ref
|
222
|
-
end
|
223
204
|
end
|
224
205
|
end
|
@@ -165,7 +165,6 @@ module IsoDoc::Function
|
|
165
165
|
out.div **attr_code(id: f["id"]) do |s|
|
166
166
|
clause_name(nil, f.at(ns("./title")) || @i18n.foreword, s,
|
167
167
|
{ class: "ForewordTitle" })
|
168
|
-
# s.h1(**{ class: "ForewordTitle" }) { |h1| h1 << @i18n.foreword }
|
169
168
|
f.elements.each { |e| parse(e, s) unless e.name == "title" }
|
170
169
|
end
|
171
170
|
end
|