polytexnic 1.1.2 → 1.1.3

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: ffa0da9f0eabf3981ff370f0b23acdc29bb90dea
4
- data.tar.gz: 0e7be06e69d07ee9b5d1e93d9e3181e3a045e806
3
+ metadata.gz: 62df77f161349a83b730391e7507b83a2455556d
4
+ data.tar.gz: 753832e7c4f16b98a3756f6448280b7770266319
5
5
  SHA512:
6
- metadata.gz: dd00fada9a193ad3e7f4b396c8f31f3947947128a3c8c020b3b0ca5dde3d1fbbb65d6331f8c76a6de59e130026ac056349e921cbf07db7b8bf4768d30972488d
7
- data.tar.gz: a5fda61dd6487ea6194475c6bd42c2ee2231c3c20a54feaab1a0af5b6a420e636f76b20d9d4daa462d2beacea798196b6c9dd6e8066a1e053717ec0e67365b05
6
+ metadata.gz: f2c3d1ed9db6a4d3d16b5fc5230bdedbc5b326919ce27d665a1e75d7ed5fdc576a789df5d83c653960f8b411169e91a2469011f72daa7e750a24e9765b477ce8
7
+ data.tar.gz: 9a5e6b9b3d0c889e5e4b21cd9b4f8c8cbda956e2afaf9e43b5f60c5f10b646eb0c1ac1f321e107f3f6df4aace1529d873b2102428787ceb794faef4382b95bb9
@@ -872,9 +872,15 @@ module Polytexnic
872
872
  end
873
873
 
874
874
  doc.xpath('//*[@target]').each do |node|
875
- node['href'] = "##{node['target'].gsub(':', '-')}"
876
- node['class'] = 'hyperref'
877
- clean_node node, 'target'
875
+ if node['target'] == '_blank'
876
+ # This branch gets hit when running a title element
877
+ # through the pipeline a second time.
878
+ node['href'] = unescape_special_chars(literal_cache[node['href']])
879
+ else
880
+ node['href'] = "##{node['target'].gsub(':', '-')}"
881
+ node['class'] = 'hyperref'
882
+ clean_node node, 'target'
883
+ end
878
884
  end
879
885
  end
880
886
 
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
@@ -105,7 +105,7 @@ describe 'Polytexnic::Pipeline#to_html' do
105
105
  context "with all elements filled out explicitly" do
106
106
  let(:polytex) do <<-'EOS'
107
107
  \title{Foo \\ \emph{Bar}}
108
- \subtitle{Baz}
108
+ \subtitle{\href{http://example.com/}{Baz}}
109
109
  \author{Michael Hartl}
110
110
  \date{January 1, 2013}
111
111
  \begin{document}
@@ -118,7 +118,7 @@ describe 'Polytexnic::Pipeline#to_html' do
118
118
  should resemble <<-'EOS'
119
119
  <div id="title_page">
120
120
  <h1 class="title">Foo <span class="break"></span> <em>Bar</em></h1>
121
- <h1 class="subtitle">Baz</h1>
121
+ <h1 class="subtitle"><a href="http://example.com/" target="_blank">Baz</a></h1>
122
122
  <h2 class="author">Michael Hartl</h2>
123
123
  <h2 class="date">January 1, 2013</h2>
124
124
  </div>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polytexnic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
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-06-13 00:00:00.000000000 Z
12
+ date: 2015-06-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri