Skip to content

Commit

Permalink
fixed missing book title
Browse files Browse the repository at this point in the history
  • Loading branch information
fbolton authored and mojavelinux committed Oct 12, 2023
1 parent 3b5afa4 commit e261ffa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/docbookrx/docbook_visitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,23 @@ def visit_chapter node
end

def process_doc node
# In DocBook 5.0, title is directly inside book/article element
if (title = text_at_css node, '> title')
append_line %(= #{title})
append_blank_line
end
@level += 1
proceed node, :using_elements => true
@level -= 1
false
end

def process_info node
title = text_at_css node, '> title'
append_line %(= #{title})
# In DocBook 4.5, title is nested inside info element
if (title = text_at_css node, '> title')
append_line %(= #{title})
append_blank_line
end
authors = []
(node.css 'author').each do |author_node|
# FIXME need to detect DocBook 4.5 vs 5.0 to handle names properly
Expand Down

0 comments on commit e261ffa

Please sign in to comment.