metanorma-iso 3.0.3 → 3.0.4
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/lib/isodoc/iso/iso.amendment.xsl +179 -57
- data/lib/isodoc/iso/iso.international-standard.xsl +179 -57
- data/lib/isodoc/iso/presentation_xml_convert.rb +18 -6
- data/lib/metanorma/iso/basicdoc.rng +14 -8
- data/lib/metanorma/iso/biblio-standoc.rng +37 -7
- data/lib/metanorma/iso/biblio.rng +30 -18
- data/lib/metanorma/iso/front.rb +1 -6
- data/lib/metanorma/iso/isodoc.rng +115 -96
- data/lib/metanorma/iso/isostandard-amd.rng +4 -7
- data/lib/metanorma/iso/isostandard.rng +6 -149
- data/lib/metanorma/iso/relaton-iso.rng +35 -34
- data/lib/metanorma/iso/reqt.rng +7 -6
- data/lib/metanorma/iso/validate.rb +6 -9
- data/lib/metanorma/iso/validate_requirements.rb +9 -6
- data/lib/metanorma/iso/validate_style.rb +12 -11
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +2 -2
@@ -30,15 +30,17 @@ module Metanorma
|
|
30
30
|
# ISO/IEC DIR 2, 13.2
|
31
31
|
def introduction_style(node)
|
32
32
|
@novalid and return
|
33
|
-
r = requirement_check(extract_text(node))
|
34
|
-
|
33
|
+
r = requirement_check(extract_text(node)) and
|
34
|
+
style_warning(node, "Introduction may contain requirement", r,
|
35
|
+
display: false)
|
35
36
|
end
|
36
37
|
|
37
38
|
# ISO/IEC DIR 2, 16.5.6
|
38
39
|
def definition_style(node)
|
39
40
|
@novalid and return
|
40
|
-
r = requirement_check(extract_text(node))
|
41
|
-
|
41
|
+
r = requirement_check(extract_text(node)) and
|
42
|
+
style_warning(node, "Definition may contain requirement", r,
|
43
|
+
display: false)
|
42
44
|
end
|
43
45
|
|
44
46
|
# ISO/IEC DIR 2, 16.5.7
|
@@ -70,8 +72,7 @@ module Metanorma
|
|
70
72
|
# style check with a regex on a token
|
71
73
|
# and a negative match on its preceding token
|
72
74
|
def style_two_regex_not_prev(n, text, regex, re_prev, warning)
|
73
|
-
|
74
|
-
|
75
|
+
text.nil? and return
|
75
76
|
arr = Tokenizer::WhitespaceTokenizer.new.tokenize(text)
|
76
77
|
arr.each_index do |i|
|
77
78
|
m = regex.match arr[i]
|
@@ -108,7 +109,8 @@ module Metanorma
|
|
108
109
|
# https://www.iso.org/ISO-house-style.html#iso-hs-s-text-r-s-might
|
109
110
|
def style_ambig_words(node, text)
|
110
111
|
r = ambig_words_check(text) and
|
111
|
-
style_warning(node, "may contain ambiguous provision", r
|
112
|
+
style_warning(node, "may contain ambiguous provision", r,
|
113
|
+
display: false)
|
112
114
|
@lang == "en" and style_regex(/\b(?<num>billions?)\b/i,
|
113
115
|
"ambiguous number", node, text)
|
114
116
|
end
|
@@ -208,12 +210,11 @@ module Metanorma
|
|
208
210
|
end
|
209
211
|
end
|
210
212
|
|
211
|
-
def style_warning(node, msg, text = nil)
|
212
|
-
|
213
|
-
|
213
|
+
def style_warning(node, msg, text = nil, display: true)
|
214
|
+
@novalid and return
|
214
215
|
w = msg
|
215
216
|
w += ": #{text}" if text
|
216
|
-
@log.add("Style", node, w)
|
217
|
+
@log.add("Style", node, w, display:)
|
217
218
|
end
|
218
219
|
|
219
220
|
ASSETS_TO_STYLE =
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|