diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-11-26 13:31:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-26 13:31:46 -0700 |
| commit | 45a8c31aea6607775fd6a52b75f8f8bfbf05b1e8 (patch) | |
| tree | 6bb2f72aeca6d0179d41ebbecff2bd593936b326 /lib | |
| parent | d7a6d7b7c725607df2b96663486c278ca01dc0c8 (diff) | |
resolves #3652 honor secondary and tertiary terms on indexterm macro when primary term is quoted and contains = (PR #4511)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/substitutors.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/asciidoctor/substitutors.rb b/lib/asciidoctor/substitutors.rb index d88e0d74..984e6996 100644 --- a/lib/asciidoctor/substitutors.rb +++ b/lib/asciidoctor/substitutors.rb @@ -446,7 +446,14 @@ module Substitutors # indexterm:[Tigers,Big cats] if (attrlist = normalize_text $2, true, true).include? '=' if (primary = (attrs = (AttributeList.new attrlist, self).parse)[1]) - attrs['terms'] = [primary] + terms = [primary] + if (secondary = attrs[2]) + terms << secondary + if (tertiary = attrs[3]) + terms << tertiary + end + end + attrs['terms'] = terms if (see_also = attrs['see-also']) attrs['see-also'] = (see_also.include? ',') ? (see_also.split ',').map {|it| it.lstrip } : [see_also] end |
