polytexnic 0.9.7 → 0.9.8

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: 6da0877dfce214d0d1e16f8434b9ad95c653914c
4
- data.tar.gz: 9671da453eb0ec95395e25114e6dc430365dad8c
3
+ metadata.gz: c232d21ed27bff434a2f5c71115f16467589958c
4
+ data.tar.gz: 4489ddc0c8847d3b474ffb42e5e18ea56de0f1d7
5
5
  SHA512:
6
- metadata.gz: 0edc65d818362a83248467810f0a4fc966eb2e3864d8ee50f3827b63af7539aa9fa6ae8a70282492f71913c10101224f10a81a450d0e3e2deedc0fd98ff0dd9c
7
- data.tar.gz: 6d999209a71e179e77cef2dd84322f79370b8450bed9d690751f498bcb41615dd9a87eafb2306ae493c15cfb874db96f7bd9d6db5dbafbfc9d128947ae73b6a4
6
+ metadata.gz: e797cba3b511b53641cf3dc2b47a1c56eeaab7c7a4c4dde696614acc908f8b634ae9c69977185a3afdffda9c6d9d7a3bf6aeb1db071f6fea46fd9d4a3d723809
7
+ data.tar.gz: 11d6f921adf4845ecccea201475fe1cd73c5356dd4eb3e054bc41ce0e4789477ec1e7430770a8c05484ce482ae891149f038323fcc8e6075d2b928db8b9ec740
@@ -342,6 +342,11 @@ module Polytexnic
342
342
  content = footnote_symbols? ? fnsymbol(i) : n.to_s
343
343
  link.content = content
344
344
  node.inner_html = link
345
+ # Support footnotes in chapter & section headings.
346
+ if node.parent['class'] == 'heading'
347
+ # Move footnote outside section anchor tag.
348
+ node.parent = node.parent.parent
349
+ end
345
350
  # Add an inter-sentence space if appropriate.
346
351
  previous_character = node.previous_sibling.content[-1]
347
352
  end_of_sentence = %w[. ! ?].include?(previous_character)
@@ -1,3 +1,3 @@
1
1
  module Polytexnic
2
- VERSION = "0.9.7"
2
+ VERSION = "0.9.8"
3
3
  end
@@ -103,6 +103,11 @@ describe 'Polytexnic::Pipeline#to_html' do
103
103
  it { should resemble output }
104
104
  end
105
105
 
106
+ describe "in a chapter title" do
107
+ let(:polytex) { '\chapter{A chapter\protect\footnote{A footnote}}' }
108
+ it { should include '</a><sup id="cha-1_footnote-ref-1" class="footnote"><a href="#cha-1_footnote-1">1</a></sup>' }
109
+ end
110
+
106
111
  describe "symbols in place of numbers" do
107
112
  let(:polytex) do <<-'EOS'
108
113
  \documentclass{book}
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: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hartl