epuber 0.5.3 → 0.5.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
  SHA256:
3
- metadata.gz: a6a67f5875818b18606d58bcf55c2095419e2a48b5f7766627d4196d7bf733c8
4
- data.tar.gz: 99b80c62fe55f485d6da21d9be273891ea4ebb7383476099972902d8d8aae014
3
+ metadata.gz: af52b1d6873c8846c792bbe5efd95396128dd56e843786706d52c5bda38ccf51
4
+ data.tar.gz: 209c3daec98a872b4cf91f9b1da2e0ccdf52305e91cb0ecfb3750595567dda42
5
5
  SHA512:
6
- metadata.gz: 0753d03cf0e27538cc09a95fccec5dac1299bcbec5e1d739e8718e59b870e91b523311627609fc303b0aa143b9fd0582925b8a1feb75f66b236943d6d975957a
7
- data.tar.gz: 13efd113cdd854e03dc17d62786d17fab9e0d7b3554eeca8caa5ddd2e5062eba15ef6c73a65eb2c24b7173873b9481d1538dd6919ad43ac135a12cf471d4c727
6
+ metadata.gz: 9f268936a200ed6240cec25aaf0ed2aa5dec6894ce955847f37ad749ec18361edad9fa33d7ec555d07c1ea48c2da014c1860c75f1257609c80d97ea1432a40d1
7
+ data.tar.gz: 6e0a3672b32f57dc84b613de1169340fab3c0ac00a0dc6b4dace00785bcca45d93c9cad54abc3bc50dd8d36eccfd237222b3e284d4586dc037b7f0768f72c446
@@ -98,13 +98,6 @@ module Epuber
98
98
  XHTMLProcessor.add_missing_root_elements(xhtml_doc, book.title, target.epub_version)
99
99
  end
100
100
 
101
- UI.print_step_processing_time('adding default things') do
102
- XHTMLProcessor.add_styles(xhtml_doc, default_styles(target, file_resolver))
103
- XHTMLProcessor.add_scripts(xhtml_doc, default_scripts(target, file_resolver))
104
-
105
- XHTMLProcessor.add_viewport(xhtml_doc, target.default_viewport) unless target.default_viewport.nil?
106
- end
107
-
108
101
  # resolve links to files, add other linked resources and compute correct path
109
102
  UI.print_step_processing_time('resolving links') do
110
103
  XHTMLProcessor.resolve_links(xhtml_doc, destination_path, file_resolver.dest_finder)
@@ -119,6 +112,13 @@ module Epuber
119
112
  XHTMLProcessor.resolve_stylesheets(xhtml_doc, destination_path, file_resolver)
120
113
  end
121
114
 
115
+ UI.print_step_processing_time('adding default things') do
116
+ XHTMLProcessor.add_styles(xhtml_doc, default_styles(target, file_resolver))
117
+ XHTMLProcessor.add_scripts(xhtml_doc, default_scripts(target, file_resolver))
118
+
119
+ XHTMLProcessor.add_viewport(xhtml_doc, target.default_viewport) unless target.default_viewport.nil?
120
+ end
121
+
122
122
  XHTMLProcessor.resolve_mathml_namespace(xhtml_doc)
123
123
 
124
124
  UI.print_step_processing_time('investigating properties') do
@@ -257,7 +257,9 @@ module Epuber
257
257
  # @return [String]
258
258
  #
259
259
  def create_id_from_path(path)
260
- path && path.gsub('/', '.')
260
+ return nil if path.nil?
261
+
262
+ path.gsub('/', '.').gsub(/^[0-9]*/, '')
261
263
  end
262
264
 
263
265
  # Creates proper mime-type for file
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Epuber
3
- VERSION = '0.5.3'
3
+ VERSION = '0.5.4'
4
4
 
5
5
  HOME_URL = 'https://github.com/epuber-io/epuber'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epuber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Kříž
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-12 00:00:00.000000000 Z
11
+ date: 2018-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport