html2doc 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 89d882e956a68ad2f948882f54494709cb4421bd25e18fccb9415d95f9664d02
4
- data.tar.gz: 20836a167e277229f9780ec5fa816ad7fe31778f00c5cc5aaf7365a145203f4f
3
+ metadata.gz: 71671aea1d7e1f303519cf52499554f61112070aa7a5a4948d5f9d9e17c6804c
4
+ data.tar.gz: ca43f784656643e6f4bdde934f0001d055df50ff020a6565d69eef75cb0c0fdc
5
5
  SHA512:
6
- metadata.gz: 4bea212f0ad5beac524d671c100237fb15533171074414a08d21dfa316e0af715e70316771c734b868898e6c1977fe985b8aa46d5ee27d9a4abef92908243a55
7
- data.tar.gz: 43ee71168d6cddfdc05db3208ab3ad054bc4b95e5da7d288164f5b2ccff944c6322e4defae74055757d7fbfdb77daa789ab70b74dab8283390dc26a70fa3818d
6
+ metadata.gz: 6d7f5861a22b9daa040f1bcf389a4f781bb1ee3c1fc7329c29aac648e9322501d1342450ce5c1a4ab98dc45b2dbadcd28eb2b045994eadbd0df1f396c4569ff1
7
+ data.tar.gz: ef1be050d303a834643f659f158c12e1e297618f7590bc2731e8476cdeced08018600539dcc81c558a60f139a25f7ea28af8bc3ba5de17fb97dd3e223f47f4f8
@@ -6,15 +6,23 @@ on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
+ paths-ignore:
10
+ - .github/workflows/ubuntu.yml
11
+ - .github/workflows/windows.yml
9
12
 
10
13
  jobs:
11
14
  test-macos:
12
15
  name: Test on Ruby ${{ matrix.ruby }} macOS
13
16
  runs-on: macos-latest
17
+ continue-on-error: ${{ matrix.experimental }}
14
18
  strategy:
15
19
  fail-fast: false
16
20
  matrix:
17
21
  ruby: [ '2.6', '2.5', '2.4' ]
22
+ experimental: [false]
23
+ include:
24
+ - ruby: '2.7'
25
+ experimental: true
18
26
  steps:
19
27
  - uses: actions/checkout@master
20
28
  - name: Use Ruby
@@ -5,16 +5,26 @@ name: ubuntu
5
5
  on:
6
6
  push:
7
7
  branches: [ master ]
8
+ tags:
9
+ - '*'
8
10
  pull_request:
11
+ paths-ignore:
12
+ - .github/workflows/macos.yml
13
+ - .github/workflows/windows.yml
9
14
 
10
15
  jobs:
11
16
  test-linux:
12
17
  name: Test on Ruby ${{ matrix.ruby }} Ubuntu
13
18
  runs-on: ubuntu-latest
19
+ continue-on-error: ${{ matrix.experimental }}
14
20
  strategy:
15
21
  fail-fast: false
16
22
  matrix:
17
23
  ruby: [ '2.6', '2.5', '2.4' ]
24
+ experimental: [false]
25
+ include:
26
+ - ruby: '2.7'
27
+ experimental: true
18
28
  steps:
19
29
  - uses: actions/checkout@master
20
30
  - name: Use Ruby
@@ -6,15 +6,23 @@ on:
6
6
  push:
7
7
  branches: [ master ]
8
8
  pull_request:
9
+ paths-ignore:
10
+ - .github/workflows/macos.yml
11
+ - .github/workflows/ubuntu.yml
9
12
 
10
13
  jobs:
11
14
  test-windows:
12
15
  name: Test on Ruby ${{ matrix.ruby }} Windows
13
16
  runs-on: windows-latest
17
+ continue-on-error: ${{ matrix.experimental }}
14
18
  strategy:
15
19
  fail-fast: false
16
20
  matrix:
17
21
  ruby: [ '2.6', '2.5', '2.4' ]
22
+ experimental: [false]
23
+ include:
24
+ - ruby: '2.7'
25
+ experimental: true
18
26
  steps:
19
27
  - uses: actions/checkout@master
20
28
  - name: Use Ruby
@@ -24,7 +24,7 @@ This work is driven by the Word document generation procedure documented in http
24
24
 
25
25
  The gem currently does the following:
26
26
 
27
- * Convert any AsciiMath and MathML to Word's native mathematical formatting language, OOXML. Word supports copy-pasting MathML into Word and converting it into OOXML; however the conversion is not infallible (we have found problems with `\sum`: Word claims parameters were missing, and inserting dotted squares to indicate as much), and you may need to post-edit the OOXML.
27
+ * Convert any AsciiMath and MathML to Word's native mathematical formatting language, OOXML. Word supports copy-pasting MathML into Word and converting it into OOXML; however the conversion is not infallible (we have in the past found problems with `\sum`: Word claims parameters were missing, and inserting dotted squares to indicate as much), and you may need to post-edit the OOXML.
28
28
  ** The gem does attempt to repair the MathML input, to bring it in line with Word's OOXML's expectations. If you find any issues with AsciiMath or MathML input, please raise an issue.
29
29
  * Identify any footnotes in the document (defined as hyperlinks with attributes `class = "Footnote"` or `epub:type = "footnote"`), and render them as Microsoft Word footnotes.
30
30
  ** The corresponding footnote content is any `div` or `aside` element with the same `@id` attribute as the footnote points to; e.g. `<a href="#ftn1" epub:type="footnote"><sup>3</sup></a></span>`, pointing to `<aside id="ftn3">`.
@@ -68,6 +68,7 @@ module Html2Doc
68
68
  realSize = ImageSize.path(path).size
69
69
  s = [i["width"].to_i, i["height"].to_i]
70
70
  s = realSize if s[0].zero? && s[1].zero?
71
+ return [nil, nil] if realSize[0].nil? || realSize[1].nil?
71
72
  s[1] = s[0] * realSize[1] / realSize[0] if s[1].zero? && !s[0].zero?
72
73
  s[0] = s[1] * realSize[0] / realSize[1] if s[0].zero? && !s[1].zero?
73
74
  s = [(s[0] * maxheight / s[1]).ceil, maxheight] if s[1] > maxheight
@@ -1,3 +1,3 @@
1
1
  module Html2Doc
2
- VERSION = "1.0.1".freeze
2
+ VERSION = "1.0.2".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html2doc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities