63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
# File 'lib/metanorma/input/asciidoc.rb', line 63
def (file)
= file.sub(/\n\n.*$/m, "\n")
/\n:script: (?<script>[^\n]+)\n/ =~
/\n:body-font: (?<bodyfont>[^\n]+)\n/ =~
/\n:header-font: (?<headerfont>[^\n]+)\n/ =~
/\n:monospace-font: (?<monospacefont>[^\n]+)\n/ =~
/\n:title-font: (?<titlefont>[^\n]+)\n/ =~
/\n:i18nyaml: (?<i18nyaml>[^\n]+)\n/ =~
/\n:htmlstylesheet: (?<htmlstylesheet>[^\n]+)\n/ =~
/\n:htmlcoverpage: (?<htmlcoverpage>[^\n]+)\n/ =~
/\n:htmlintropage: (?<htmlintropage>[^\n]+)\n/ =~
/\n:scripts: (?<scripts>[^\n]+)\n/ =~
/\n:scripts-pdf: (?<scripts_pdf>[^\n]+)\n/ =~
/\n:wordstylesheet: (?<wordstylesheet>[^\n]+)\n/ =~
/\n:standardstylesheet: (?<standardstylesheet>[^\n]+)\n/ =~
/\n:header: (?<header>[^\n]+)\n/ =~
/\n:wordcoverpage: (?<wordcoverpage>[^\n]+)\n/ =~
/\n:wordintropage: (?<wordintropage>[^\n]+)\n/ =~
/\n:ulstyle: (?<ulstyle>[^\n]+)\n/ =~
/\n:olstyle: (?<olstyle>[^\n]+)\n/ =~
/\n:data-uri-image: (?<datauriimage>[^\n]+)\n/ =~
/\n:htmltoclevels: (?<htmltoclevels>[^\n]+)\n/ =~
/\n:doctoclevels: (?<doctoclevels>[^\n]+)\n/ =~
/\n:(?<hierarchical_assets>hierarchical-assets:[^\n]*)\n/ =~
/\n:(?<use_xinclude>use-xinclude:[^\n]*)\n/ =~
/\n:(?<break_up_urls_in_tables>break-up-urls-in-tables:[^\n]*)\n/ =~
defined?(hierarchical_assets) and
hierarchical_assets = empty_attr(hierarchical_assets, "hierarchical-assets")
defined?(use_xinclude) and
use_xinclude = empty_attr(use_xinclude, "use-xinclude")
defined?(break_up_urls_in_tables) and
break_up_urls_in_tables = empty_attr(break_up_urls_in_tables, "break-up-urls-in-tables")
{
script: defined?(script) ? script : nil,
bodyfont: defined?(bodyfont) ? bodyfont : nil,
headerfont: defined?() ? : nil,
monospacefont: defined?(monospacefont) ? monospacefont : nil,
titlefont: defined?(titlefont) ? titlefont : nil,
i18nyaml: defined?(i18nyaml) ? i18nyaml : nil,
htmlstylesheet: defined?(htmlstylesheet) ? htmlstylesheet : nil,
htmlcoverpage: defined?(htmlcoverpage) ? htmlcoverpage : nil,
htmlintropage: defined?(htmlintropage) ? htmlintropage : nil,
scripts: defined?(scripts) ? scripts : nil,
scripts_pdf: defined?(scripts_pdf) ? scripts_pdf : nil,
wordstylesheet: defined?(wordstylesheet) ? wordstylesheet : nil,
standardstylesheet: defined?(standardstylesheet) ? standardstylesheet : nil,
header: defined?() ? : nil,
wordcoverpage: defined?(wordcoverpage) ? wordcoverpage : nil,
wordintropage: defined?(wordintropage) ? wordintropage : nil,
ulstyle: defined?(ulstyle) ? ulstyle : nil,
olstyle: defined?(olstyle) ? olstyle : nil,
datauriimage: defined?(datauriimage) ? datauriimage != "false" : nil,
htmltoclevels: defined?(htmltoclevels) ? htmltoclevels : nil,
doctoclevels: defined?(doctoclevels) ? doctoclevels : nil,
hierarchical_assets: defined?(hierarchical_assets) ? hierarchical_assets : nil,
use_xinclude: defined?(use_xinclude) ? use_xinclude : nil,
break_up_urls_in_tables: defined?(break_up_urls_in_tables) ? break_up_urls_in_tables : nil,
}.reject { |_, val| val.nil? }
end
|