lib/asciidoctor/m3d/converter.rb in asciidoctor-m3d-0.3.1 vs lib/asciidoctor/m3d/converter.rb in asciidoctor-m3d-0.3.2
- old
+ new
@@ -12,9 +12,28 @@
# schema encapsulation of the document for validation
class Converter < ISO::Converter
register_for "m3d"
+ def metadata(node, xml)
+ title node, xml
+ metadata_source(node, xml)
+ metadata_id(node, xml)
+ metadata_author(node, xml)
+ metadata_publisher(node, xml)
+ xml.language node.attr("language")
+ xml.script (node.attr("script") || "Latn")
+ metadata_status(node, xml)
+ metadata_copyright(node, xml)
+ metadata_committee(node, xml)
+ metadata_ics(node, xml)
+ end
+
+ def metadata_source(node, xml)
+ return unless node.attr("url")
+ xml.source node.attr("url")
+ end
+
def metadata_author(node, xml)
xml.contributor do |c|
c.role **{ type: "author" }
c.organization do |a|
a.name "Ribose"