metanorma 1.5.2 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/input/asciidoc.rb +26 -26
- data/lib/metanorma/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 758d48f89ac77f45c22c5982eb021778e27649e6bedb4e59093f4c54bb03e752
|
4
|
+
data.tar.gz: 0714c39311ab9125cff1e7049410e615b597b033d38de4f4722ed766da4eb51f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d49ff8e5dabd1a92f1ad9c1ef23f285ac23e6491cab5779105a05ab2d5b6a93879fce50e25ff2baf0bd95ea41af4b61f0481aa4c23bc462e9c6cee61a5c6221d
|
7
|
+
data.tar.gz: 06c86d497292b5a70e3bb55abf4d2de9d672b36b380362a402bd2324c02a6e668b5186ccac5b068f1946a5b2607844bee62d01adbc5388e5519fb00f61e4b0f1
|
@@ -60,7 +60,7 @@ module Metanorma
|
|
60
60
|
%w(htmlstylesheet htmlcoverpage htmlintropage scripts
|
61
61
|
scripts-override scripts-pdf wordstylesheet i18nyaml
|
62
62
|
standardstylesheet header wordcoverpage wordintropage
|
63
|
-
ulstyle olstyle htmlstylesheet-override bare
|
63
|
+
ulstyle olstyle htmlstylesheet-override bare toclevels
|
64
64
|
htmltoclevels doctoclevels sectionsplit base-asset-path
|
65
65
|
body-font header-font monospace-font title-font
|
66
66
|
align-cross-elements wordstylesheet-override ieee-dtd
|
@@ -68,38 +68,38 @@ module Metanorma
|
|
68
68
|
pdf-owner-password pdf-allow-copy-content pdf-allow-edit-content
|
69
69
|
pdf-allow-assemble-document pdf-allow-edit-annotations
|
70
70
|
pdf-allow-print pdf-allow-print-hq pdf-allow-fill-in-forms
|
71
|
-
|
72
|
-
font-license-agreement pdf-allow-access-content
|
71
|
+
fonts font-license-agreement pdf-allow-access-content
|
73
72
|
pdf-encrypt-metadata iso-word-template document-scheme
|
74
|
-
localize-number iso-word-bg-strip-color
|
75
|
-
|
73
|
+
localize-number iso-word-bg-strip-color modspec-identifier-base
|
74
|
+
).freeze
|
75
|
+
|
76
|
+
EMPTY_ADOC_OPTIONS_DEFAULT_TRUE =
|
77
|
+
%w(data-uri-image suppress-asciimath-dup use-xinclude source-highlighter).freeze
|
78
|
+
|
79
|
+
EMPTY_ADOC_OPTIONS_DEFAULT_FALSE =
|
80
|
+
%w(hierarchical-assets break-up-urls-in-tables toc-figures
|
81
|
+
toc-tables toc-recommendations).freeze
|
82
|
+
|
83
|
+
def attr_name_normalise(name)
|
84
|
+
name.gsub(/-/, "").sub(/override$/, "_override").sub(/pdf$/, "_pdf")
|
85
|
+
.to_sym
|
86
|
+
end
|
76
87
|
|
77
88
|
def extract_options(file)
|
78
89
|
header = file.sub(/\n\n.*$/m, "\n")
|
79
90
|
ret = ADOC_OPTIONS.each_with_object({}) do |w, acc|
|
80
91
|
m = /\n:#{w}: ([^\n]+)\n/.match(header) or next
|
81
|
-
acc[w
|
82
|
-
.sub(/pdf$/, "_pdf").to_sym] = m[1]
|
92
|
+
acc[attr_name_normalise(w)] = m[1]
|
83
93
|
end
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
use_xinclude = empty_attr(use_xinclude, "use-xinclude")
|
94
|
-
defined?(break_up) and
|
95
|
-
break_up = empty_attr(break_up, "break-up-urls-in-tables")
|
96
|
-
ret.merge(
|
97
|
-
datauriimage: defined?(datauriimage) ? datauriimage != "false" : true,
|
98
|
-
suppressasciimathdup: defined?(suppress_asciimath_dup) ? suppress_asciimath_dup != "false" : nil,
|
99
|
-
hierarchical_assets: defined?(hier_assets) ? hier_assets : nil,
|
100
|
-
use_xinclude: defined?(use_xinclude) ? use_xinclude : nil,
|
101
|
-
break_up_urls_in_tables: defined?(break_up) ? break_up : nil,
|
102
|
-
).compact
|
94
|
+
ret2 = EMPTY_ADOC_OPTIONS_DEFAULT_TRUE.each_with_object({}) do |w, acc|
|
95
|
+
m = /\n:#{w}:([^\n]*)\n/.match(header) || [nil, "true"]
|
96
|
+
acc[attr_name_normalise(w)] = (m[1].strip != "false")
|
97
|
+
end
|
98
|
+
ret3 = EMPTY_ADOC_OPTIONS_DEFAULT_FALSE.each_with_object({}) do |w, acc|
|
99
|
+
m = /\n:#{w}:([^\n]*)\n/.match(header) || [nil, "false"]
|
100
|
+
acc[attr_name_normalise(w)] = !["false"].include?(m[1].strip)
|
101
|
+
end
|
102
|
+
ret.merge(ret2).merge(ret3).compact
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
data/lib/metanorma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.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: 2022-
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -311,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
311
|
- !ruby/object:Gem::Version
|
312
312
|
version: '0'
|
313
313
|
requirements: []
|
314
|
-
rubygems_version: 3.3.
|
314
|
+
rubygems_version: 3.3.26
|
315
315
|
signing_key:
|
316
316
|
specification_version: 4
|
317
317
|
summary: Metanorma is the standard of standards; the metanorma gem allows you to create
|