lib/asciidoctor/standoc/base.rb in metanorma-standoc-0.0.2 vs lib/asciidoctor/standoc/base.rb in metanorma-standoc-1.0.0
- old
+ new
@@ -28,27 +28,31 @@
w = "converter missing for #{name} node in ISO backend"
Utils::warning(node, w, nil)
nil
end
- def html_converter(node)
- IsoDoc::HtmlConvert.new(
+ def html_extract_attributes(node)
+ {
script: node.attr("script"),
bodyfont: node.attr("body-font"),
headerfont: node.attr("header-font"),
monospacefont: node.attr("monospace-font"),
i18nyaml: node.attr("i18nyaml"),
scope: node.attr("scope"),
htmlstylesheet: node.attr("htmlstylesheet"),
htmlcoverpage: node.attr("htmlcoverpage"),
htmlintropage: node.attr("htmlintropage"),
scripts: node.attr("scripts"),
- )
+ }
end
- def doc_converter(node)
- IsoDoc::WordConvert.new(
+ def html_converter(node)
+ IsoDoc::HtmlConvert.new(html_extract_attributes(node))
+ end
+
+ def doc_extract_attributes(node)
+ {
script: node.attr("script"),
bodyfont: node.attr("body-font"),
headerfont: node.attr("header-font"),
monospacefont: node.attr("monospace-font"),
i18nyaml: node.attr("i18nyaml"),
@@ -58,10 +62,14 @@
header: node.attr("header"),
wordcoverpage: node.attr("wordcoverpage"),
wordintropage: node.attr("wordintropage"),
ulstyle: node.attr("ulstyle"),
olstyle: node.attr("olstyle"),
- )
+ }
+ end
+
+ def doc_converter(node)
+ IsoDoc::WordConvert.new(doc_extract_attributes(node))
end
def init(node)
@fn_number = 0
@draft = false