lib/metanorma/standoc/inline.rb in metanorma-standoc-2.9.2 vs lib/metanorma/standoc/inline.rb in metanorma-standoc-2.9.3
- old
+ new
@@ -9,23 +9,23 @@
module Inline
def inline_break(node)
noko do |xml|
xml << node.text
xml.br
- end.join
+ end
end
def page_break(node)
attrs = {}
node.option?("landscape") and attrs[:orientation] = "landscape"
node.option?("portrait") and attrs[:orientation] = "portrait"
- noko { |xml| xml.pagebreak **attr_code(attrs) }.join
+ noko { |xml| xml.pagebreak **attr_code(attrs) }
end
def thematic_break(_node)
# noko(&:hr).join # Do not do this, noko blows up
- noko { |xml| xml.hr }.join # rubocop:disable Style/SymbolProc
+ noko { |xml| xml.hr } # rubocop:disable Style/SymbolProc
end
def latex_parse1(text, block)
lxm_input = Unicode2LaTeX.unicode2latex(@c.decode(text))
results = Plurimath::Math.parse(lxm_input, "latex")
@@ -100,11 +100,11 @@
end
else
xml << node.text
end
end
- end.join
+ end
end
def hash2styles(role)
CSV.parse_line(role, liberal_parsing: true)
.each_with_object({}) do |r, m|
@@ -144,18 +144,18 @@
end
def inline_image(node)
noko do |xml|
xml.image **image_attributes(node)
- end.join
+ end
end
def inline_indexterm(node)
noko do |xml|
node.type == :visible and xml << node.text
terms = (node.attr("terms") || [node.text]).map { |x| xml_encode(x) }
inline_indexterm1(xml, terms)
- end.join
+ end
end
def inline_indexterm1(xml, terms)
xml.index do |i|
i.primary { |x| x << terms[0] }