class Asciidoctor::Converter::DocBook5Converter
def convert_inline_indexterm node
def convert_inline_indexterm node if (see = node.attr 'see') rel = %(\n<see>#{see}</see>) elsif (see_also_list = node.attr 'see-also') rel = see_also_list.map {|see_also| %(\n<seealso>#{see_also}</seealso>) }.join else rel = '' end if node.type == :visible %(<indexterm> rimary>#{node.text}</primary>#{rel} indexterm>#{node.text}) elsif (numterms = (terms = node.attr 'terms').size) > 2 %(<indexterm> rimary>#{terms[0]}</primary><secondary>#{terms[1]}</secondary><tertiary>#{terms[2]}</tertiary>#{rel} indexterm>#{(node.document.option? 'indexterm-promotion') ? %[ ndexterm> rimary>#{terms[1]}</primary><secondary>#{terms[2]}</secondary> indexterm> ndexterm> rimary>#{terms[2]}</primary> indexterm>] : ''}) elsif numterms > 1 %(<indexterm> rimary>#{terms[0]}</primary><secondary>#{terms[1]}</secondary>#{rel} indexterm>#{(node.document.option? 'indexterm-promotion') ? %[ ndexterm> rimary>#{terms[1]}</primary> indexterm>] : ''}) else %(<indexterm> rimary>#{terms[0]}</primary>#{rel} indexterm>) end end