Skip to content

Commit 8e3bc55

Browse files
committed
debug treament of @id in VML: metanorma/metanorma-iho#4
1 parent d68af89 commit 8e3bc55

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/html2doc/base.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ def add_stylesheet(head, title, css)
137137
def bookmarks(docxml)
138138
docxml.xpath("//*[@id][not(@name)][not(@style = 'mso-element:footnote')]")
139139
.each do |x|
140-
(x["id"].empty? ||
141-
%w(v:shapetype v:shape v:rect v:line v:group).include?(x.name)) and next
140+
(x["id"].empty? || x.namespace&.prefix == "v" &&
141+
%w(shapetype shape rect line group).include?(x.name)) and next
142142
if x.children.empty? then x.add_child("<a name='#{x['id']}'></a>")
143143
else x.children.first.previous = "<a name='#{x['id']}'></a>"
144144
end

0 commit comments

Comments
 (0)