diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-04-25 01:36:16 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2023-04-25 01:37:24 -0600 |
| commit | b3a03af9fea232f4112e8af9d39e23ba84ec1a59 (patch) | |
| tree | d49acd6c47403f75f97bc94a3081412dfc597aea /lib | |
| parent | 36b4d1862dc8b276e480da28cdb61c3d55919015 (diff) | |
don't swallow square brackets when processing escaped URL macro
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/substitutors.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asciidoctor/substitutors.rb b/lib/asciidoctor/substitutors.rb index 5dc4cc59..49f0a092 100644 --- a/lib/asciidoctor/substitutors.rb +++ b/lib/asciidoctor/substitutors.rb @@ -529,7 +529,7 @@ module Substitutors text = text.gsub InlineLinkRx do if (target = $2).start_with? RS # honor the escape - next %(#{$1}#{target.slice 1, target.length}#{$4}) + next ($&.slice 0, (rs_idx = $1.length)) + ($&.slice rs_idx + 1, $&.length) end prefix, suffix = $1, '' |
