summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-05-28 02:33:37 -0600
committerDan Allen <dan.j.allen@gmail.com>2021-05-28 02:38:00 -0600
commitc4b514ff4acb94cc497a4e85aaca6f4c15b14399 (patch)
tree31664166cd84dbb396c7c1c4e836c95547c725a2 /test
parent2722782c00667c68e102aa5543139019ef94e006 (diff)
use automatic link text if ID in shorthand xref is followed by dangling comma
Diffstat (limited to 'test')
-rw-r--r--test/links_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/links_test.rb b/test/links_test.rb
index 7a416f9d..05756d47 100644
--- a/test/links_test.rb
+++ b/test/links_test.rb
@@ -486,6 +486,16 @@ context 'Links' do
assert_xpath '//a[@href="#tigers"][text() = "Tigers"]', convert_string(input), 1
end
+ test 'xref should use title of target as link text when explicit link text is empty' do
+ input = <<~'EOS'
+ <<tigers,>>
+
+ [#tigers]
+ == Tigers
+ EOS
+ assert_xpath '//a[@href="#tigers"][text() = "Tigers"]', convert_string(input), 1
+ end
+
test 'xref using angled bracket syntax with quoted label' do
input = <<~'EOS'
<<tigers,"About Tigers">>