metanorma-gb 1.0.10 → 1.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +3 -0
- data/lib/asciidoctor/gb/converter.rb +6 -2
- data/lib/asciidoctor/gb/isodoc.rng +22 -0
- data/lib/isodoc/gb/gbcleanup.rb +1 -1
- data/lib/isodoc/gb/html/htmlcompliantstyle.scss +7 -0
- data/lib/isodoc/gb/html/htmlstyle.scss +8 -1
- data/lib/metanorma/gb/version.rb +1 -1
- data/metanorma-gb.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: adb41d5c4e5191600fcc0120c46c021b99d9b5f7a411f99b30e86ee9ea3943de
|
4
|
+
data.tar.gz: 5470c420878806da1bb943fd68abc74e547018bc051251c5a82e78a2b7f4ee94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db404eaca69c05e342add0b4d19d91c481bf85b3efb5c58a042b5d79b2ba4af481acafd5ba9fccc243180a21fad492eac41a23e533f63bbc2242185024f523ab
|
7
|
+
data.tar.gz: f1a79b357464eee2a15f9c8ac296baa204270b81b246f6767cce05156d87fb08d150bb9f0e938a70cc9b69ef34f499209453c934a9a5e267395d1a230f80bb11
|
data/README.adoc
CHANGED
@@ -99,6 +99,9 @@ These are the title introduction, main title, and part title in Chinese.
|
|
99
99
|
The intro and part titles are optional.
|
100
100
|
(They replace their French counterparts in
|
101
101
|
https://github.com/riboseinc/metanorma-iso[metanorma-iso].)
|
102
|
+
This and the other `:title-*` document attributes are used instead
|
103
|
+
of the metanorma-standoc `:title:` attribute and the default Asciidoctor title
|
104
|
+
(the first line of the document header, prefixed with `=`).
|
102
105
|
|
103
106
|
`:title-intro-en:`, `:title-main-en:`*, `:title-part-en:`::
|
104
107
|
These are the title introduction, main title, and part title in English.
|
@@ -116,16 +116,20 @@ module Asciidoctor
|
|
116
116
|
elem.replace(elem.children)
|
117
117
|
end
|
118
118
|
|
119
|
+
def text_clean(text)
|
120
|
+
text.gsub(/^\s*/, "").gsub(/</, "<").gsub(/>/, ">")
|
121
|
+
end
|
122
|
+
|
119
123
|
def duplicate_localisedstrings(zh)
|
120
124
|
en = zh.dup.remove
|
121
125
|
zh.after(en).after(" ")
|
122
126
|
zh["language"] = "zh"
|
123
127
|
en["language"] = "en"
|
124
128
|
en.traverse do |c|
|
125
|
-
c.text? && c.content = c.text.gsub(HAN_TEXT, "")
|
129
|
+
c.text? && c.content = text_clean(c.text.gsub(HAN_TEXT, ""))
|
126
130
|
end
|
127
131
|
zh.traverse do |c|
|
128
|
-
c.text? && c.content = c.text.gsub(ROMAN_TEXT, "")
|
132
|
+
c.text? && c.content = text_clean(c.text.gsub(ROMAN_TEXT, ""))
|
129
133
|
end
|
130
134
|
end
|
131
135
|
|
@@ -384,6 +384,7 @@
|
|
384
384
|
<ref name="sourcecode"/>
|
385
385
|
<ref name="example"/>
|
386
386
|
<ref name="review"/>
|
387
|
+
<ref name="pre"/>
|
387
388
|
</choice>
|
388
389
|
</define>
|
389
390
|
<define name="paragraph">
|
@@ -540,6 +541,20 @@
|
|
540
541
|
</zeroOrMore>
|
541
542
|
</element>
|
542
543
|
</define>
|
544
|
+
<define name="pre">
|
545
|
+
<element name="pre">
|
546
|
+
<attribute name="id">
|
547
|
+
<data type="ID"/>
|
548
|
+
</attribute>
|
549
|
+
<optional>
|
550
|
+
<ref name="tname"/>
|
551
|
+
</optional>
|
552
|
+
<text/>
|
553
|
+
<zeroOrMore>
|
554
|
+
<ref name="note"/>
|
555
|
+
</zeroOrMore>
|
556
|
+
</element>
|
557
|
+
</define>
|
543
558
|
<define name="table">
|
544
559
|
<element name="table">
|
545
560
|
<attribute name="id">
|
@@ -710,6 +725,7 @@
|
|
710
725
|
</optional>
|
711
726
|
<choice>
|
712
727
|
<ref name="image"/>
|
728
|
+
<ref name="pre"/>
|
713
729
|
<zeroOrMore>
|
714
730
|
<ref name="figure"/>
|
715
731
|
</zeroOrMore>
|
@@ -735,6 +751,7 @@
|
|
735
751
|
<ref name="sub"/>
|
736
752
|
<ref name="sup"/>
|
737
753
|
<ref name="tt"/>
|
754
|
+
<ref name="keyword"/>
|
738
755
|
<ref name="strike"/>
|
739
756
|
<ref name="smallcap"/>
|
740
757
|
<ref name="xref"/>
|
@@ -765,6 +782,11 @@
|
|
765
782
|
<text/>
|
766
783
|
</element>
|
767
784
|
</define>
|
785
|
+
<define name="keyword">
|
786
|
+
<element name="keyword">
|
787
|
+
<text/>
|
788
|
+
</element>
|
789
|
+
</define>
|
768
790
|
<define name="sub">
|
769
791
|
<element name="sub">
|
770
792
|
<text/>
|
data/lib/isodoc/gb/gbcleanup.rb
CHANGED
@@ -30,7 +30,7 @@ module IsoDoc
|
|
30
30
|
def spaerdruck(x, return_on_br)
|
31
31
|
x.traverse do |n|
|
32
32
|
n.text? and n.content = n.text.gsub(/(.)/, "\\1\u00a0\u00a0").
|
33
|
-
gsub(/\u00a0+$/, "")
|
33
|
+
gsub(/\u00a0+$/, "").gsub(/</, "<").gsub(/>/, ">")
|
34
34
|
return_on_br and n.element? and n.name == "br" and return
|
35
35
|
end
|
36
36
|
end
|
@@ -76,6 +76,12 @@ time, mark, audio, video {
|
|
76
76
|
|
77
77
|
code, pre, tt, kbd, samp {
|
78
78
|
font-family: $monospacefont;
|
79
|
+
font-variant-ligatures: none;
|
80
|
+
}
|
81
|
+
|
82
|
+
code *, pre *, tt *, kbd *, samp * {
|
83
|
+
font-family: $monospacefont !important;
|
84
|
+
font-variant-ligatures: none;
|
79
85
|
}
|
80
86
|
|
81
87
|
h1, h2, h3, h4, h5, h6, .h2Annex {
|
@@ -1023,6 +1029,7 @@ margin-left: 2em;
|
|
1023
1029
|
|
1024
1030
|
.Sourcecode, .figure {
|
1025
1031
|
font-family: $monospacefont;
|
1032
|
+
font-variant-ligatures: none;
|
1026
1033
|
font-size:0.9em;
|
1027
1034
|
line-height: 1.6em;
|
1028
1035
|
padding: 1.5em;
|
@@ -76,8 +76,14 @@ time, mark, audio, video {
|
|
76
76
|
|
77
77
|
code, pre, tt, kbd, samp {
|
78
78
|
font-family: $monospacefont;
|
79
|
+
font-variant-ligatures: none;
|
79
80
|
}
|
80
|
-
|
81
|
+
|
82
|
+
code *, pre *, tt *, kbd *, samp * {
|
83
|
+
font-family: $monospacefont !important;
|
84
|
+
font-variant-ligatures: none;
|
85
|
+
}
|
86
|
+
|
81
87
|
h1, h2, h3, h4, h5, h6, .h2Annex {
|
82
88
|
font-family: $headerfont;
|
83
89
|
}
|
@@ -817,6 +823,7 @@ margin-left: 2em;
|
|
817
823
|
|
818
824
|
.Sourcecode {
|
819
825
|
font-family: $monospacefont;
|
826
|
+
font-variant-ligatures: none;
|
820
827
|
}
|
821
828
|
|
822
829
|
.figure, .Sourcecode {
|
data/lib/metanorma/gb/version.rb
CHANGED
data/metanorma-gb.gemspec
CHANGED
@@ -40,7 +40,7 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
41
41
|
spec.add_development_dependency "rake", "~> 12.0"
|
42
42
|
spec.add_development_dependency "rspec", "~> 3.6"
|
43
|
-
spec.add_development_dependency "rubocop", "
|
43
|
+
spec.add_development_dependency "rubocop", "= 0.54.0"
|
44
44
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
45
45
|
spec.add_development_dependency "timecop", "~> 0.9"
|
46
46
|
spec.add_development_dependency "metanorma"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-gb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|
@@ -168,16 +168,16 @@ dependencies:
|
|
168
168
|
name: rubocop
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
|
-
- -
|
171
|
+
- - '='
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version:
|
173
|
+
version: 0.54.0
|
174
174
|
type: :development
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- -
|
178
|
+
- - '='
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: 0.54.0
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: simplecov
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|