diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2024-02-20 13:15:29 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2024-02-20 13:15:29 -0700 |
| commit | b6411d9a7d07d34bcb2c469cbe81bd54a929919f (patch) | |
| tree | 4ef91998d0ae545a751b48ea6bb06dcedf05cb1e | |
| parent | 1905d842ea245a03550f5e60e1824c728f89e4a6 (diff) | |
update comments regarding link processing [skip ci]
| -rw-r--r-- | lib/asciidoctor/substitutors.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/asciidoctor/substitutors.rb b/lib/asciidoctor/substitutors.rb index 5d65f4bb..3f5bd6af 100644 --- a/lib/asciidoctor/substitutors.rb +++ b/lib/asciidoctor/substitutors.rb @@ -568,7 +568,7 @@ module Substitutors # move trailing ; out of URL suffix = ';' end - # NOTE handle case when modified target is a URI scheme (e.g., http://) + # NOTE handle case when modified target is a bare URI scheme (e.g., http://) next $& if target == $3 when ':' if (target = target.chop).end_with? ')' @@ -579,7 +579,7 @@ module Substitutors # move trailing : out of URL suffix = ':' end - # NOTE handle case when modified target is a URI scheme (e.g., http://) + # NOTE handle case when modified target is a bare URI scheme (e.g., http://) next $& if target == $3 end end @@ -605,12 +605,12 @@ module Substitutors end if new_link_text && new_link_text.empty? - # NOTE it's not possible for the URI scheme to be bare in this case + # NOTE the modified target will not be a bare URI scheme (e.g., http://) in this case link_text = (doc_attrs.key? 'hide-uri-scheme') ? (target.sub UriSniffRx, '') : target bare = true end else - # NOTE it's not possible for the URI scheme to be bare in this case + # NOTE the modified target will not be a bare URI scheme (e.g., http://) in this case link_text = (doc_attrs.key? 'hide-uri-scheme') ? (target.sub UriSniffRx, '') : target bare = true end |
