Skip to content

Commit

Permalink
ensure dl, ol, ul have fmt-name: #617
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Nov 14, 2024
1 parent 670e9ae commit 1064f72
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/isodoc/presentation_function/block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,17 @@ def dl(docxml)
end

def dl1(elem)
prefix_name(elem, {}, "", "name") # copy name to fmt-name
elem.at(ns("./name")) and
prefix_name(elem, {}, "", "name") # copy name to fmt-name
end

def ul(docxml)
docxml.xpath(ns("//ul")).each { |f| ul1(f) }
end

def ul1(elem)
elem.at(ns("./name")) and
prefix_name(elem, {}, "", "name") # copy name to fmt-name
end

def ol(docxml)
Expand All @@ -178,6 +188,8 @@ def ol1(elem)
elem.xpath(ns("./li")).each do |li|
li["id"] ||= "_#{UUIDTools::UUID.random_create}"
end
elem.at(ns("./name")) and
prefix_name(elem, {}, "", "name") # copy name to fmt-name
end

def ol_label(elem)
Expand Down
1 change: 1 addition & 0 deletions lib/isodoc/presentation_xml_convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def block(docxml)
note docxml
admonition docxml
source docxml
ul docxml
ol docxml
dl docxml
quote docxml
Expand Down

0 comments on commit 1064f72

Please sign in to comment.