lib/isodoc/presentation_function/xrefs.rb in isodoc-2.1.2.1 vs lib/isodoc/presentation_function/xrefs.rb in isodoc-2.1.3
- old
+ new
@@ -103,12 +103,10 @@
capitalise_xref1(node, linkend)
end
def capitalise_xref1(node, linkend)
- prec = nearest_block_parent(node).xpath("./descendant-or-self::text()") &
- node.xpath("./preceding::text()")
- if prec.empty? || /(?!<[^.].)\.\s+$/.match(prec.map(&:text).join)
+ if start_of_sentence(node)
Common::case_with_markup(linkend, "capital", @script)
else linkend
end
end
end