lib/isodoc/gb/gbwordrender.rb in metanorma-gb-1.0.5 vs lib/isodoc/gb/gbwordrender.rb in metanorma-gb-1.0.6
- old
+ new
@@ -158,11 +158,11 @@
end
def clause_name(num, title, div, header_class)
header_class = {} if header_class.nil?
div.h1 **attr_code(header_class) do |h1|
- if num
+ if num && !@suppressheadingnumbers
h1 << "#{num}."
h1 << " "
end
h1 << title
end
@@ -172,11 +172,11 @@
def clause_parse_title(node, div, c1, out)
if node["inline-header"] == "true"
inline_header_title(out, node, c1)
else
div.send "h#{get_anchors[node['id']][:level]}" do |h|
- h << "#{get_anchors[node['id']][:label]}. "
- c1.children.each { |c2| parse(c2, h) }
+ h << "#{get_anchors[node['id']][:label]}. " if !@suppressheadingnumbers
+ c1 && c1.children.each { |c2| parse(c2, h) }
end
end
end
def annex_name(annex, name, div)