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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ea75e082b4b0c27b3bd08a4d9aea82779e7b3ff6
4
- data.tar.gz: de35d7c74739091b91bc05141b795e27896b51d8
3
+ metadata.gz: fba6e4a65a2627cecc632c2f0a2f2eb92b7dc60a
4
+ data.tar.gz: 46f45a9e9a1538ccaa7ffa63dff8656155f5692b
5
5
  SHA512:
6
- metadata.gz: 08a9c5538898eadb7743bebcce0c96e5f1e0b8c63e47071cc22f192bc7724815e8b66137e588f2628c211c58205ec05d85ed7d6cc58fb029622b11a3a4643955
7
- data.tar.gz: d1696cf959c041f6f2920847d6f4a6951f1b23d8a1bca0bf2378a4fe9a07092b51abbe95f57c10240c35a3ee74531d3dd72fed069f9d38d8783d827655a3d4fe
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
- !!string.match(/(?:\\\(|\\\[|\\begin{equation})/)
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)
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.1.19"
2
+ VERSION = "1.1.20"
3
3
  end
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.19
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-04 00:00:00.000000000 Z
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.2.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