diff --git a/lib/asciidoctor-epub3/converter.rb b/lib/asciidoctor-epub3/converter.rb
index 8786adf..7537dae 100644
--- a/lib/asciidoctor-epub3/converter.rb
+++ b/lib/asciidoctor-epub3/converter.rb
@@ -838,15 +838,30 @@ def convert_table(node)
end
def convert_colist(node)
- lines = ['
-
']
- num = CALLOUT_START_NUM
- node.items.each_with_index do |item, i|
- lines << %(- #{num} #{item.text}#{item.content if item.blocks?}
)
- num = num.next
+ lines = ['']
+ font_icons = (node.document.attr? 'icons', 'font')
+ if font_icons
+ num = CALLOUT_START_NUM
+ lines << '
'
+ node.items.each_with_index do |item, i|
+ lines << %(- #{num} #{item.text}#{item.content if item.blocks?}
)
+ num = num.next
+ end
+ lines << '
'
+ else
+ num = 1
+ lines << '
'
+ node.items.each_with_index do |item, i|
+ lines << ''
+ lines << %( | )
+ lines << %(#{item.text}#{item.blocks? ? LF + item.content : ''} | )
+ lines << '
'
+ register_media_file node, "#{node.icon_uri "callouts/#{i + 1}"}", 'image'
+ num = num.next
+ end
+ lines << '
'
end
- lines << '
-
'
+ lines << '
'
end
# TODO: add complex class if list has nested blocks
@@ -1243,10 +1258,17 @@ def convert_inline_button(node)
end
def convert_inline_callout(node)
- num = CALLOUT_START_NUM
- int_num = node.text.to_i
- (int_num - 1).times { num = num.next }
- %(#{num})
+ lines = ''
+ font_icons = (node.document.attr? 'icons', 'font')
+ if font_icons
+ num = CALLOUT_START_NUM
+ int_num = node.text.to_i
+ (int_num - 1).times { num = num.next }
+ %(#{num})
+ else
+ src = node.icon_uri("callouts/#{node.text}")
+ lines << %()
+ end
end
# @param node [Asciidoctor::Inline]