diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-04-18 23:53:23 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2021-04-19 01:19:21 -0600 |
| commit | d2bceefd241f922365389201da34349afbb67baa (patch) | |
| tree | c774c4b26f00a47a79c292a10488bf151d451ef5 | |
| parent | 1d7f4d5dcdc879f2d7a17e1b4459ad9510987971 (diff) | |
don't call apply_subs for custom inline macro if no subs are resolved
| -rw-r--r-- | lib/asciidoctor/substitutors.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/substitutors.rb b/lib/asciidoctor/substitutors.rb index 501e15de..46b44e4c 100644 --- a/lib/asciidoctor/substitutors.rb +++ b/lib/asciidoctor/substitutors.rb @@ -331,8 +331,8 @@ module Substitutors target ||= ext_config[:format] == :short ? content : target end if (Inline === (replacement = extension.process_method[self, target, attributes])) - if (inline_subs = replacement.attributes.delete 'subs') - replacement.text = apply_subs replacement.text, (expand_subs inline_subs) + if (inline_subs = replacement.attributes.delete 'subs') && (inline_subs = expand_subs inline_subs) + replacement.text = apply_subs replacement.text, inline_subs end replacement.convert elsif replacement |
