lib/asciidoctor_fb2.rb in asciidoctor-fb2-0.4.0 vs lib/asciidoctor_fb2.rb in asciidoctor-fb2-0.5.0
- old
+ new
@@ -116,11 +116,26 @@
# @param _node [Asciidoctor::Block]
def convert_toc(_node)
''
end
+ # @param _node [Asciidoctor::Block]
+ def convert_page_break(_node)
+ ''
+ end
+
# @param node [Asciidoctor::Block]
+ def convert_floating_title(node)
+ %(<subtitle id="#{node.id}">#{node.title}</subtitle>)
+ end
+
+ # @param _node [Asciidoctor::Block]
+ def convert_thematic_break(_node)
+ ''
+ end
+
+ # @param node [Asciidoctor::Block]
def convert_paragraph(node)
lines = [
'<p>',
node.content,
'</p>'
@@ -213,10 +228,18 @@
# @param node [Asciidoctor::Inline]
def convert_inline_break(node)
node.text
end
+ # @param node [Asciidoctor::Block]
+ def convert_example(node)
+ lines = []
+ lines << %(<p><strong>#{node.title}:</strong></p>) if node.title?
+ lines << node.content
+ lines * "\n"
+ end
+
# @param node [Asciidoctor::Inline]
def convert_inline_button(node)
%([<strong>#{node.text}</strong>])
end
@@ -255,15 +278,35 @@
def convert_inline_image(node)
image_attrs = register_binary(node, node.image_uri(node.target), 'image')
%(<image #{image_attrs * ' '}/>)
end
+ # @param node [Asciidoctor::Inline]
+ def convert_inline_indexterm(node)
+ node.type == :visible ? node.text : ''
+ end
+
+ # @param node [Asciidoctor::Inline]
+ def convert_inline_callout(node)
+ %(<strong>(#{node.text})</strong>)
+ end
+
+ # @param node [Asciidoctor::List]
+ def convert_colist(node)
+ convert_olist(node)
+ end
+
# @param node [Asciidoctor::Block]
def convert_image(node)
image_attrs = register_binary(node, node.image_uri(node.attr('target')), 'image')
image_attrs << %(title="#{node.captioned_title}") if node.title?
image_attrs << %(id="#{node.id}") if node.id
%(<p><image #{image_attrs * ' '}/></p>)
+ end
+
+ # @param node [Asciidoctor::Block]
+ def convert_open(node)
+ convert_paragraph(node)
end
# @param doc [Asciidoctor::Document]
# @return [Asciidoctor::Document]
def root_document(doc)