lib/isodoc/function/inline.rb in isodoc-2.1.5 vs lib/isodoc/function/inline.rb in isodoc-2.2.0
- old
+ new
@@ -15,11 +15,17 @@
end
def location_parse(node, out); end
def span_parse(node, out)
- node.children.each { |n| parse(n, out) }
+ if node["style"]
+ out.span **{ style: node["style"] } do |s|
+ node.children.each { |n| parse(n, s) }
+ end
+ else
+ node.children.each { |n| parse(n, out) }
+ end
end
def callout_parse(node, out)
out << " <#{node.text}>"
end
@@ -55,15 +61,14 @@
end
def eref_url(bibitemid)
return nil if @bibitems.nil? || @bibitems[bibitemid].nil?
- if url = @bibitems[bibitemid].at(ns("./uri[@type = 'citation']"))
- url.text
- elsif @bibitems[bibitemid]["hidden"] == "true"
- @bibitems[bibitemid]&.at(ns("./uri"))&.text
- else "##{bibitemid}"
- end
+ url = @bibitems[bibitemid].at(ns("./uri[@type = 'citation']")) and
+ return url.text
+ @bibitems[bibitemid]["hidden"] == "true" and
+ return @bibitems[bibitemid].at(ns("./uri"))&.text
+ "##{bibitemid}"
end
def eref_parse(node, out)
if href = eref_target(node)
if node["type"] == "footnote"