metanorma-generic 2.1.0 → 2.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c262a3e06b94acff866441168d02ca8b127dcdbcf4ab05050c807d0e636adcc
4
- data.tar.gz: 133c5dd41e5aedb7c2b68369cc9a54ecc9eda3113221da4afc90847ca2f9b113
3
+ metadata.gz: 05f89e4a6adb0222c1cc71f880010902337d92cde88328a4754a61c5f30eb7dc
4
+ data.tar.gz: f506457c7e94d17694fe9512b559aa82a1665952bfdd06ae1554fc9b5e2d3d11
5
5
  SHA512:
6
- metadata.gz: f1a2f73f6898381fa004da28eb1bfc0dd068f5e04e7780c39f5a70ba7ac0dd0ea5bc12154182d9363778ebac9bad636d6288948684757f30a888a0e0232371eb
7
- data.tar.gz: 7e7ab0b187be8894af035b919f949409418acc1d66d3c0b6c12ebbdacfe041c0d9428ebe6f114da9cee00252e2cb228c9674a2b1fa0e2a76772465875a23b9a5
6
+ metadata.gz: 704cda28036803f93d1cb11790dfe605fcc2c2eb4ff1ba09007b4ce30bf84cd511e307640f7803c83a1447d5f9af650dc32b00a447b0a704ca73ac198ea68523
7
+ data.tar.gz: b70f01e52405512c56e8fd3ef3994a245972f92f49029b2700c54d16b3cf7179fed7fd706c7fe683da3aae9cd294db4cf1bd561333b2689315ec8e0a58ad30fe
@@ -14,7 +14,7 @@ module IsoDoc
14
14
  h2 = d.at("./preceding-sibling::*[@class = 'TermNum'][1]")
15
15
  d["id"] = h2["id"]
16
16
  d.children.first.previous =
17
- "<strong>#{h2.remove.children.to_xml}</strong>&nbsp;"
17
+ "<strong>#{h2.remove.children.to_xml}</strong>&#xa0;"
18
18
  end
19
19
  docxml
20
20
  end
@@ -4,7 +4,6 @@ require "isodoc"
4
4
 
5
5
  module IsoDoc
6
6
  module Generic
7
-
8
7
  # A {Converter} implementation that generates HTML output, and a document
9
8
  # schema encapsulation of the document for validation
10
9
  #
@@ -18,19 +17,25 @@ module IsoDoc
18
17
  attr_accessor :_file
19
18
  end
20
19
 
21
- def self.inherited( k )
22
- k._file = caller_locations.first.absolute_path
20
+ def self.inherited(k)
21
+ k._file = caller_locations(1..1).first.absolute_path
23
22
  end
24
23
 
25
24
  def default_fonts(options)
26
25
  {
27
26
  bodyfont: (
28
- options[:script] == "Hans" ? '"Source Han Sans",serif' :
29
- configuration.html_bodyfont || '"Overpass",sans-serif'
27
+ if options[:script] == "Hans"
28
+ '"Source Han Sans",serif'
29
+ else
30
+ configuration.html_bodyfont || '"Overpass",sans-serif'
31
+ end
30
32
  ),
31
33
  headerfont: (
32
- options[:script] == "Hans" ? '"Source Han Sans",sans-serif' :
33
- configuration.html_headerfont || '"Overpass",sans-serif'
34
+ if options[:script] == "Hans"
35
+ '"Source Han Sans",sans-serif'
36
+ else
37
+ configuration.html_headerfont || '"Overpass",sans-serif'
38
+ end
34
39
  ),
35
40
  monospacefont: configuration.html_monospacefont || '"Space Mono",monospace',
36
41
  normalfontsize: configuration.html_normalfontsize,
@@ -43,21 +48,23 @@ module IsoDoc
43
48
  def default_file_locations(_options)
44
49
  {
45
50
  htmlstylesheet: baselocation(configuration.htmlstylesheet) ||
46
- html_doc_path("htmlstyle.scss"),
51
+ html_doc_path("htmlstyle.scss"),
47
52
  htmlcoverpage: baselocation(configuration.htmlcoverpage) ||
48
- html_doc_path("html_generic_titlepage.html"),
53
+ html_doc_path("html_generic_titlepage.html"),
49
54
  htmlintropage: baselocation(configuration.htmlintropage) ||
50
- html_doc_path("html_generic_intro.html"),
55
+ html_doc_path("html_generic_intro.html"),
51
56
  scripts: baselocation(configuration.scripts),
52
- i18nyaml: (configuration.i18nyaml.is_a?(String) ?
53
- baselocation(configuration.i18nyaml) : nil)
57
+ i18nyaml: (if configuration.i18nyaml.is_a?(String)
58
+ baselocation(configuration.i18nyaml)
59
+ end),
54
60
  }.transform_values { |v| v&.empty? ? nil : v }
55
61
  end
56
62
 
57
63
  def googlefonts
58
64
  return unless configuration.webfont
65
+
59
66
  Array(configuration.webfont).map do |x|
60
- %{<link href="#{x.gsub(/\&amp;/, '&')}" rel="stylesheet">}
67
+ %{<link href="#{x}" rel="stylesheet"/>}
61
68
  end.join("\n")
62
69
  end
63
70
 
@@ -66,4 +73,3 @@ module IsoDoc
66
73
  end
67
74
  end
68
75
  end
69
-
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Generic
3
- VERSION = "2.1.0".freeze
3
+ VERSION = "2.1.1".freeze
4
4
  end
5
5
  end
@@ -3,7 +3,6 @@ require "metanorma/generic/version"
3
3
  require "forwardable"
4
4
  require "yaml"
5
5
 
6
-
7
6
  module Metanorma
8
7
  module Generic # rubocop:disable Style/MutableConstant
9
8
  ORGANIZATION_NAME_SHORT = "Acme"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-generic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities