Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
opoudjis committed Aug 28, 2023
1 parent c7686c1 commit a72852a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
30 changes: 14 additions & 16 deletions lib/isodoc/ietf/inline.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "mathml2asciimath"

module IsoDoc
module Ietf
class RfcConvert < ::IsoDoc::Convert
Expand Down Expand Up @@ -60,7 +58,8 @@ def text_parse(node, out)

def stem_parse(node, out)
stem = case node["type"]
when "MathML" then MathML2AsciiMath.m2a(node.children.to_xml)
when "MathML" then Plurimath::Math
.parse(node.children.to_xml, "mathml").to_asciimath
else HTMLEntities.new.encode(node.text)
end
out << "#{@openmathdelim} #{stem} #{@closemathdelim}"
Expand All @@ -82,12 +81,15 @@ def link_parse(node, out)
end
end

def image_parse_attrs(node)
{ src: node["src"], title: node["title"],
align: node["align"], name: node["filename"],
anchor: node["id"], type: "svg",
alt: node["alt"] }
end

def image_parse(node, out, caption)
attrs = { src: node["src"], title: node["title"],
align: node["align"], name: node["filename"],
anchor: node["id"], type: "svg",
alt: node["alt"] }
out.artwork **attr_code(attrs)
out.artwork **attr_code(image_parse_attrs(node))
image_title_parse(out, caption)
end

Expand All @@ -102,14 +104,10 @@ def image_title_parse(out, caption)
def svg_parse(node, out)
if node.parent.name == "image" then super
else
attrs = { src: node["src"], title: node["title"],
align: node["align"], name: node["filename"],
anchor: node["id"], type: "svg",
alt: node["alt"] }
out.artwork **attr_code(attrs) do |x|
out = x
super
end
out.artwork **attr_code(image_parse_attrs(node)) do |x|
out = x
super
end
end
end

Expand Down
5 changes: 4 additions & 1 deletion lib/metanorma/ietf/isodoc.rng
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
these elements; we just want one namespace for any child grammars
of this.
-->
<!-- VERSION v1.2.3 -->
<!-- VERSION v1.2.4 -->
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<include href="reqt.rng"/>
<include href="basicdoc.rng">
Expand Down Expand Up @@ -2068,6 +2068,9 @@
</define>
<define name="termdefinition">
<element name="definition">
<optional>
<attribute name="type"/>
</optional>
<choice>
<ref name="verbaldefinition"/>
<ref name="nonverbalrep"/>
Expand Down
2 changes: 1 addition & 1 deletion lib/metanorma/ietf/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Metanorma
module Ietf
VERSION = "3.2.0".freeze
VERSION = "3.2.1".freeze
end
end
3 changes: 1 addition & 2 deletions metanorma-ietf.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")

spec.add_dependency "mathml2asciimath"
spec.add_dependency "metanorma-ietf-data"
spec.add_dependency "metanorma-standoc", "~> 2.5.0"
spec.add_dependency "metanorma-standoc", "~> 2.5.4"

spec.add_development_dependency "debug"
spec.add_development_dependency "equivalent-xml", "~> 0.6"
Expand Down

0 comments on commit a72852a

Please sign in to comment.