diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2018-10-10 23:59:16 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-10 23:59:16 -0600 |
| commit | 22ee042aca0ade8a642974a737bb3bf08a549201 (patch) | |
| tree | 78370ad46b458d77a9caf7aabc1edc77b9936758 /test | |
| parent | 191b740d78c05c554391dba8a33331266f73f981 (diff) | |
don't hide URI scheme if target of link macro is a bare URI scheme (PR #2909)
Diffstat (limited to 'test')
| -rw-r--r-- | test/links_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/links_test.rb b/test/links_test.rb index a78664a9..0c122f2b 100644 --- a/test/links_test.rb +++ b/test/links_test.rb @@ -26,6 +26,15 @@ context 'Links' do assert_xpath "//a[@href='file:///etc/app.conf'][text() = '/etc/app.conf']", convert_string('Edit the configuration file link:file:///etc/app.conf[]', :attributes => {'hide-uri-scheme' => ''}) end + test 'should not hide bare URI scheme in implicit text of link macro when hide-uri-scheme is set' do + { + 'link:https://[]' => 'https://', + 'link:ssh://[]' => 'ssh://' + }.each do |input, expected| + assert_xpath %(/a[text() = "#{expected}"]), (convert_inline_string input, :attributes => { 'hide-uri-scheme' => '' }) + end + end + test 'qualified url with label' do assert_xpath "//a[@href='http://asciidoc.org'][text() = 'AsciiDoc']", convert_string("We're parsing http://asciidoc.org[AsciiDoc] markup") end |
