Method: Asciidoctor::ISO::Converter#sourcecode_style

Defined in:
lib/asciidoctor/iso/validate_section.rb

#sourcecode_style(root) ⇒ Object



163
164
165
166
167
168
169
170
171
# File 'lib/asciidoctor/iso/validate_section.rb', line 163

def sourcecode_style(root)
  root.xpath("//sourcecode").each do |x|
    callouts = x.elements.select { |e| e.name == "callout" }
    annotations = x.elements.select { |e| e.name == "annotation" }
    if callouts.size != annotations.size
      warn "#{x['id']}: mismatch of callouts and annotations"
    end
  end
end