softcover 1.1.19 → 1.1.20
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 +4 -4
- data/lib/softcover/builders/epub.rb +12 -2
- data/lib/softcover/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fba6e4a65a2627cecc632c2f0a2f2eb92b7dc60a
|
|
4
|
+
data.tar.gz: 46f45a9e9a1538ccaa7ffa63dff8656155f5692b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f12ee25389eb93f3d5a396d8f34ba0945fcbc585d9ee09388030a5c1dab7826930ca71f32079b2a8f4c9f75b788bf34266aa7da86a16e53e3b663777f1d6096a
|
|
7
|
+
data.tar.gz: 83e84c89005d54a5291901926a1d72964627004290229aabe776dd211fcf5f4022de60c54f4a8139fbfbcecf3997e431888720983284a0b84e59f737bb61d2ab
|
|
@@ -272,7 +272,7 @@ module Softcover
|
|
|
272
272
|
return nil unless File.exist?('phantomjs_source.html')
|
|
273
273
|
raw_source = File.read('phantomjs_source.html')
|
|
274
274
|
source = strip_attributes(Nokogiri::HTML(raw_source))
|
|
275
|
-
rm 'phantomjs_source.html'
|
|
275
|
+
# rm 'phantomjs_source.html'
|
|
276
276
|
# Remove the first body div, which is the hidden MathJax SVGs.
|
|
277
277
|
if (mathjax_svgs = source.at_css('body div'))
|
|
278
278
|
mathjax_svgs.remove
|
|
@@ -354,8 +354,18 @@ module Softcover
|
|
|
354
354
|
# This gives a false positive when math is included in verbatim
|
|
355
355
|
# environments and nowhere else, but it does little harm (requiring only
|
|
356
356
|
# an unnecessary call to page.js).
|
|
357
|
+
# The regex includes both standard (La)TeX and amsmath extensions.
|
|
357
358
|
def math?(string)
|
|
358
|
-
|
|
359
|
+
math_regex = /(?:\\\(
|
|
360
|
+
|\\\[
|
|
361
|
+
|\\begin{(?:equation
|
|
362
|
+
|align
|
|
363
|
+
|gather
|
|
364
|
+
|flalign
|
|
365
|
+
|multline
|
|
366
|
+
|alignat
|
|
367
|
+
|split))/x
|
|
368
|
+
!!string.match(math_regex)
|
|
359
369
|
end
|
|
360
370
|
|
|
361
371
|
def create_style_files(options)
|
data/lib/softcover/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: softcover
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.20
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Hartl
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-12-
|
|
12
|
+
date: 2015-12-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: polytexnic
|
|
@@ -1652,7 +1652,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1652
1652
|
version: '0'
|
|
1653
1653
|
requirements: []
|
|
1654
1654
|
rubyforge_project:
|
|
1655
|
-
rubygems_version: 2.
|
|
1655
|
+
rubygems_version: 2.4.5
|
|
1656
1656
|
signing_key:
|
|
1657
1657
|
specification_version: 4
|
|
1658
1658
|
summary: An ebook production system & sales and marketing platform for technical authors
|