isodoc 3.1.9 → 3.1.10

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: aad761a973bdff1849d666ab902b4964b557b26fb145deffb180aa665f411d11
4
- data.tar.gz: 1f0ede0902421b11b89e8caf6034e17e13dc5b8639c0bfaa435ad3cb1f609f06
3
+ metadata.gz: 99e69024aaaf44cd4e14adf54c3a7ae462ca5400306a9ccc20c74834ad101418
4
+ data.tar.gz: 39060f4e2b83d5211610b75d39474449191b0ef8f8d543672fc6a40eba55f7bd
5
5
  SHA512:
6
- metadata.gz: e86d05bd30c8c3f4ff3299c82af79bbde4bdf4018aab90c635808fd66c88ee04d20384c87d42b292a888acf72114ff66ba250af69628e83f58378f4b48daf12e
7
- data.tar.gz: fa112ae3e51c7b2045f93e387f60541c94a7771eb38a74b1d311102ba376e84aa1e7fc3ed0dc12599b8ffd4b6270677c4b85502398effbab970f7efd6103fe1e
6
+ metadata.gz: 2eeb99cfc5aebc17b5e07b2496467cc822a547c61d08e5b572b6575da8402b3beee4c6b854e8ee7feefaaa215e6aecd055670f9653e1d9c38538928ab6d06a85
7
+ data.tar.gz: 6a185f46948895262590d32bf58d311f53938a0f122d84e26d722a661d1a48fdf63aa043f5d8f094928d1441eb6b00f844182376300b3cf5c44311e35dea2849
@@ -313,8 +313,6 @@ h6:hover > a.anchor,
313
313
 
314
314
  svg {
315
315
  width: 100%;
316
- padding-bottom: 92%;
317
- height: 1px;
318
316
  overflow: visible;
319
317
  }
320
318
 
@@ -313,7 +313,5 @@ h6:hover > a.anchor,
313
313
 
314
314
  svg {
315
315
  width: 100%;
316
- padding-bottom: 92%;
317
- height: 1px;
318
316
  overflow: visible;
319
317
  }
@@ -278,5 +278,5 @@ visibility:visible;
278
278
  }
279
279
 
280
280
  svg {
281
- width: 100%; padding-bottom: 92%; height: 1px; overflow: visible;
281
+ width: 100%; overflow: visible;
282
282
  }
@@ -102,10 +102,9 @@ module IsoDoc
102
102
 
103
103
  def image_body_parse(node, attrs, out)
104
104
  if svg = node.at("./m:svg", "m" => "http://www.w3.org/2000/svg")
105
- %i(height width).each do |k|
106
- v = attrs[k] and v != "auto" and !v.empty? and
107
- svg[k.to_s] = v
108
- end
105
+ svg.delete("width")
106
+ svg["height"] = "1px"
107
+ svg["padding-bottom"] = "calc(100% * 3 / 4);"
109
108
  out.parent.add_child(svg)
110
109
  else super
111
110
  end
@@ -80,9 +80,9 @@ module IsoDoc
80
80
  IsoDoc::HtmlFunction::MathvariantToPlain.new(docxml).convert
81
81
  end
82
82
 
83
+ # do not resize SVG, their height is set to 1px in HTML for autofit
83
84
  def resize_images(docxml)
84
- docxml.xpath("//*[local-name() = 'img' or local-name() = 'svg']")
85
- .each do |i|
85
+ docxml.xpath("//*[local-name() = 'img']").each do |i|
86
86
  loc = image_localfile(i) or next
87
87
  i["width"], i["height"] = Vectory::ImageResize.new
88
88
  .call(i, loc, @maxheight, @maxwidth)
@@ -1,3 +1,3 @@
1
1
  module IsoDoc
2
- VERSION = "3.1.9".freeze
2
+ VERSION = "3.1.10".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isodoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.9
4
+ version: 3.1.10
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-05-17 00:00:00.000000000 Z
11
+ date: 2025-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64