softcover 0.6.3 → 0.6.4

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
  SHA1:
3
- metadata.gz: 10050a73b2276354c459a451a053cfbad32209fe
4
- data.tar.gz: 97e8bf921f4323d76ce8c4065bca10dbc7c888a3
3
+ metadata.gz: f8855f559e23066653d09c84f881e0b6d62c9ee2
4
+ data.tar.gz: c40be99540d1b7a6e6b6414ef32ca1abda8ce197
5
5
  SHA512:
6
- metadata.gz: 1202e237981b7afc03e48585cd3150c52a7e432120fb7954dd6d14acf8637bca4cffd493550ba3e8aba554b002df15554685bf547816cdbebd2992c2f04239ab
7
- data.tar.gz: 14dbbc6c586b8b402e7bb22d3e1c824c64daf911d353ea39f5fe01ca85af7cac231e061d9a45fdf06ba8fb4e4e07c5fa9ea9d99fe5965cbd7ceb8682429d7988
6
+ metadata.gz: 3c488cfc0ee57eb8ffab079cd39000e74ccca4a639d4383641c9e84760e6efb2f3a37cf9b58abc09b95fed1d5f9fc7cee5b4b0dab7d57e2dc055e21beda7a2c0
7
+ data.tar.gz: e4ed998cda5b744c031c17c90cc9bc6528320b01bdb9997afbbf5dc521ae223608c6f365329e93b5c265f678b0792c77965f18ed6888b0eec62d0a5d2c61233e
File without changes
@@ -87,7 +87,7 @@ module Softcover
87
87
  if math?(inner_html)
88
88
  html = html_with_math(chapter, images_dir, texmath_dir, pngs,
89
89
  options)
90
- next if html.nil?
90
+ html ||= inner_html # handle case of spurious math detection
91
91
  else
92
92
  html = inner_html
93
93
  end
@@ -124,8 +124,13 @@ module Softcover
124
124
  raw_source = File.read('phantomjs_source.html')
125
125
  source = strip_attributes(Nokogiri::HTML(raw_source))
126
126
  rm 'phantomjs_source.html'
127
- # Remove the first body div, which is the hidden MathJax SVGs
128
- source.at_css('body div').remove
127
+ # Remove the first body div, which is the hidden MathJax SVGs.
128
+ if (mathjax_svgs = source.at_css('body div'))
129
+ mathjax_svgs.remove
130
+ else
131
+ # There's not actually any math, so return nil.
132
+ return nil
133
+ end
129
134
  # Remove all the unneeded raw TeX displays.
130
135
  source.css('script').each(&:remove)
131
136
  # Remove all the MathJax preview spans.
data/lib/softcover/cli.rb CHANGED
@@ -6,7 +6,7 @@ module Softcover
6
6
 
7
7
  map "-v" => :version
8
8
 
9
- desc "version", "Returns the version number"
9
+ desc "version", "Return the version number"
10
10
  method_option :version, aliases: '-v',
11
11
  desc: "Print version number", type: :boolean
12
12
  def version
@@ -135,7 +135,7 @@ module Softcover
135
135
  publish_screencasts! options.merge(dir: dir)
136
136
  end
137
137
 
138
- desc "unpublish", "Removes book from Softcover"
138
+ desc "unpublish", "Remove book from Softcover"
139
139
  def unpublish
140
140
  require 'softcover/commands/publisher'
141
141
 
@@ -153,7 +153,7 @@ module Softcover
153
153
  # ===============================================
154
154
  # Deployment
155
155
  # ===============================================
156
- desc "deploy", "Build & publish book (configure using .softcover-deploy)"
156
+ desc "deploy", "Build & publish book"
157
157
  def deploy
158
158
  Softcover::Commands::Deployment.deploy!
159
159
  end
@@ -162,7 +162,7 @@ module Softcover
162
162
  # Generator
163
163
  # ===============================================
164
164
 
165
- desc "new <name>", "Generate new book directory structure."
165
+ desc "new <name>", "Generate new book directory structure"
166
166
  method_option :polytex,
167
167
  :type => :boolean,
168
168
  :default => false,
@@ -216,7 +216,7 @@ module Softcover
216
216
  config
217
217
  end
218
218
 
219
- desc "config:remove key", "Remove the key from your local config vars"
219
+ desc "config:remove key", "Remove key from local config vars"
220
220
  define_method "config:remove" do |key|
221
221
  require "softcover/config"
222
222
  Softcover::Config[key] = nil
@@ -1,5 +1,9 @@
1
1
  # Another chapter
2
2
 
3
- This is another chapter.[^numbering]
3
+ This is another chapter.[^numbering] It also has a little code fencing, mainly to test an edge case where math syntax appears in a non-math context:
4
+
5
+ ```console
6
+ $ find . \( -name \*.gemspec -or -name \*.jpg \) -type f
7
+ ```
4
8
 
5
9
  [^numbering]: Footnotes are numbered on a per-chapter basis.
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "0.6.3"
2
+ VERSION = "0.6.4"
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: 0.6.3
4
+ version: 0.6.4
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: 2013-11-20 00:00:00.000000000 Z
12
+ date: 2013-11-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic
@@ -364,6 +364,7 @@ files:
364
364
  - .pull_requests/1384447036
365
365
  - .pull_requests/1384468478
366
366
  - .pull_requests/1384801823
367
+ - .pull_requests/1385070261
367
368
  - .rspec
368
369
  - .ruby-gemset
369
370
  - .ruby-version