Skip to content

Commit

Permalink
add test for link macro inside xref shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed May 16, 2024
1 parent 09e150a commit 5cf3834
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/links_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
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
Expand Down

0 comments on commit 5cf3834

Please sign in to comment.