isodoc 1.8.3 → 1.8.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/presentation_function/terms.rb +6 -3
- data/lib/isodoc/version.rb +1 -1
- data/spec/isodoc/terms_spec.rb +7 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee178bd5fb88dd6ee3302731a8325eec443d80aac78adb9b9bd166157ffb4ebb
|
4
|
+
data.tar.gz: 95d464d67887b5ea80dd507a66815107c7e9c99d2e7ab4e11f86467524b5a9f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c5501c94696d11e07b7e7e0689eb3c4ae46917e7494f4c64407b150ba1171fb7d5c8723e59ab88c01f94f733a9880f8a40b6668c5c364f058d9865964957378
|
7
|
+
data.tar.gz: 6a4d747161c3a88b7be6034e82876d5aafd3c500ba1dffdd5f4359382da35285738f2a3fb7c3351892eb5472459054e5f2010dc0e769077052c5e1bd4a7b03ec
|
@@ -221,16 +221,19 @@ module IsoDoc
|
|
221
221
|
end
|
222
222
|
|
223
223
|
def termsource(docxml)
|
224
|
+
docxml.xpath(ns("//termsource/modification")).each do |f|
|
225
|
+
termsource_modification(f)
|
226
|
+
end
|
224
227
|
docxml.xpath(ns("//termsource")).each do |f|
|
225
228
|
termsource1(f)
|
226
229
|
end
|
227
230
|
end
|
228
231
|
|
229
232
|
def termsource1(elem)
|
230
|
-
|
231
|
-
|
233
|
+
while elem&.next_element&.name == "termsource"
|
234
|
+
elem << "; #{elem.next_element.remove.children.to_xml}"
|
235
|
+
end
|
232
236
|
elem.children = l10n("[#{@i18n.source}: #{elem.children.to_xml.strip}]")
|
233
|
-
elem&.next_element&.name == "termsource" and elem.next = "; "
|
234
237
|
end
|
235
238
|
|
236
239
|
def termsource_modification(mod)
|
data/lib/isodoc/version.rb
CHANGED
data/spec/isodoc/terms_spec.rb
CHANGED
@@ -101,8 +101,8 @@ RSpec.describe IsoDoc do
|
|
101
101
|
</termexample>
|
102
102
|
<termsource status="identical">[SOURCE: <origin citeas="">
|
103
103
|
<termref base="IEV" target="xyz">t1</termref>
|
104
|
-
</origin>, modified
|
105
|
-
<
|
104
|
+
</origin>, modified ;
|
105
|
+
<origin citeas="">
|
106
106
|
<termref base="IEV" target="xyz"/>
|
107
107
|
</origin>, modified
|
108
108
|
–
|
@@ -155,8 +155,8 @@ RSpec.describe IsoDoc do
|
|
155
155
|
<li>A</li>
|
156
156
|
</ul>
|
157
157
|
</div>
|
158
|
-
<p>[SOURCE: t1, modified
|
159
|
-
|
158
|
+
<p>[SOURCE: t1, modified ;
|
159
|
+
Termbase IEV, term ID xyz, modified
|
160
160
|
–
|
161
161
|
with adjustments]</p>
|
162
162
|
<p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;"><b>paddy</b></p>
|
@@ -197,8 +197,8 @@ RSpec.describe IsoDoc do
|
|
197
197
|
<li>A</li>
|
198
198
|
</ul>
|
199
199
|
</div>
|
200
|
-
<p>[SOURCE: t1, modified
|
201
|
-
|
200
|
+
<p>[SOURCE: t1, modified ;
|
201
|
+
Termbase IEV, term ID xyz, modified
|
202
202
|
–
|
203
203
|
with adjustments]</p>
|
204
204
|
<p class="TermNum" id="paddy">1.2.</p><p class="Terms" style="text-align:left;"><b>paddy</b></p>
|
@@ -321,9 +321,7 @@ RSpec.describe IsoDoc do
|
|
321
321
|
<termsource status='identical'>[SOURCE:
|
322
322
|
<origin citeas=''>
|
323
323
|
<termref base='IEV' target='xyz'>t1</termref>
|
324
|
-
</origin
|
325
|
-
</termsource>;
|
326
|
-
<termsource status='modified'>[SOURCE:
|
324
|
+
</origin>;
|
327
325
|
<origin citeas=''>
|
328
326
|
<termref base='IEV' target='xyz'/>
|
329
327
|
</origin>, modified – with adjustments]
|