softcover 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/softcover/book_manifest.rb +6 -0
- data/lib/softcover/builders/epub.rb +1 -1
- data/lib/softcover/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bb170c78891bfe1745b87f131e45926f1cda9d6
|
4
|
+
data.tar.gz: 413605cac3d518143bd413c20c4115ed0ec583ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1563cc8901a77baeda85503af89f81a18c2d3e606da1563f709dbc0e190ea9b01ca554862798d82dcbf1271a4e08807704ed12ad85db16ac5bbf563166e04287
|
7
|
+
data.tar.gz: b650ef1c0319d530ad217ec18007b9ba83972db42a8201040b3680627ec5bfc375be5e47f0d9fb0f9c0d8fa4bc9946733d08383ad7fd5a59220b401ae0214c3e
|
@@ -60,6 +60,12 @@ class Softcover::BookManifest < OpenStruct
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
+
# Run the title through the Polytexnic pipeline to make an HTML title.
|
64
|
+
def html_title
|
65
|
+
Nokogiri::HTML(Polytexnic::Pipeline.new(title).to_html).at_css('p')
|
66
|
+
.inner_html.strip
|
67
|
+
end
|
68
|
+
|
63
69
|
def to_hash
|
64
70
|
marshal_dump.merge({ menu_heading: menu_heading })
|
65
71
|
end
|
@@ -530,7 +530,7 @@ module Softcover
|
|
530
530
|
|
531
531
|
# Returns a navigation link for the chapter.
|
532
532
|
def nav_link(chapter)
|
533
|
-
%(<a href="#{chapter.fragment_name}">#{chapter.
|
533
|
+
%(<a href="#{chapter.fragment_name}">#{chapter.html_title}</a>)
|
534
534
|
end
|
535
535
|
|
536
536
|
# Returns the HTML template for a chapter.
|
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.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: 2015-
|
12
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: polytexnic
|