summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2024-05-16 01:08:07 -0600
committerDan Allen <dan.j.allen@gmail.com>2024-05-16 01:08:07 -0600
commitd3ded5a0d5b39556d5a0d04a8c9af0acecb8f759 (patch)
treebf759fd424e2fb6187c73ea275b117b0d77a24ec
parent996cc9eee7445ae9b40b9023891fbabf16f70b2b (diff)
add test for link macro inside xref shorthand
-rw-r--r--test/links_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/links_test.rb b/test/links_test.rb
index c78b1b9e..db4f3900 100644
--- a/test/links_test.rb
+++ b/test/links_test.rb
@@ -110,6 +110,11 @@ context 'Links' do
assert_include '<a href="#https://example.com">Example</a>', output
end
+ test 'xref shorthand with link macro as target should be ignored' do
+ output = convert_string_to_embedded '<<link:https://example.com[], Example>>'
+ assert_include '&lt;&lt;<a href="https://example.com" class="bare">https://example.com</a>, Example&gt;&gt;', output
+ end
+
test 'autolink containing text enclosed in angle brackets' do
output = convert_string_to_embedded 'https://github.com/<org>/'
assert_include '<a href="https://github.com/&lt;org&gt;/" class="bare">https://github.com/&lt;org&gt;/</a>', output