softcover 1.1.3 → 1.1.4

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: fd863f861b3394c5cb300f0b6dc79a7be8c8f3cb
4
- data.tar.gz: 222798d2ba36fa0ec9a01af5361034dac5347d81
3
+ metadata.gz: 0bb170c78891bfe1745b87f131e45926f1cda9d6
4
+ data.tar.gz: 413605cac3d518143bd413c20c4115ed0ec583ee
5
5
  SHA512:
6
- metadata.gz: e8aa51576acccb92988f671f8ca30da2afd8eb8c729ac36343ef2e69b1ae9dd99d21f0180a77f67b7ae285c43e1885f0c7674b3a0e99ffe1fb80c476f2adf777
7
- data.tar.gz: c7ec4ed4b13afc6e21af0bfd60f7b984e163c24cc0929994b47d8d4c46dcb374bd1ef5c83f56ce325c61b99f753927bddbaad6f72abccb7a7db6c78e047ccc3f
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.title}</a>)
533
+ %(<a href="#{chapter.fragment_name}">#{chapter.html_title}</a>)
534
534
  end
535
535
 
536
536
  # Returns the HTML template for a chapter.
@@ -1,3 +1,3 @@
1
1
  module Softcover
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.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: 1.1.3
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-05-29 00:00:00.000000000 Z
12
+ date: 2015-06-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: polytexnic