summaryrefslogtreecommitdiff
path: root/test/substitutions_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2019-06-20 23:55:07 -0600
committerGitHub <noreply@github.com>2019-06-20 23:55:07 -0600
commitd7b0b2ada60b97ecc7fe782538899064f7eff58b (patch)
tree0d6880970314cff1de7cecaf575ec284b9d57b69 /test/substitutions_test.rb
parent0e3d1483fdcdb80f4efcedc89178c03a11e21224 (diff)
resolves #3325 allow a bibliography reference to be used inside a footnote (PR #3344)
Diffstat (limited to 'test/substitutions_test.rb')
-rw-r--r--test/substitutions_test.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/substitutions_test.rb b/test/substitutions_test.rb
index c2a74946..ef16aba1 100644
--- a/test/substitutions_test.rb
+++ b/test/substitutions_test.rb
@@ -1127,6 +1127,20 @@ context 'Substitutions' do
assert_xpath '//a[@class="footnote"][text()="1"]', output, 2
end
+ test 'should be able to reference a bibliography entry in a footnote' do
+ input = <<~'EOS'
+ Choose a design pattern.footnote:[See <<gof>> to find a collection of design patterns.]
+
+ [bibliography]
+ == Bibliography
+
+ * [[[gof]]] Erich Gamma, et al. _Design Patterns: Elements of Reusable Object-Oriented Software._ Addison-Wesley. 1994.
+ EOS
+
+ result = convert_string_to_embedded input
+ assert_include '<a href="#_footnoteref_1">1</a>. See <a href="#gof">[gof]</a> to find a collection of design patterns.', result
+ end
+
test 'a single-line index term macro with a primary term should be registered as an index reference' do
sentence = "The tiger (Panthera tigris) is the largest cat species.\n"
macros = ['indexterm:[Tigers]', '(((Tigers)))']