isodoc 3.7.11 → 3.7.12

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: 270dafea0a539bced4411ce5c5c3963c4b24745e4727cecef7f716a7a1c8df7a
4
- data.tar.gz: d1d8ab2d4848e53f6e74946a2d8de4ec6ac9d05e7fc620f00719e0ebec93bd3f
3
+ metadata.gz: 7ff06e0cc7960c3c125d068e085f3d56973a3591c530fdaa096f70d47a2e574d
4
+ data.tar.gz: e04d4ceda3b6f90fed711df3a4d9c1e47b033282f28e70b550fdecff79a97f66
5
5
  SHA512:
6
- metadata.gz: e816079e77f5c2075d02e7a16f27c3118c907d0ba4ce2198435b5241d28f75e8eb4892f883e067852aa42c059ed8e2448efd1f5351d3ae3d877ff21f5604ba3c
7
- data.tar.gz: 1464929049db640fe3c5258f5cf8b89dbf4d3f8712c3f3ab882d399f93e63320344b946acca3cadad5a132c757fe5fb31da017cad64a2ff7fd9c7ab29490d07b
6
+ metadata.gz: 14dba4914e496487f29f48349e1086a96fc8a3e92c7a28f9d4e83e1f174761cc7dac42611d605eb1feac25b18ebde9d0e28996d5c4ec3fbadd21729cfebf9ba9
7
+ data.tar.gz: f9b1da627369b9febc2730287a5227cbdccc28fed3e7ed72d132986a743eb49700d853a038ded173ec5470b000e036e5ecb26a6dd41ae92bc1de864a83339709
data/lib/isodoc/css.rb CHANGED
@@ -100,10 +100,30 @@ module IsoDoc
100
100
  File.dirname(filename)]
101
101
  end
102
102
 
103
+ def sassc_available?
104
+ require "sassc-embedded"
105
+ true
106
+ rescue LoadError
107
+ false
108
+ end
109
+
103
110
  # stripwordcss if HTML stylesheet, !stripwordcss if DOC stylesheet
104
111
  def generate_css(filename, stripwordcss)
105
112
  filename.nil? and return nil
106
113
  filename = precompiled_style_or_original(filename)
114
+ # The release's precompiled .css twins bake in the DEFAULT font
115
+ # variables, so a flavor overriding default_fonts would be silently
116
+ # dropped when its stylesheet is consumed as precompiled
117
+ # (metanorma-un, metanorma-m3aawg font regressions). When the scss
118
+ # source is present and the consumer bundle carries the optional
119
+ # sassc-embedded toolchain, compile at runtime so the flavor's
120
+ # fonts template in; plain installs without the toolchain keep the
121
+ # precompiled fallback.
122
+ scss = filename.sub(/\.css\z/, ".scss")
123
+ if File.extname(filename) == ".css" && File.file?(scss) &&
124
+ sassc_available?
125
+ filename = scss
126
+ end
107
127
  stylesheet = File.read(filename, encoding: "UTF-8")
108
128
  stylesheet = preprocess_css(stylesheet, stripwordcss)
109
129
  File.extname(filename) == ".scss" and
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.7.11".freeze
2
+ VERSION = "3.7.12".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.11
4
+ version: 3.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.