lib/isodoc/presentation_function/block.rb in isodoc-1.8.2.2 vs lib/isodoc/presentation_function/block.rb in isodoc-1.8.3

- old
+ new

@@ -10,15 +10,15 @@ def prefix_name(node, delim, number, elem) return if number.nil? || number.empty? unless name = node.at(ns("./#{elem}")) - node.children.empty? and node.add_child("<#{elem}></#{elem}>") or + (node.children.empty? and node.add_child("<#{elem}></#{elem}>")) or node.children.first.previous = "<#{elem}></#{elem}>" name = node.children.first end - if name.children.empty? then name.add_child(number) + if name.children.empty? then name.add_child(cleanup_entities(number)) else (name.children.first.previous = "#{number}#{delim}") end end def sourcecode(docxml) @@ -27,10 +27,9 @@ end end def sourcecode1(elem) return if labelled_ancestor(elem) - return unless elem.ancestors("example").empty? lbl = @xrefs.anchor(elem["id"], :label, false) or return prefix_name(elem, "&nbsp;&mdash; ", l10n("#{lower2cap @i18n.figure} #{lbl}"), "name") end