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 +4 -4
- data/lib/polytexnic/postprocessors/html.rb +5 -0
- data/lib/polytexnic/version.rb +1 -1
- data/spec/to_html/footnote_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c232d21ed27bff434a2f5c71115f16467589958c
|
|
4
|
+
data.tar.gz: 4489ddc0c8847d3b474ffb42e5e18ea56de0f1d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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)
|
data/lib/polytexnic/version.rb
CHANGED
|
@@ -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}
|