lib/asciidoctor_fb2.rb in asciidoctor-fb2-0.3.0 vs lib/asciidoctor_fb2.rb in asciidoctor-fb2-0.3.1
- old
+ new
@@ -80,11 +80,11 @@
body = %(<section>
<title><p>#{node.doctitle}</p></title>
#{node.content}
</section>)
@book.bodies << FB2rb::Body.new(nil, body)
- if node.document.footnotes
+ unless node.document.footnotes.empty?
notes = []
node.document.footnotes.each do |footnote|
notes << %(<section id="note-#{footnote.index}">
<title><p>#{footnote.index}</p></title>
<p>#{footnote.text}</p>
@@ -113,10 +113,15 @@
%(<subtitle id="#{node.id}">#{node.title}</subtitle>
#{node.content})
end
end
+ # @param _node [Asciidoctor::Block]
+ def convert_toc(_node)
+ ''
+ end
+
# @param node [Asciidoctor::Block]
def convert_paragraph(node)
lines = [
'<p>',
node.content,
@@ -406,10 +411,10 @@
%(halign="#{cell.attr 'halign'}"),
%(valign="#{cell.attr 'valign'}")
]
cell_attrs << %(colspan="#{cell.colspan}") if cell.colspan
cell_attrs << %(rowspan="#{cell.rowspan}") if cell.rowspan
- lines << %(<#{cell_tag_name} #{cell_attrs * ' '}">#{cell_content}</#{cell_tag_name}>)
+ lines << %(<#{cell_tag_name} #{cell_attrs * ' '}>#{cell_content}</#{cell_tag_name}>)
end
lines << '</tr>'
end
end
lines << '</table>'