Method: IsoDoc::Function::Blocks#example_label
- Defined in:
- lib/isodoc/function/blocks.rb
#example_label(node, div, name) ⇒ Object
81 82 83 84 85 86 87 88 89 90 |
# File 'lib/isodoc/function/blocks.rb', line 81 def example_label(node, div, name) n = get_anchors[node["id"]] div.p **{ class: "example-title" } do |p| lbl = (n.nil? || n[:label].nil? || n[:label].empty?) ? @example_lbl : l10n("#{@example_lbl} #{n[:label]}") p << lbl name and !lbl.nil? and p << " — " name and name.children.each { |n| parse(n, div) } end end |