polytexnic 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polytexnic/postprocessors/html.rb +6 -4
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/footnote_spec.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b4b340dbc85f6c307919402cdedc7400e1bfe4d75050c872e8660403ac6a61c
|
4
|
+
data.tar.gz: ee6e3c37e601780d5007f371e8df92b6015e4991518ad5e5e07f6d74384d56da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30862e9956f342f3d2ffc3de7dae859d19e412eea038ad7525557f45902729aedd8b840dd40103b961309b849ff329119cc65adab842243910678216b076e2ae
|
7
|
+
data.tar.gz: da30fe166d08c580d1b53a2ea3609e45084095f62ec872ffcf96b7b73d8609225df8546cd979041b59a2cb8bf5dbc008444e5c3f1824883b23edd68bedd4b642
|
@@ -346,17 +346,19 @@ module Polytexnic
|
|
346
346
|
reflink = Nokogiri::XML::Node.new('a', doc)
|
347
347
|
reflink['class'] = 'footnote-link'
|
348
348
|
if footnote_symbols?
|
349
|
-
reflink.content =
|
349
|
+
reflink.content = fnsymbol(i)
|
350
350
|
else
|
351
351
|
reflink.content = "#{n}."
|
352
352
|
end
|
353
353
|
reflink['href'] = footnote_ref_href(chapter_number, n)
|
354
|
+
refhtml = reflink.to_xhtml
|
355
|
+
refhtml = "<sup>#{refhtml}</sup>" if footnote_symbols?
|
354
356
|
if (first_paragraph = footnote.css('p').first)
|
355
|
-
first_paragraph.inner_html =
|
357
|
+
first_paragraph.inner_html = refhtml + ' ' +
|
356
358
|
first_paragraph.inner_html
|
357
359
|
html = footnote.inner_html
|
358
|
-
|
359
|
-
html = "#{
|
360
|
+
elsif
|
361
|
+
html = "#{refhtml} #{footnote.inner_html}"
|
360
362
|
end
|
361
363
|
note.inner_html = html
|
362
364
|
footnotes_node.add_child note
|
data/lib/polytexnic/version.rb
CHANGED
@@ -124,17 +124,17 @@ describe 'Polytexnic::Pipeline#to_html' do
|
|
124
124
|
</div>
|
125
125
|
<div id="cha-1_footnotes">
|
126
126
|
<div class="footnotes nonumbers">
|
127
|
-
<div id="cha-1_footnote-1" class="footnote"><a class="footnote-link" href="#cha-1_footnote-ref-1"
|
127
|
+
<div id="cha-1_footnote-1" class="footnote"><sup><a class="footnote-link" href="#cha-1_footnote-ref-1">*</a></sup> Cicero</div>
|
128
128
|
</div>
|
129
129
|
</div><div id="cha-bar" data-tralics-id="cid3" class="chapter" data-number="2"><h1><a href="#cha-bar" class="heading"><span class="number">Chapter 2 </span>Bar</a></h1>
|
130
130
|
<p class="noindent">Dolor sit amet.<sup id="cha-2_footnote-ref-1" class="footnote"><a href="#cha-2_footnote-1">*</a></sup></p>
|
131
131
|
<p>Hey Jude!<sup id="cha-2_footnote-ref-2" class="footnote intersentence"><a href="#cha-2_footnote-2">†</a></sup><span class="intersentencespace"></span> Be afraid.<span class="intersentencespace"></span> </p></div>
|
132
132
|
<div id="cha-2_footnotes">
|
133
133
|
<div class="footnotes nonumbers">
|
134
|
-
<div id="cha-2_footnote-1" class="footnote"><p><a class="footnote-link" href="#cha-2_footnote-ref-1"
|
134
|
+
<div id="cha-2_footnote-1" class="footnote"><p><sup><a class="footnote-link" href="#cha-2_footnote-ref-1">*</a></sup> <em>Still</em> Cicero.</p>
|
135
135
|
<p>And Catullus.</p>
|
136
136
|
</div>
|
137
|
-
<div id="cha-2_footnote-2" class="footnote"><a class="footnote-link" href="#cha-2_footnote-ref-2"
|
137
|
+
<div id="cha-2_footnote-2" class="footnote"><sup><a class="footnote-link" href="#cha-2_footnote-ref-2">†</a></sup> Lennon/McCartney</div>
|
138
138
|
</div>
|
139
139
|
</div>
|
140
140
|
EOS
|
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.5.
|
4
|
+
version: 1.5.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: 2018-05-
|
12
|
+
date: 2018-05-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|