polytexnic 1.5.2 → 1.5.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
  SHA256:
3
- metadata.gz: 6c446b2fb998709a77a87e98ba9af120969006b56484734a32293cbaca231033
4
- data.tar.gz: 3f47c7501336770234680a56af3b4115aeb3c831b04410256a0f6d52d602a407
3
+ metadata.gz: 7b4b340dbc85f6c307919402cdedc7400e1bfe4d75050c872e8660403ac6a61c
4
+ data.tar.gz: ee6e3c37e601780d5007f371e8df92b6015e4991518ad5e5e07f6d74384d56da
5
5
  SHA512:
6
- metadata.gz: 70d14a3eceafb2fb6bf73bf6f8bebff97467942ac3cf1097bf92c4958667d4a163162766383ec9c3e03f9d637ec555ff801fd547d0536e656aa4ffe958d44fdf
7
- data.tar.gz: 390ea1b062ad18eec86bca19632cf66c8f1832a6d7e9d417441e90e653ee38decfbf0759732e494f655eb41b96d1137e302aa15a61b16fec95cb442d1728ad52
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 = "<sup>#{fnsymbol(i)}</sup>"
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 = reflink.to_xhtml + ' ' +
357
+ first_paragraph.inner_html = refhtml + ' ' +
356
358
  first_paragraph.inner_html
357
359
  html = footnote.inner_html
358
- else
359
- html = "#{reflink.to_xhtml} #{footnote.inner_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
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
3
3
  end
@@ -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">&lt;sup&gt;*&lt;/sup&gt;</a> Cicero</div>
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">&lt;sup&gt;*&lt;/sup&gt;</a> <em>Still</em> Cicero.</p>
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">&lt;sup&gt;†&lt;/sup&gt;</a> Lennon/McCartney</div>
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.2
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-29 00:00:00.000000000 Z
12
+ date: 2018-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri