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 +4 -4
- data/lib/polytexnic/postprocessors/html.rb +9 -3
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/core_spec.rb +2 -2
- 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: 62df77f161349a83b730391e7507b83a2455556d
|
|
4
|
+
data.tar.gz: 753832e7c4f16b98a3756f6448280b7770266319
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
876
|
-
|
|
877
|
-
|
|
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
|
|
data/lib/polytexnic/version.rb
CHANGED
data/spec/to_html/core_spec.rb
CHANGED
|
@@ -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.
|
|
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-
|
|
12
|
+
date: 2015-06-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: nokogiri
|