Skip to content

Commit

Permalink
add test for autolink that contains text enclosed in angle brackets a…
Browse files Browse the repository at this point in the history
…nd ends with /
  • Loading branch information
mojavelinux committed Mar 15, 2024
1 parent 603582a commit 340b531
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 @@ -105,6 +105,11 @@
assert_xpath '//p[text()="<http://asciidoc.org>"]', convert_string('<\\http://asciidoc.org>'), 1
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
end

test 'qualified url surrounded by round brackets' do
assert_xpath '//a[@href="http://asciidoc.org"][text()="http://asciidoc.org"]', convert_string('(http://asciidoc.org) is the project page for AsciiDoc.'), 1
end
Expand Down

0 comments on commit 340b531

Please sign in to comment.