@asciidoctor/core 2.2.0-rc.3 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/asciidoctor.js +946 -783
- package/dist/browser/asciidoctor.min.js +1432 -1424
- package/dist/css/asciidoctor.css +25 -23
- package/dist/graalvm/asciidoctor.js +943 -780
- package/dist/node/asciidoctor.js +944 -781
- package/package.json +5 -4
- package/types/index.d.ts +20 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Asciidoctor.js 2.2.
|
|
2
|
+
* @license Asciidoctor.js 2.2.1 | MIT | https://github.com/asciidoctor/asciidoctor.js
|
|
3
3
|
*/
|
|
4
4
|
(function(undefined) {
|
|
5
5
|
// @note
|
|
@@ -20043,7 +20043,7 @@ Opal.modules["asciidoctor/js/opal_ext/browser"] = function(Opal) {
|
|
|
20043
20043
|
Opal.modules["asciidoctor/js/asciidoctor_ext/browser/abstract_node"] = function(Opal) {
|
|
20044
20044
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy;
|
|
20045
20045
|
|
|
20046
|
-
Opal.add_stubs(['$uriish?', '$[]', '$web_path', '$path_resolver', '$descends_from?', '$base_dir', '$attr?', '$join', '$prepare_source_string', '$read', '$fetch', '$warn', '$logger', '$normalize_system_path', '$read_asset']);
|
|
20046
|
+
Opal.add_stubs(['$uriish?', '$[]', '$web_path', '$path_resolver', '$descends_from?', '$base_dir', '$start_with?', '$attr?', '$join', '$prepare_source_string', '$read', '$fetch', '$warn', '$logger', '$normalize_system_path', '$read_asset']);
|
|
20047
20047
|
return (function($base, $parent_nesting) {
|
|
20048
20048
|
var self = $module($base, 'Asciidoctor');
|
|
20049
20049
|
|
|
@@ -20067,7 +20067,7 @@ Opal.modules["asciidoctor/js/asciidoctor_ext/browser/abstract_node"] = function(
|
|
|
20067
20067
|
};
|
|
20068
20068
|
doc = self.document;
|
|
20069
20069
|
if ($truthy(($truthy($a = $$($nesting, 'Helpers')['$uriish?'](target)) ? $a : ($truthy($b = ($truthy($c = (start = opts['$[]']("start"))) ? $$($nesting, 'Helpers')['$uriish?'](start) : $c)) ? (target = doc.$path_resolver().$web_path(target, start)) : $b)))) {
|
|
20070
|
-
if ($truthy(($truthy($a = doc.$path_resolver()['$descends_from?'](target, doc.$base_dir())) ? $a : doc['$attr?']("allow-uri-read")))) {
|
|
20070
|
+
if ($truthy(($truthy($a = ($truthy($b = doc.$path_resolver()['$descends_from?'](target, doc.$base_dir())) ? $b : target['$start_with?']("chrome://"))) ? $a : doc['$attr?']("allow-uri-read")))) {
|
|
20071
20071
|
|
|
20072
20072
|
try {
|
|
20073
20073
|
if ($truthy(opts['$[]']("normalize"))) {
|
|
@@ -22897,7 +22897,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
|
|
|
22897
22897
|
Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22898
22898
|
Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
|
|
22899
22899
|
Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22900
|
-
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\]
|
|
22900
|
+
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
|
|
22901
22901
|
Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22902
22902
|
Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
|
|
22903
22903
|
Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
@@ -22953,7 +22953,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
22953
22953
|
(function($base, $parent_nesting) {
|
|
22954
22954
|
var self = $module($base, 'Substitutors');
|
|
22955
22955
|
|
|
22956
|
-
var $nesting = [self].concat($parent_nesting), $Substitutors_apply_subs$1, $Substitutors_apply_normal_subs$3, $Substitutors_apply_header_subs$4, $Substitutors_apply_reftext_subs$5, $Substitutors_sub_specialchars$6, $Substitutors_sub_quotes$7, $Substitutors_sub_attributes$10, $Substitutors_sub_replacements$16, $Substitutors_sub_macros$19, $Substitutors_sub_post_replacements$41, $Substitutors_sub_source$44, $Substitutors_sub_callouts$45, $Substitutors_highlight_source$47, $Substitutors_resolve_lines_to_highlight$48, $Substitutors_extract_passthroughs$
|
|
22956
|
+
var $nesting = [self].concat($parent_nesting), $Substitutors_apply_subs$1, $Substitutors_apply_normal_subs$3, $Substitutors_apply_header_subs$4, $Substitutors_apply_reftext_subs$5, $Substitutors_sub_specialchars$6, $Substitutors_sub_quotes$7, $Substitutors_sub_attributes$10, $Substitutors_sub_replacements$16, $Substitutors_sub_macros$19, $Substitutors_sub_post_replacements$41, $Substitutors_sub_source$44, $Substitutors_sub_callouts$45, $Substitutors_highlight_source$47, $Substitutors_resolve_lines_to_highlight$48, $Substitutors_extract_passthroughs$51, $Substitutors_restore_passthroughs$55, $Substitutors_resolve_subs$57, $Substitutors_resolve_block_subs$59, $Substitutors_resolve_pass_subs$60, $Substitutors_expand_subs$61, $Substitutors_commit_subs$63, $Substitutors_parse_attributes$64, $Substitutors_extract_attributes_from_text$65, $Substitutors_extract_callouts$66, $Substitutors_restore_callouts$69, $Substitutors_extract_inner_passthrough$72, $Substitutors_convert_quoted_text$73, $Substitutors_do_replacement$74, $Substitutors_parse_quoted_text_attributes$75, $Substitutors_normalize_text$76, $Substitutors_split_simple_csv$77;
|
|
22957
22957
|
|
|
22958
22958
|
|
|
22959
22959
|
Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
|
|
@@ -23588,8 +23588,8 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23588
23588
|
text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
|
|
23589
23589
|
} else {
|
|
23590
23590
|
|
|
23591
|
-
|
|
23592
|
-
|
|
23591
|
+
$case = prefix;
|
|
23592
|
+
if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
|
|
23593
23593
|
text = "";
|
|
23594
23594
|
$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
|
|
23595
23595
|
if (")"['$===']($case)) {
|
|
@@ -23897,7 +23897,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23897
23897
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
23898
23898
|
return $$($nesting, 'Inline').$new(self, "anchor", text, $hash2(["type", "target", "attributes"], {"type": "xref", "target": target, "attributes": attrs})).$convert();}, $$38.$$s = self, $$38.$$arity = 0, $$38))};
|
|
23899
23899
|
if ($truthy(($truthy($a = found_macroish) ? text['$include?']("tnote") : $a))) {
|
|
23900
|
-
text = $send(text, 'gsub', [$$($nesting, 'InlineFootnoteMacroRx')], ($$39 = function(){var self = $$39.$$s || this, $c, $d, $e, $$40, id = nil,
|
|
23900
|
+
text = $send(text, 'gsub', [$$($nesting, 'InlineFootnoteMacroRx')], ($$39 = function(){var self = $$39.$$s || this, $c, $d, $e, $$40, id = nil, footnote = nil, index = nil, type = nil, target = nil;
|
|
23901
23901
|
|
|
23902
23902
|
|
|
23903
23903
|
if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) {
|
|
@@ -23919,7 +23919,18 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23919
23919
|
text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
|
|
23920
23920
|
};
|
|
23921
23921
|
if ($truthy(id)) {
|
|
23922
|
-
if ($truthy(
|
|
23922
|
+
if ($truthy((footnote = $send(doc.$footnotes(), 'find', [], ($$40 = function(candidate){var self = $$40.$$s || this;
|
|
23923
|
+
|
|
23924
|
+
|
|
23925
|
+
|
|
23926
|
+
if (candidate == null) {
|
|
23927
|
+
candidate = nil;
|
|
23928
|
+
};
|
|
23929
|
+
return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) {
|
|
23930
|
+
|
|
23931
|
+
$c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c;
|
|
23932
|
+
$c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c;
|
|
23933
|
+
} else if ($truthy(text)) {
|
|
23923
23934
|
|
|
23924
23935
|
text = self.$restore_passthroughs(self.$normalize_text(text, true, true));
|
|
23925
23936
|
index = doc.$counter("footnote-number");
|
|
@@ -23927,21 +23938,8 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23927
23938
|
$c = ["ref", nil], (type = $c[0]), (target = $c[1]), $c;
|
|
23928
23939
|
} else {
|
|
23929
23940
|
|
|
23930
|
-
|
|
23931
|
-
|
|
23932
|
-
|
|
23933
|
-
|
|
23934
|
-
if (candidate == null) {
|
|
23935
|
-
candidate = nil;
|
|
23936
|
-
};
|
|
23937
|
-
return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) {
|
|
23938
|
-
$c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c
|
|
23939
|
-
} else {
|
|
23940
|
-
|
|
23941
|
-
self.$logger().$warn("" + "invalid footnote reference: " + (id));
|
|
23942
|
-
$c = [nil, id], (index = $c[0]), (text = $c[1]), $c;
|
|
23943
|
-
};
|
|
23944
|
-
$c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c;
|
|
23941
|
+
self.$logger().$warn("" + "invalid footnote reference: " + (id));
|
|
23942
|
+
$c = ["xref", id, id, nil], (type = $c[0]), (target = $c[1]), (text = $c[2]), (id = $c[3]), $c;
|
|
23945
23943
|
}
|
|
23946
23944
|
} else if ($truthy(text)) {
|
|
23947
23945
|
|
|
@@ -24050,7 +24048,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24050
24048
|
if ($truthy($rb_lt((start_line_number = self.$attr("start", 1).$to_i()), 1))) {
|
|
24051
24049
|
start_line_number = 1}};
|
|
24052
24050
|
if ($truthy(self['$attr?']("highlight"))) {
|
|
24053
|
-
highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"))};
|
|
24051
|
+
highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"), start_line_number)};
|
|
24054
24052
|
$b = syntax_hl.$highlight(self, source, self.$attr("language"), $hash2(["callouts", "css_mode", "highlight_lines", "number_lines", "start_line_number", "style"], {"callouts": callout_marks, "css_mode": ($truthy($c = doc_attrs['$[]']("" + (syntax_hl_name) + "-css")) ? $c : "class").$to_sym(), "highlight_lines": highlight_lines, "number_lines": linenums_mode, "start_line_number": start_line_number, "style": doc_attrs['$[]']("" + (syntax_hl_name) + "-style")})), $a = Opal.to_ary($b), (highlighted = ($a[0] == null ? nil : $a[0])), (source_offset = ($a[1] == null ? nil : $a[1])), $b;
|
|
24055
24053
|
if ($truthy(self.passthroughs['$empty?']())) {
|
|
24056
24054
|
} else {
|
|
@@ -24064,10 +24062,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24064
24062
|
};
|
|
24065
24063
|
}, $Substitutors_highlight_source$47.$$arity = 2);
|
|
24066
24064
|
|
|
24067
|
-
Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec) {
|
|
24068
|
-
var $$49, self = this, lines = nil;
|
|
24065
|
+
Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec, start) {
|
|
24066
|
+
var $$49, $$50, self = this, lines = nil, shift = nil;
|
|
24069
24067
|
|
|
24070
24068
|
|
|
24069
|
+
|
|
24070
|
+
if (start == null) {
|
|
24071
|
+
start = nil;
|
|
24072
|
+
};
|
|
24071
24073
|
lines = [];
|
|
24072
24074
|
if ($truthy(spec['$include?'](" "))) {
|
|
24073
24075
|
spec = spec.$delete(" ")};
|
|
@@ -24114,11 +24116,26 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24114
24116
|
} else {
|
|
24115
24117
|
return nil
|
|
24116
24118
|
};}, $$49.$$s = self, $$49.$$arity = 1, $$49));
|
|
24119
|
+
if ((shift = (function() {if ($truthy(start)) {
|
|
24120
|
+
return $rb_minus(start, 1)
|
|
24121
|
+
} else {
|
|
24122
|
+
return 0
|
|
24123
|
+
}; return nil; })())['$=='](0)) {
|
|
24124
|
+
} else {
|
|
24125
|
+
lines = $send(lines, 'map', [], ($$50 = function(it){var self = $$50.$$s || this;
|
|
24126
|
+
|
|
24127
|
+
|
|
24128
|
+
|
|
24129
|
+
if (it == null) {
|
|
24130
|
+
it = nil;
|
|
24131
|
+
};
|
|
24132
|
+
return $rb_minus(it, shift);}, $$50.$$s = self, $$50.$$arity = 1, $$50))
|
|
24133
|
+
};
|
|
24117
24134
|
return lines.$sort();
|
|
24118
|
-
}, $Substitutors_resolve_lines_to_highlight$48.$$arity =
|
|
24135
|
+
}, $Substitutors_resolve_lines_to_highlight$48.$$arity = -3);
|
|
24119
24136
|
|
|
24120
|
-
Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$
|
|
24121
|
-
var $a, $b, $$
|
|
24137
|
+
Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$51 = function $$extract_passthroughs(text) {
|
|
24138
|
+
var $a, $b, $$52, $$53, $$54, self = this, compat_mode = nil, passthrus = nil, pass_inline_char1 = nil, pass_inline_char2 = nil, pass_inline_rx = nil;
|
|
24122
24139
|
if (self.document == null) self.document = nil;
|
|
24123
24140
|
if (self.passthroughs == null) self.passthroughs = nil;
|
|
24124
24141
|
|
|
@@ -24126,7 +24143,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24126
24143
|
compat_mode = self.document.$compat_mode();
|
|
24127
24144
|
passthrus = self.passthroughs;
|
|
24128
24145
|
if ($truthy(($truthy($a = ($truthy($b = text['$include?']("++")) ? $b : text['$include?']("$$"))) ? $a : text['$include?']("ss:")))) {
|
|
24129
|
-
text = $send(text, 'gsub', [$$($nesting, 'InlinePassMacroRx')], ($$
|
|
24146
|
+
text = $send(text, 'gsub', [$$($nesting, 'InlinePassMacroRx')], ($$52 = function(){var self = $$52.$$s || this, $c, boundary = nil, attrlist = nil, escape_count = nil, preceding = nil, old_behavior = nil, attributes = nil, subs = nil, $writer = nil, passthru_key = nil;
|
|
24130
24147
|
|
|
24131
24148
|
|
|
24132
24149
|
if ($truthy((boundary = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4))))) {
|
|
@@ -24191,10 +24208,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24191
24208
|
$writer[$rb_minus($writer["length"], 1)];
|
|
24192
24209
|
};
|
|
24193
24210
|
};
|
|
24194
|
-
return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$
|
|
24211
|
+
return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$52.$$s = self, $$52.$$arity = 0, $$52))};
|
|
24195
24212
|
$b = $$($nesting, 'InlinePassRx')['$[]'](compat_mode), $a = Opal.to_ary($b), (pass_inline_char1 = ($a[0] == null ? nil : $a[0])), (pass_inline_char2 = ($a[1] == null ? nil : $a[1])), (pass_inline_rx = ($a[2] == null ? nil : $a[2])), $b;
|
|
24196
24213
|
if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) {
|
|
24197
|
-
text = $send(text, 'gsub', [pass_inline_rx], ($$
|
|
24214
|
+
text = $send(text, 'gsub', [pass_inline_rx], ($$53 = function(){var self = $$53.$$s || this, $c, preceding = nil, attrlist = nil, quoted_text = nil, escape_mark = nil, format_mark = nil, content = nil, old_behavior = nil, attributes = nil, $writer = nil, passthru_key = nil, subs = nil;
|
|
24198
24215
|
|
|
24199
24216
|
|
|
24200
24217
|
preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
|
|
@@ -24250,9 +24267,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24250
24267
|
$send(passthrus, '[]=', Opal.to_a($writer));
|
|
24251
24268
|
$writer[$rb_minus($writer["length"], 1)];
|
|
24252
24269
|
};
|
|
24253
|
-
return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$
|
|
24270
|
+
return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
|
|
24254
24271
|
if ($truthy(($truthy($a = text['$include?'](":")) ? ($truthy($b = text['$include?']("stem:")) ? $b : text['$include?']("math:")) : $a))) {
|
|
24255
|
-
text = $send(text, 'gsub', [$$($nesting, 'InlineStemMacroRx')], ($$
|
|
24272
|
+
text = $send(text, 'gsub', [$$($nesting, 'InlineStemMacroRx')], ($$54 = function(){var self = $$54.$$s || this, $c, $d, type = nil, subs = nil, content = nil, $writer = nil, passthru_key = nil;
|
|
24256
24273
|
if (self.document == null) self.document = nil;
|
|
24257
24274
|
|
|
24258
24275
|
|
|
@@ -24279,17 +24296,17 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24279
24296
|
$writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type"], {"text": content, "subs": subs, "type": type})];
|
|
24280
24297
|
$send(passthrus, '[]=', Opal.to_a($writer));
|
|
24281
24298
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
24282
|
-
return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$
|
|
24299
|
+
return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$54.$$s = self, $$54.$$arity = 0, $$54))};
|
|
24283
24300
|
return text;
|
|
24284
|
-
}, $Substitutors_extract_passthroughs$
|
|
24301
|
+
}, $Substitutors_extract_passthroughs$51.$$arity = 1);
|
|
24285
24302
|
|
|
24286
|
-
Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$
|
|
24287
|
-
var $$
|
|
24303
|
+
Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$55 = function $$restore_passthroughs(text) {
|
|
24304
|
+
var $$56, self = this, passthrus = nil;
|
|
24288
24305
|
if (self.passthroughs == null) self.passthroughs = nil;
|
|
24289
24306
|
|
|
24290
24307
|
|
|
24291
24308
|
passthrus = self.passthroughs;
|
|
24292
|
-
return $send(text, 'gsub', [$$($nesting, 'PassSlotRx')], ($$
|
|
24309
|
+
return $send(text, 'gsub', [$$($nesting, 'PassSlotRx')], ($$56 = function(){var self = $$56.$$s || this, $a, pass = nil, subbed_text = nil, type = nil, attributes = nil, id = nil;
|
|
24293
24310
|
|
|
24294
24311
|
if ($truthy((pass = passthrus['$[]']((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$to_i())))) {
|
|
24295
24312
|
|
|
@@ -24308,11 +24325,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24308
24325
|
|
|
24309
24326
|
self.$logger().$error("" + "unresolved passthrough detected: " + (text));
|
|
24310
24327
|
return "??pass??";
|
|
24311
|
-
}}, $$
|
|
24312
|
-
}, $Substitutors_restore_passthroughs$
|
|
24328
|
+
}}, $$56.$$s = self, $$56.$$arity = 0, $$56));
|
|
24329
|
+
}, $Substitutors_restore_passthroughs$55.$$arity = 1);
|
|
24313
24330
|
|
|
24314
|
-
Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$
|
|
24315
|
-
var $$
|
|
24331
|
+
Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$57 = function $$resolve_subs(subs, type, defaults, subject) {
|
|
24332
|
+
var $$58, self = this, candidates = nil, modifiers_present = nil, resolved = nil, invalid = nil;
|
|
24316
24333
|
|
|
24317
24334
|
|
|
24318
24335
|
|
|
@@ -24333,7 +24350,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24333
24350
|
if ($truthy(subs['$include?'](" "))) {
|
|
24334
24351
|
subs = subs.$delete(" ")};
|
|
24335
24352
|
modifiers_present = $$($nesting, 'SubModifierSniffRx')['$match?'](subs);
|
|
24336
|
-
$send(subs.$split(","), 'each', [], ($$
|
|
24353
|
+
$send(subs.$split(","), 'each', [], ($$58 = function(key){var self = $$58.$$s || this, $a, $b, modifier_operation = nil, first = nil, resolved_keys = nil, resolved_key = nil, candidate = nil, $case = nil;
|
|
24337
24354
|
|
|
24338
24355
|
|
|
24339
24356
|
|
|
@@ -24387,7 +24404,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24387
24404
|
|
|
24388
24405
|
candidates = ($truthy($a = candidates) ? $a : []);
|
|
24389
24406
|
return (candidates = $rb_plus(candidates, resolved_keys));
|
|
24390
|
-
};}, $$
|
|
24407
|
+
};}, $$58.$$s = self, $$58.$$arity = 1, $$58));
|
|
24391
24408
|
if ($truthy(candidates)) {
|
|
24392
24409
|
} else {
|
|
24393
24410
|
return nil
|
|
@@ -24408,22 +24425,22 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24408
24425
|
}; return nil; })()) + (subject) + ": " + (invalid.$join(", ")));
|
|
24409
24426
|
};
|
|
24410
24427
|
return resolved;
|
|
24411
|
-
}, $Substitutors_resolve_subs$
|
|
24428
|
+
}, $Substitutors_resolve_subs$57.$$arity = -2);
|
|
24412
24429
|
|
|
24413
|
-
Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$
|
|
24430
|
+
Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$59 = function $$resolve_block_subs(subs, defaults, subject) {
|
|
24414
24431
|
var self = this;
|
|
24415
24432
|
|
|
24416
24433
|
return self.$resolve_subs(subs, "block", defaults, subject)
|
|
24417
|
-
}, $Substitutors_resolve_block_subs$
|
|
24434
|
+
}, $Substitutors_resolve_block_subs$59.$$arity = 3);
|
|
24418
24435
|
|
|
24419
|
-
Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$
|
|
24436
|
+
Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$60 = function $$resolve_pass_subs(subs) {
|
|
24420
24437
|
var self = this;
|
|
24421
24438
|
|
|
24422
24439
|
return self.$resolve_subs(subs, "inline", nil, "passthrough macro")
|
|
24423
|
-
}, $Substitutors_resolve_pass_subs$
|
|
24440
|
+
}, $Substitutors_resolve_pass_subs$60.$$arity = 1);
|
|
24424
24441
|
|
|
24425
|
-
Opal.def(self, '$expand_subs', $Substitutors_expand_subs$
|
|
24426
|
-
var $a, $$
|
|
24442
|
+
Opal.def(self, '$expand_subs', $Substitutors_expand_subs$61 = function $$expand_subs(subs) {
|
|
24443
|
+
var $a, $$62, self = this, expanded_subs = nil;
|
|
24427
24444
|
|
|
24428
24445
|
if ($truthy($$$('::', 'Symbol')['$==='](subs))) {
|
|
24429
24446
|
if (subs['$==']("none")) {
|
|
@@ -24434,7 +24451,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24434
24451
|
} else {
|
|
24435
24452
|
|
|
24436
24453
|
expanded_subs = [];
|
|
24437
|
-
$send(subs, 'each', [], ($$
|
|
24454
|
+
$send(subs, 'each', [], ($$62 = function(key){var self = $$62.$$s || this, sub_group = nil;
|
|
24438
24455
|
|
|
24439
24456
|
|
|
24440
24457
|
|
|
@@ -24447,16 +24464,16 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24447
24464
|
return (expanded_subs = $rb_plus(expanded_subs, sub_group))
|
|
24448
24465
|
} else {
|
|
24449
24466
|
return expanded_subs['$<<'](key)
|
|
24450
|
-
};}, $$
|
|
24467
|
+
};}, $$62.$$s = self, $$62.$$arity = 1, $$62));
|
|
24451
24468
|
if ($truthy(expanded_subs['$empty?']())) {
|
|
24452
24469
|
return nil
|
|
24453
24470
|
} else {
|
|
24454
24471
|
return expanded_subs
|
|
24455
24472
|
};
|
|
24456
24473
|
}
|
|
24457
|
-
}, $Substitutors_expand_subs$
|
|
24474
|
+
}, $Substitutors_expand_subs$61.$$arity = 1);
|
|
24458
24475
|
|
|
24459
|
-
Opal.def(self, '$commit_subs', $Substitutors_commit_subs$
|
|
24476
|
+
Opal.def(self, '$commit_subs', $Substitutors_commit_subs$63 = function $$commit_subs() {
|
|
24460
24477
|
var $a, $b, $c, $d, self = this, default_subs = nil, $case = nil, custom_subs = nil, syntax_hl = nil, idx = nil, $writer = nil;
|
|
24461
24478
|
if (self.default_subs == null) self.default_subs = nil;
|
|
24462
24479
|
if (self.content_model == null) self.content_model = nil;
|
|
@@ -24494,9 +24511,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24494
24511
|
$send(self.subs, '[]=', Opal.to_a($writer));
|
|
24495
24512
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
24496
24513
|
return nil;
|
|
24497
|
-
}, $Substitutors_commit_subs$
|
|
24514
|
+
}, $Substitutors_commit_subs$63.$$arity = 0);
|
|
24498
24515
|
|
|
24499
|
-
Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$
|
|
24516
|
+
Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$64 = function $$parse_attributes(attrlist, posattrs, opts) {
|
|
24500
24517
|
var $a, self = this, block = nil, into = nil;
|
|
24501
24518
|
if (self.document == null) self.document = nil;
|
|
24502
24519
|
|
|
@@ -24526,10 +24543,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24526
24543
|
} else {
|
|
24527
24544
|
return $$($nesting, 'AttributeList').$new(attrlist, block).$parse(posattrs)
|
|
24528
24545
|
};
|
|
24529
|
-
}, $Substitutors_parse_attributes$
|
|
24546
|
+
}, $Substitutors_parse_attributes$64.$$arity = -2);
|
|
24530
24547
|
self.$private();
|
|
24531
24548
|
|
|
24532
|
-
Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$
|
|
24549
|
+
Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$65 = function $$extract_attributes_from_text(text, default_text) {
|
|
24533
24550
|
var self = this, attrlist = nil, resolved_text = nil, attrs = nil;
|
|
24534
24551
|
|
|
24535
24552
|
|
|
@@ -24552,10 +24569,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24552
24569
|
} else {
|
|
24553
24570
|
return [default_text, attrs]
|
|
24554
24571
|
};
|
|
24555
|
-
}, $Substitutors_extract_attributes_from_text$
|
|
24572
|
+
}, $Substitutors_extract_attributes_from_text$65.$$arity = -2);
|
|
24556
24573
|
|
|
24557
|
-
Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$
|
|
24558
|
-
var $$
|
|
24574
|
+
Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$66 = function $$extract_callouts(source) {
|
|
24575
|
+
var $$67, self = this, callout_marks = nil, autonum = nil, lineno = nil, last_lineno = nil, callout_rx = nil;
|
|
24559
24576
|
|
|
24560
24577
|
|
|
24561
24578
|
callout_marks = $hash2([], {});
|
|
@@ -24566,7 +24583,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24566
24583
|
} else {
|
|
24567
24584
|
return $$($nesting, 'CalloutExtractRx')
|
|
24568
24585
|
}; return nil; })();
|
|
24569
|
-
source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$
|
|
24586
|
+
source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$67 = function(line){var self = $$67.$$s || this, $$68;
|
|
24570
24587
|
|
|
24571
24588
|
|
|
24572
24589
|
|
|
@@ -24574,7 +24591,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24574
24591
|
line = nil;
|
|
24575
24592
|
};
|
|
24576
24593
|
lineno = $rb_plus(lineno, 1);
|
|
24577
|
-
return $send(line, 'gsub', [callout_rx], ($$
|
|
24594
|
+
return $send(line, 'gsub', [callout_rx], ($$68 = function(){var self = $$68.$$s || this, $a, $b, $writer = nil;
|
|
24578
24595
|
|
|
24579
24596
|
if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) {
|
|
24580
24597
|
return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "")
|
|
@@ -24591,7 +24608,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24591
24608
|
}; return nil; })()]);
|
|
24592
24609
|
last_lineno = lineno;
|
|
24593
24610
|
return "";
|
|
24594
|
-
}}, $$
|
|
24611
|
+
}}, $$68.$$s = self, $$68.$$arity = 0, $$68));}, $$67.$$s = self, $$67.$$arity = 1, $$67)).$join($$($nesting, 'LF'));
|
|
24595
24612
|
if ($truthy(last_lineno)) {
|
|
24596
24613
|
if (last_lineno['$=='](lineno)) {
|
|
24597
24614
|
source = "" + (source) + ($$($nesting, 'LF'))}
|
|
@@ -24599,10 +24616,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24599
24616
|
callout_marks = nil
|
|
24600
24617
|
};
|
|
24601
24618
|
return [source, callout_marks];
|
|
24602
|
-
}, $Substitutors_extract_callouts$
|
|
24619
|
+
}, $Substitutors_extract_callouts$66.$$arity = 1);
|
|
24603
24620
|
|
|
24604
|
-
Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$
|
|
24605
|
-
var $$
|
|
24621
|
+
Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$69 = function $$restore_callouts(source, callout_marks, source_offset) {
|
|
24622
|
+
var $$70, self = this, preamble = nil, lineno = nil;
|
|
24606
24623
|
|
|
24607
24624
|
|
|
24608
24625
|
|
|
@@ -24617,7 +24634,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24617
24634
|
preamble = ""
|
|
24618
24635
|
};
|
|
24619
24636
|
lineno = 0;
|
|
24620
|
-
return $rb_plus(preamble, $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$
|
|
24637
|
+
return $rb_plus(preamble, $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$70 = function(line){var self = $$70.$$s || this, $a, $b, $$71, conums = nil, guard = nil, numeral = nil;
|
|
24621
24638
|
if (self.document == null) self.document = nil;
|
|
24622
24639
|
|
|
24623
24640
|
|
|
@@ -24631,7 +24648,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24631
24648
|
$b = conums['$[]'](0), $a = Opal.to_ary($b), (guard = ($a[0] == null ? nil : $a[0])), (numeral = ($a[1] == null ? nil : $a[1])), $b;
|
|
24632
24649
|
return "" + (line) + ($$($nesting, 'Inline').$new(self, "callout", numeral, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard})})).$convert());
|
|
24633
24650
|
} else {
|
|
24634
|
-
return "" + (line) + ($send(conums, 'map', [], ($$
|
|
24651
|
+
return "" + (line) + ($send(conums, 'map', [], ($$71 = function(guard_it, numeral_it){var self = $$71.$$s || this;
|
|
24635
24652
|
if (self.document == null) self.document = nil;
|
|
24636
24653
|
|
|
24637
24654
|
|
|
@@ -24643,14 +24660,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24643
24660
|
if (numeral_it == null) {
|
|
24644
24661
|
numeral_it = nil;
|
|
24645
24662
|
};
|
|
24646
|
-
return $$($nesting, 'Inline').$new(self, "callout", numeral_it, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard_it})})).$convert();}, $$
|
|
24663
|
+
return $$($nesting, 'Inline').$new(self, "callout", numeral_it, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard_it})})).$convert();}, $$71.$$s = self, $$71.$$arity = 2, $$71)).$join(" "))
|
|
24647
24664
|
}
|
|
24648
24665
|
} else {
|
|
24649
24666
|
return line
|
|
24650
|
-
};}, $$
|
|
24651
|
-
}, $Substitutors_restore_callouts$
|
|
24667
|
+
};}, $$70.$$s = self, $$70.$$arity = 1, $$70)).$join($$($nesting, 'LF')));
|
|
24668
|
+
}, $Substitutors_restore_callouts$69.$$arity = -3);
|
|
24652
24669
|
|
|
24653
|
-
Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$
|
|
24670
|
+
Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$72 = function $$extract_inner_passthrough(text, pre) {
|
|
24654
24671
|
var $a, $b, self = this, $writer = nil, passthru_key = nil;
|
|
24655
24672
|
if (self.passthroughs == null) self.passthroughs = nil;
|
|
24656
24673
|
|
|
@@ -24668,9 +24685,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24668
24685
|
} else {
|
|
24669
24686
|
return "" + (pre) + "`" + (text) + "`"
|
|
24670
24687
|
}
|
|
24671
|
-
}, $Substitutors_extract_inner_passthrough$
|
|
24688
|
+
}, $Substitutors_extract_inner_passthrough$72.$$arity = 2);
|
|
24672
24689
|
|
|
24673
|
-
Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$
|
|
24690
|
+
Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
|
|
24674
24691
|
var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
|
|
24675
24692
|
|
|
24676
24693
|
|
|
@@ -24701,9 +24718,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24701
24718
|
type = "unquoted"};};
|
|
24702
24719
|
return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
|
|
24703
24720
|
};
|
|
24704
|
-
}, $Substitutors_convert_quoted_text$
|
|
24721
|
+
}, $Substitutors_convert_quoted_text$73.$$arity = 3);
|
|
24705
24722
|
|
|
24706
|
-
Opal.def(self, '$do_replacement', $Substitutors_do_replacement$
|
|
24723
|
+
Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
|
|
24707
24724
|
var self = this, captured = nil, $case = nil;
|
|
24708
24725
|
|
|
24709
24726
|
if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
|
|
@@ -24714,13 +24731,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24714
24731
|
else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
|
|
24715
24732
|
else {return $rb_plus(m['$[]'](1), replacement)}})()
|
|
24716
24733
|
}
|
|
24717
|
-
}, $Substitutors_do_replacement$
|
|
24734
|
+
}, $Substitutors_do_replacement$74.$$arity = 3);
|
|
24718
24735
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
24719
24736
|
} else {
|
|
24720
24737
|
nil
|
|
24721
24738
|
};
|
|
24722
24739
|
|
|
24723
|
-
Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$
|
|
24740
|
+
Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
|
|
24724
24741
|
var $a, $b, self = this, segments = nil, id = nil, more_roles = nil, roles = nil, attrs = nil, $writer = nil;
|
|
24725
24742
|
|
|
24726
24743
|
|
|
@@ -24764,9 +24781,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24764
24781
|
} else {
|
|
24765
24782
|
return $hash2(["role"], {"role": str})
|
|
24766
24783
|
};
|
|
24767
|
-
}, $Substitutors_parse_quoted_text_attributes$
|
|
24784
|
+
}, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
|
|
24768
24785
|
|
|
24769
|
-
Opal.def(self, '$normalize_text', $Substitutors_normalize_text$
|
|
24786
|
+
Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
|
|
24770
24787
|
var $a, self = this;
|
|
24771
24788
|
|
|
24772
24789
|
|
|
@@ -24787,10 +24804,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24787
24804
|
text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
|
|
24788
24805
|
};
|
|
24789
24806
|
return text;
|
|
24790
|
-
}, $Substitutors_normalize_text$
|
|
24807
|
+
}, $Substitutors_normalize_text$76.$$arity = -2);
|
|
24791
24808
|
|
|
24792
|
-
Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$
|
|
24793
|
-
var $$
|
|
24809
|
+
Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
|
|
24810
|
+
var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
|
|
24794
24811
|
|
|
24795
24812
|
if ($truthy(str['$empty?']())) {
|
|
24796
24813
|
return []
|
|
@@ -24799,7 +24816,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24799
24816
|
values = [];
|
|
24800
24817
|
accum = "";
|
|
24801
24818
|
quote_open = nil;
|
|
24802
|
-
$send(str, 'each_char', [], ($$
|
|
24819
|
+
$send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
|
|
24803
24820
|
|
|
24804
24821
|
|
|
24805
24822
|
|
|
@@ -24815,19 +24832,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
24815
24832
|
return (accum = "");
|
|
24816
24833
|
}}
|
|
24817
24834
|
else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
|
|
24818
|
-
else {return (accum = $rb_plus(accum, c))}})();}, $$
|
|
24835
|
+
else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
|
|
24819
24836
|
return values['$<<'](accum.$strip());
|
|
24820
24837
|
} else {
|
|
24821
|
-
return $send(str.$split(","), 'map', [], ($$
|
|
24838
|
+
return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
|
|
24822
24839
|
|
|
24823
24840
|
|
|
24824
24841
|
|
|
24825
24842
|
if (it == null) {
|
|
24826
24843
|
it = nil;
|
|
24827
24844
|
};
|
|
24828
|
-
return it.$strip();}, $$
|
|
24845
|
+
return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
|
|
24829
24846
|
}
|
|
24830
|
-
}, $Substitutors_split_simple_csv$
|
|
24847
|
+
}, $Substitutors_split_simple_csv$77.$$arity = 1);
|
|
24831
24848
|
})($nesting[0], $nesting)
|
|
24832
24849
|
})($nesting[0], $nesting)
|
|
24833
24850
|
};
|
|
@@ -24841,7 +24858,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
|
|
|
24841
24858
|
|
|
24842
24859
|
var $nesting = [self].concat($parent_nesting);
|
|
24843
24860
|
|
|
24844
|
-
Opal.const_set($nesting[0], 'VERSION', "2.0.
|
|
24861
|
+
Opal.const_set($nesting[0], 'VERSION', "2.0.12")
|
|
24845
24862
|
})($nesting[0], $nesting)
|
|
24846
24863
|
};
|
|
24847
24864
|
|
|
@@ -24855,7 +24872,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24855
24872
|
}
|
|
24856
24873
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send;
|
|
24857
24874
|
|
|
24858
|
-
Opal.add_stubs(['$include', '$attr_reader', '$attr_accessor', '$==', '$document', '$to_s', '$[]', '$merge', '$raise', '$converter', '$attributes', '$key?', '$[]=', '$-', '$delete', '$tap', '$new', '$each_key', '$end_with?', '$<<', '$slice', '$length', '$update', '$split', '$include?', '
|
|
24875
|
+
Opal.add_stubs(['$include', '$attr_reader', '$attr_accessor', '$==', '$document', '$to_s', '$[]', '$merge', '$raise', '$converter', '$attributes', '$key?', '$[]=', '$-', '$delete', '$tap', '$new', '$each_key', '$end_with?', '$<<', '$slice', '$length', '$update', '$split', '$include?', '$===', '$join', '$empty?', '$apply_reftext_subs', '$attr?', '$attr', '$extname?', '$image_uri', '$<', '$safe', '$uriish?', '$encode_spaces_in_uri', '$normalize_web_path', '$generate_data_uri_from_uri', '$generate_data_uri', '$extname', '$normalize_system_path', '$readable?', '$strict_encode64', '$binread', '$warn', '$logger', '$require_library', '$!', '$open_uri', '$content_type', '$read', '$base_dir', '$root?', '$path_resolver', '$system_path', '$web_path', '$!=', '$prepare_source_string', '$fetch', '$read_asset']);
|
|
24859
24876
|
return (function($base, $parent_nesting) {
|
|
24860
24877
|
var self = $module($base, 'Asciidoctor');
|
|
24861
24878
|
|
|
@@ -24864,7 +24881,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24864
24881
|
(function($base, $super, $parent_nesting) {
|
|
24865
24882
|
var self = $klass($base, $super, 'AbstractNode');
|
|
24866
24883
|
|
|
24867
|
-
var $nesting = [self].concat($parent_nesting), $AbstractNode_initialize$1, $AbstractNode_block$ques$2, $AbstractNode_inline$ques$3, $AbstractNode_converter$4, $AbstractNode_parent$eq$5, $AbstractNode_attr$6, $AbstractNode_attr$ques$7, $AbstractNode_set_attr$8, $AbstractNode_remove_attr$9, $AbstractNode_option$ques$10, $AbstractNode_set_option$11, $AbstractNode_enabled_options$12, $AbstractNode_update_attributes$15, $AbstractNode_role$16, $AbstractNode_roles$17, $AbstractNode_role$ques$18, $AbstractNode_has_role$ques$19, $
|
|
24884
|
+
var $nesting = [self].concat($parent_nesting), $AbstractNode_initialize$1, $AbstractNode_block$ques$2, $AbstractNode_inline$ques$3, $AbstractNode_converter$4, $AbstractNode_parent$eq$5, $AbstractNode_attr$6, $AbstractNode_attr$ques$7, $AbstractNode_set_attr$8, $AbstractNode_remove_attr$9, $AbstractNode_option$ques$10, $AbstractNode_set_option$11, $AbstractNode_enabled_options$12, $AbstractNode_update_attributes$15, $AbstractNode_role$16, $AbstractNode_roles$17, $AbstractNode_role$ques$18, $AbstractNode_has_role$ques$19, $AbstractNode_role$eq$20, $AbstractNode_add_role$21, $AbstractNode_remove_role$22, $AbstractNode_reftext$23, $AbstractNode_reftext$ques$24, $AbstractNode_icon_uri$25, $AbstractNode_image_uri$26, $AbstractNode_media_uri$27, $AbstractNode_generate_data_uri$28, $AbstractNode_generate_data_uri_from_uri$29, $AbstractNode_normalize_asset_path$31, $AbstractNode_normalize_system_path$32, $AbstractNode_normalize_web_path$33, $AbstractNode_read_asset$34, $AbstractNode_read_contents$35, $AbstractNode_is_uri$ques$38;
|
|
24868
24885
|
|
|
24869
24886
|
self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil;
|
|
24870
24887
|
|
|
@@ -25101,7 +25118,21 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25101
25118
|
}
|
|
25102
25119
|
}, $AbstractNode_has_role$ques$19.$$arity = 1);
|
|
25103
25120
|
|
|
25104
|
-
Opal.def(self, '$
|
|
25121
|
+
Opal.def(self, '$role=', $AbstractNode_role$eq$20 = function(names) {
|
|
25122
|
+
var self = this, $writer = nil;
|
|
25123
|
+
|
|
25124
|
+
|
|
25125
|
+
$writer = ["role", (function() {if ($truthy($$$('::', 'Array')['$==='](names))) {
|
|
25126
|
+
|
|
25127
|
+
return names.$join(" ");
|
|
25128
|
+
} else {
|
|
25129
|
+
return names
|
|
25130
|
+
}; return nil; })()];
|
|
25131
|
+
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
25132
|
+
return $writer[$rb_minus($writer["length"], 1)];
|
|
25133
|
+
}, $AbstractNode_role$eq$20.$$arity = 1);
|
|
25134
|
+
|
|
25135
|
+
Opal.def(self, '$add_role', $AbstractNode_add_role$21 = function $$add_role(name) {
|
|
25105
25136
|
var self = this, val = nil, $writer = nil;
|
|
25106
25137
|
|
|
25107
25138
|
if ($truthy((val = self.attributes['$[]']("role")))) {
|
|
@@ -25123,9 +25154,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25123
25154
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
25124
25155
|
return true;
|
|
25125
25156
|
}
|
|
25126
|
-
}, $AbstractNode_add_role$
|
|
25157
|
+
}, $AbstractNode_add_role$21.$$arity = 1);
|
|
25127
25158
|
|
|
25128
|
-
Opal.def(self, '$remove_role', $AbstractNode_remove_role$
|
|
25159
|
+
Opal.def(self, '$remove_role', $AbstractNode_remove_role$22 = function $$remove_role(name) {
|
|
25129
25160
|
var $a, self = this, val = nil, $writer = nil;
|
|
25130
25161
|
|
|
25131
25162
|
if ($truthy(($truthy($a = (val = self.attributes['$[]']("role"))) ? (val = val.$split()).$delete(name) : $a))) {
|
|
@@ -25142,9 +25173,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25142
25173
|
} else {
|
|
25143
25174
|
return false
|
|
25144
25175
|
}
|
|
25145
|
-
}, $AbstractNode_remove_role$
|
|
25176
|
+
}, $AbstractNode_remove_role$22.$$arity = 1);
|
|
25146
25177
|
|
|
25147
|
-
Opal.def(self, '$reftext', $AbstractNode_reftext$
|
|
25178
|
+
Opal.def(self, '$reftext', $AbstractNode_reftext$23 = function $$reftext() {
|
|
25148
25179
|
var self = this, val = nil;
|
|
25149
25180
|
|
|
25150
25181
|
if ($truthy((val = self.attributes['$[]']("reftext")))) {
|
|
@@ -25153,15 +25184,15 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25153
25184
|
} else {
|
|
25154
25185
|
return nil
|
|
25155
25186
|
}
|
|
25156
|
-
}, $AbstractNode_reftext$
|
|
25187
|
+
}, $AbstractNode_reftext$23.$$arity = 0);
|
|
25157
25188
|
|
|
25158
|
-
Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$
|
|
25189
|
+
Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$24 = function() {
|
|
25159
25190
|
var self = this;
|
|
25160
25191
|
|
|
25161
25192
|
return self.attributes['$key?']("reftext")
|
|
25162
|
-
}, $AbstractNode_reftext$ques$
|
|
25193
|
+
}, $AbstractNode_reftext$ques$24.$$arity = 0);
|
|
25163
25194
|
|
|
25164
|
-
Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$
|
|
25195
|
+
Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$25 = function $$icon_uri(name) {
|
|
25165
25196
|
var self = this, icon = nil;
|
|
25166
25197
|
|
|
25167
25198
|
|
|
@@ -25176,9 +25207,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25176
25207
|
icon = "" + (name) + "." + (self.document.$attr("icontype", "png"))
|
|
25177
25208
|
};
|
|
25178
25209
|
return self.$image_uri(icon, "iconsdir");
|
|
25179
|
-
}, $AbstractNode_icon_uri$
|
|
25210
|
+
}, $AbstractNode_icon_uri$25.$$arity = 1);
|
|
25180
25211
|
|
|
25181
|
-
Opal.def(self, '$image_uri', $AbstractNode_image_uri$
|
|
25212
|
+
Opal.def(self, '$image_uri', $AbstractNode_image_uri$26 = function $$image_uri(target_image, asset_dir_key) {
|
|
25182
25213
|
var $a, $b, $c, $d, self = this, doc = nil, images_base = nil;
|
|
25183
25214
|
|
|
25184
25215
|
|
|
@@ -25205,9 +25236,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25205
25236
|
return nil
|
|
25206
25237
|
}; return nil; })())
|
|
25207
25238
|
};
|
|
25208
|
-
}, $AbstractNode_image_uri$
|
|
25239
|
+
}, $AbstractNode_image_uri$26.$$arity = -2);
|
|
25209
25240
|
|
|
25210
|
-
Opal.def(self, '$media_uri', $AbstractNode_media_uri$
|
|
25241
|
+
Opal.def(self, '$media_uri', $AbstractNode_media_uri$27 = function $$media_uri(target, asset_dir_key) {
|
|
25211
25242
|
var self = this;
|
|
25212
25243
|
|
|
25213
25244
|
|
|
@@ -25220,9 +25251,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25220
25251
|
} else {
|
|
25221
25252
|
return nil
|
|
25222
25253
|
}; return nil; })());
|
|
25223
|
-
}, $AbstractNode_media_uri$
|
|
25254
|
+
}, $AbstractNode_media_uri$27.$$arity = -2);
|
|
25224
25255
|
|
|
25225
|
-
Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$
|
|
25256
|
+
Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$28 = function $$generate_data_uri(target_image, asset_dir_key) {
|
|
25226
25257
|
var self = this, ext = nil, mimetype = nil, image_path = nil;
|
|
25227
25258
|
|
|
25228
25259
|
|
|
@@ -25251,10 +25282,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25251
25282
|
self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
|
|
25252
25283
|
return "" + "data:" + (mimetype) + ";base64,";
|
|
25253
25284
|
};
|
|
25254
|
-
}, $AbstractNode_generate_data_uri$
|
|
25285
|
+
}, $AbstractNode_generate_data_uri$28.$$arity = -2);
|
|
25255
25286
|
|
|
25256
|
-
Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$
|
|
25257
|
-
var $a, $b, $$
|
|
25287
|
+
Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$29 = function $$generate_data_uri_from_uri(image_uri, cache_uri) {
|
|
25288
|
+
var $a, $b, $$30, self = this, mimetype = nil, bindata = nil;
|
|
25258
25289
|
|
|
25259
25290
|
|
|
25260
25291
|
|
|
@@ -25268,14 +25299,14 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25268
25299
|
|
|
25269
25300
|
try {
|
|
25270
25301
|
|
|
25271
|
-
$b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$
|
|
25302
|
+
$b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$30 = function(f){var self = $$30.$$s || this;
|
|
25272
25303
|
|
|
25273
25304
|
|
|
25274
25305
|
|
|
25275
25306
|
if (f == null) {
|
|
25276
25307
|
f = nil;
|
|
25277
25308
|
};
|
|
25278
|
-
return [f.$content_type(), f.$read()];}, $$
|
|
25309
|
+
return [f.$content_type(), f.$read()];}, $$30.$$s = self, $$30.$$arity = 1, $$30)), $a = Opal.to_ary($b), (mimetype = ($a[0] == null ? nil : $a[0])), (bindata = ($a[1] == null ? nil : $a[1])), $b;
|
|
25279
25310
|
return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata));
|
|
25280
25311
|
} catch ($err) {
|
|
25281
25312
|
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
@@ -25286,9 +25317,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25286
25317
|
} finally { Opal.pop_exception() }
|
|
25287
25318
|
} else { throw $err; }
|
|
25288
25319
|
};;
|
|
25289
|
-
}, $AbstractNode_generate_data_uri_from_uri$
|
|
25320
|
+
}, $AbstractNode_generate_data_uri_from_uri$29.$$arity = -2);
|
|
25290
25321
|
|
|
25291
|
-
Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$
|
|
25322
|
+
Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$31 = function $$normalize_asset_path(asset_ref, asset_name, autocorrect) {
|
|
25292
25323
|
var self = this;
|
|
25293
25324
|
|
|
25294
25325
|
|
|
@@ -25301,9 +25332,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25301
25332
|
autocorrect = true;
|
|
25302
25333
|
};
|
|
25303
25334
|
return self.$normalize_system_path(asset_ref, self.document.$base_dir(), nil, $hash2(["target_name", "recover"], {"target_name": asset_name, "recover": autocorrect}));
|
|
25304
|
-
}, $AbstractNode_normalize_asset_path$
|
|
25335
|
+
}, $AbstractNode_normalize_asset_path$31.$$arity = -2);
|
|
25305
25336
|
|
|
25306
|
-
Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$
|
|
25337
|
+
Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$32 = function $$normalize_system_path(target, start, jail, opts) {
|
|
25307
25338
|
var self = this, doc = nil;
|
|
25308
25339
|
|
|
25309
25340
|
|
|
@@ -25340,9 +25371,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25340
25371
|
};
|
|
25341
25372
|
};
|
|
25342
25373
|
return doc.$path_resolver().$system_path(target, start, jail, opts);
|
|
25343
|
-
}, $AbstractNode_normalize_system_path$
|
|
25374
|
+
}, $AbstractNode_normalize_system_path$32.$$arity = -2);
|
|
25344
25375
|
|
|
25345
|
-
Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$
|
|
25376
|
+
Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$33 = function $$normalize_web_path(target, start, preserve_uri_target) {
|
|
25346
25377
|
var $a, self = this;
|
|
25347
25378
|
|
|
25348
25379
|
|
|
@@ -25359,9 +25390,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25359
25390
|
} else {
|
|
25360
25391
|
return self.document.$path_resolver().$web_path(target, start)
|
|
25361
25392
|
};
|
|
25362
|
-
}, $AbstractNode_normalize_web_path$
|
|
25393
|
+
}, $AbstractNode_normalize_web_path$33.$$arity = -2);
|
|
25363
25394
|
|
|
25364
|
-
Opal.def(self, '$read_asset', $AbstractNode_read_asset$
|
|
25395
|
+
Opal.def(self, '$read_asset', $AbstractNode_read_asset$34 = function $$read_asset(path, opts) {
|
|
25365
25396
|
var $a, self = this;
|
|
25366
25397
|
|
|
25367
25398
|
|
|
@@ -25388,10 +25419,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25388
25419
|
} else {
|
|
25389
25420
|
return nil
|
|
25390
25421
|
};
|
|
25391
|
-
}, $AbstractNode_read_asset$
|
|
25422
|
+
}, $AbstractNode_read_asset$34.$$arity = -2);
|
|
25392
25423
|
|
|
25393
|
-
Opal.def(self, '$read_contents', $AbstractNode_read_contents$
|
|
25394
|
-
var $a, $b, $c, $$
|
|
25424
|
+
Opal.def(self, '$read_contents', $AbstractNode_read_contents$35 = function $$read_contents(target, opts) {
|
|
25425
|
+
var $a, $b, $c, $$36, $$37, self = this, doc = nil, start = nil, contents = nil;
|
|
25395
25426
|
|
|
25396
25427
|
|
|
25397
25428
|
|
|
@@ -25407,51 +25438,48 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25407
25438
|
|
|
25408
25439
|
try {
|
|
25409
25440
|
if ($truthy(opts['$[]']("normalize"))) {
|
|
25410
|
-
|
|
25441
|
+
contents = $$($nesting, 'Helpers').$prepare_source_string($send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$36 = function(f){var self = $$36.$$s || this;
|
|
25411
25442
|
|
|
25412
25443
|
|
|
25413
25444
|
|
|
25414
25445
|
if (f == null) {
|
|
25415
25446
|
f = nil;
|
|
25416
25447
|
};
|
|
25417
|
-
return f.$read();}, $$
|
|
25448
|
+
return f.$read();}, $$36.$$s = self, $$36.$$arity = 1, $$36))).$join($$($nesting, 'LF'))
|
|
25418
25449
|
} else {
|
|
25419
|
-
|
|
25450
|
+
contents = $send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$37 = function(f){var self = $$37.$$s || this;
|
|
25420
25451
|
|
|
25421
25452
|
|
|
25422
25453
|
|
|
25423
25454
|
if (f == null) {
|
|
25424
25455
|
f = nil;
|
|
25425
25456
|
};
|
|
25426
|
-
return f.$read();}, $$
|
|
25457
|
+
return f.$read();}, $$37.$$s = self, $$37.$$arity = 1, $$37))
|
|
25427
25458
|
}
|
|
25428
25459
|
} catch ($err) {
|
|
25429
25460
|
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
25430
25461
|
try {
|
|
25431
|
-
|
|
25432
25462
|
if ($truthy(opts.$fetch("warn_on_failure", true))) {
|
|
25433
|
-
self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))}
|
|
25434
|
-
return nil;
|
|
25463
|
+
self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))}
|
|
25435
25464
|
} finally { Opal.pop_exception() }
|
|
25436
25465
|
} else { throw $err; }
|
|
25437
25466
|
};;
|
|
25438
|
-
} else {
|
|
25439
|
-
|
|
25440
|
-
if ($truthy(opts.$fetch("warn_on_failure", true))) {
|
|
25441
|
-
self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")};
|
|
25442
|
-
return nil;
|
|
25443
|
-
}
|
|
25467
|
+
} else if ($truthy(opts.$fetch("warn_on_failure", true))) {
|
|
25468
|
+
self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")}
|
|
25444
25469
|
} else {
|
|
25445
25470
|
|
|
25446
25471
|
target = self.$normalize_system_path(target, opts['$[]']("start"), nil, $hash2(["target_name"], {"target_name": ($truthy($a = opts['$[]']("label")) ? $a : "asset")}));
|
|
25447
|
-
|
|
25472
|
+
contents = self.$read_asset(target, $hash2(["normalize", "warn_on_failure", "label"], {"normalize": opts['$[]']("normalize"), "warn_on_failure": opts.$fetch("warn_on_failure", true), "label": opts['$[]']("label")}));
|
|
25448
25473
|
};
|
|
25449
|
-
|
|
25450
|
-
|
|
25474
|
+
if ($truthy(($truthy($a = ($truthy($b = contents) ? opts['$[]']("warn_if_empty") : $b)) ? contents['$empty?']() : $a))) {
|
|
25475
|
+
self.$logger().$warn("" + "contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " is empty: " + (target))};
|
|
25476
|
+
return contents;
|
|
25477
|
+
}, $AbstractNode_read_contents$35.$$arity = -2);
|
|
25478
|
+
return (Opal.def(self, '$is_uri?', $AbstractNode_is_uri$ques$38 = function(str) {
|
|
25451
25479
|
var self = this;
|
|
25452
25480
|
|
|
25453
25481
|
return $$($nesting, 'Helpers')['$uriish?'](str)
|
|
25454
|
-
}, $AbstractNode_is_uri$ques$
|
|
25482
|
+
}, $AbstractNode_is_uri$ques$38.$$arity = 1), nil) && 'is_uri?';
|
|
25455
25483
|
})($nesting[0], null, $nesting)
|
|
25456
25484
|
})($nesting[0], $nesting)
|
|
25457
25485
|
};
|
|
@@ -25469,7 +25497,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25469
25497
|
}
|
|
25470
25498
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy;
|
|
25471
25499
|
|
|
25472
|
-
Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$==', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '$parent', '$parent=', '$-', '$<<', '$empty?', '$>', '$Integer', '$find_by_internal', '$to_proc', '$context', '$[]', '$items', '$+', '$find_index', '$include?', '$next_adjacent_block', '$blocks', '$select', '$sub_specialchars', '$match?', '$sub_replacements', '$title', '$apply_title_subs', '$delete', '$reftext', '$!', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$attributes', '$chomp', '$increment_and_store_counter', '$index=', '$numbered', '$sectname', '$counter', '$numeral=', '$numeral', '$caption=', '$int_to_roman', '$each', '$assign_numeral', '$reindex_sections', '$protected', '$has_role?', '$raise', '$header?', '$!=', '$flatten', '$head', '$rows', '$merge', '$body', '$foot', '$style', '$inner_document']);
|
|
25500
|
+
Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$==', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '$parent', '$parent=', '$-', '$<<', '$empty?', '$>', '$Integer', '$find_by_internal', '$to_proc', '$context', '$[]', '$items', '$+', '$find_index', '$include?', '$next_adjacent_block', '$blocks', '$select', '$sub_specialchars', '$match?', '$sub_replacements', '$title', '$apply_title_subs', '$delete', '$reftext', '$!', '$nil_or_empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$attributes', '$chomp', '$increment_and_store_counter', '$index=', '$numbered', '$sectname', '$counter', '$numeral=', '$numeral', '$caption=', '$int_to_roman', '$each', '$assign_numeral', '$reindex_sections', '$protected', '$has_role?', '$raise', '$header?', '$!=', '$flatten', '$head', '$rows', '$merge', '$body', '$foot', '$style', '$inner_document']);
|
|
25473
25501
|
return (function($base, $parent_nesting) {
|
|
25474
25502
|
var self = $module($base, 'Asciidoctor');
|
|
25475
25503
|
|
|
@@ -25786,7 +25814,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25786
25814
|
};
|
|
25787
25815
|
if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) {
|
|
25788
25816
|
return val
|
|
25789
|
-
} else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption : $a))) {
|
|
25817
|
+
} else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption['$nil_or_empty?']()['$!']() : $a))) {
|
|
25790
25818
|
return (function() {$case = xrefstyle;
|
|
25791
25819
|
if ("full"['$===']($case)) {
|
|
25792
25820
|
quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) {
|
|
@@ -26052,7 +26080,7 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
26052
26080
|
}
|
|
26053
26081
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash = Opal.hash, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send;
|
|
26054
26082
|
|
|
26055
|
-
Opal.add_stubs(['$new', '$[]', '$update', '$parse', '$parse_attribute', '$eos?', '$skip_delimiter', '$+', '$rekey', '$
|
|
26083
|
+
Opal.add_stubs(['$new', '$[]', '$update', '$parse', '$parse_attribute', '$eos?', '$skip_delimiter', '$+', '$rekey', '$each_with_index', '$[]=', '$-', '$private', '$skip_blank', '$peek', '$===', '$parse_attribute_value', '$get_byte', '$start_with?', '$scan_name', '$end_with?', '$rstrip', '$string', '$==', '$unscan', '$scan_to_delimiter', '$*', '$include?', '$delete', '$each', '$split', '$empty?', '$apply_subs', '$scan_to_quote', '$gsub', '$skip', '$scan']);
|
|
26056
26084
|
return (function($base, $parent_nesting) {
|
|
26057
26085
|
var self = $module($base, 'Asciidoctor');
|
|
26058
26086
|
|
|
@@ -26065,10 +26093,11 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
26065
26093
|
|
|
26066
26094
|
self.$$prototype.attributes = self.$$prototype.scanner = self.$$prototype.delimiter = self.$$prototype.block = self.$$prototype.delimiter_skip_pattern = self.$$prototype.delimiter_boundary_pattern = nil;
|
|
26067
26095
|
|
|
26068
|
-
Opal.const_set($nesting[0], 'BACKSLASH', "\\");
|
|
26069
26096
|
Opal.const_set($nesting[0], 'APOS', "'");
|
|
26070
|
-
Opal.const_set($nesting[0], '
|
|
26071
|
-
Opal.const_set($nesting[0], '
|
|
26097
|
+
Opal.const_set($nesting[0], 'BACKSLASH', "\\");
|
|
26098
|
+
Opal.const_set($nesting[0], 'QUOT', "\"");
|
|
26099
|
+
Opal.const_set($nesting[0], 'BoundaryRxs', $hash($$($nesting, 'QUOT'), /.*?[^\\](?=")/, $$($nesting, 'APOS'), /.*?[^\\](?=')/, ",", /.*?(?=[ \t]*(,|$))/));
|
|
26100
|
+
Opal.const_set($nesting[0], 'EscapedQuotes', $hash($$($nesting, 'QUOT'), "\\\"", $$($nesting, 'APOS'), "\\'"));
|
|
26072
26101
|
Opal.const_set($nesting[0], 'NameRx', new RegExp("" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-.]*"));
|
|
26073
26102
|
Opal.const_set($nesting[0], 'BlankRx', /[ \t]+/);
|
|
26074
26103
|
Opal.const_set($nesting[0], 'SkipRxs', $hash2([","], {",": /[ \t]*(,|$)/}));
|
|
@@ -26132,104 +26161,83 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
26132
26161
|
return $$($nesting, 'AttributeList').$rekey(self.attributes, positional_attrs)
|
|
26133
26162
|
}, $AttributeList_rekey$4.$$arity = 1);
|
|
26134
26163
|
Opal.defs(self, '$rekey', $AttributeList_rekey$5 = function $$rekey(attributes, positional_attrs) {
|
|
26135
|
-
var $$6, self = this
|
|
26164
|
+
var $$6, self = this;
|
|
26136
26165
|
|
|
26137
26166
|
|
|
26138
|
-
index =
|
|
26139
|
-
$send(positional_attrs, 'each', [], ($$6 = function(key){var self = $$6.$$s || this, val = nil, $writer = nil;
|
|
26167
|
+
$send(positional_attrs, 'each_with_index', [], ($$6 = function(key, index){var self = $$6.$$s || this, $a, val = nil, $writer = nil;
|
|
26140
26168
|
|
|
26141
26169
|
|
|
26142
26170
|
|
|
26143
26171
|
if (key == null) {
|
|
26144
26172
|
key = nil;
|
|
26145
26173
|
};
|
|
26146
|
-
|
|
26147
|
-
if (
|
|
26148
|
-
|
|
26149
|
-
|
|
26150
|
-
|
|
26151
|
-
|
|
26152
|
-
|
|
26153
|
-
|
|
26154
|
-
|
|
26155
|
-
}
|
|
26174
|
+
|
|
26175
|
+
if (index == null) {
|
|
26176
|
+
index = nil;
|
|
26177
|
+
};
|
|
26178
|
+
if ($truthy(($truthy($a = key) ? (val = attributes['$[]']($rb_plus(index, 1))) : $a))) {
|
|
26179
|
+
|
|
26180
|
+
$writer = [key, val];
|
|
26181
|
+
$send(attributes, '[]=', Opal.to_a($writer));
|
|
26182
|
+
return $writer[$rb_minus($writer["length"], 1)];
|
|
26156
26183
|
} else {
|
|
26157
26184
|
return nil
|
|
26158
|
-
};}, $$6.$$s = self, $$6.$$arity =
|
|
26185
|
+
};}, $$6.$$s = self, $$6.$$arity = 2, $$6));
|
|
26159
26186
|
return attributes;
|
|
26160
26187
|
}, $AttributeList_rekey$5.$$arity = 2);
|
|
26161
26188
|
self.$private();
|
|
26162
26189
|
|
|
26163
26190
|
Opal.def(self, '$parse_attribute', $AttributeList_parse_attribute$7 = function $$parse_attribute(index, positional_attrs) {
|
|
26164
|
-
var $a, $$8, self = this,
|
|
26191
|
+
var $a, $b, $$8, self = this, continue$ = nil, $case = nil, name = nil, single_quoted = nil, skipped = nil, c = nil, value = nil, $writer = nil, positional_attr_name = nil;
|
|
26165
26192
|
|
|
26166
26193
|
|
|
26167
|
-
|
|
26168
|
-
if (index == null) {
|
|
26169
|
-
index = 0;
|
|
26170
|
-
};
|
|
26171
|
-
|
|
26172
|
-
if (positional_attrs == null) {
|
|
26173
|
-
positional_attrs = [];
|
|
26174
|
-
};
|
|
26175
|
-
single_quoted_value = false;
|
|
26194
|
+
continue$ = true;
|
|
26176
26195
|
self.$skip_blank();
|
|
26177
|
-
|
|
26178
|
-
|
|
26179
|
-
|
|
26180
|
-
|
|
26181
|
-
|
|
26182
|
-
|
|
26183
|
-
name = self.$parse_attribute_value(self.scanner.$get_byte());
|
|
26184
|
-
value = nil;
|
|
26185
|
-
if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) {
|
|
26186
|
-
} else {
|
|
26187
|
-
single_quoted_value = true
|
|
26188
|
-
};
|
|
26196
|
+
$case = self.scanner.$peek(1);
|
|
26197
|
+
if ($$($nesting, 'QUOT')['$===']($case)) {name = self.$parse_attribute_value(self.scanner.$get_byte())}
|
|
26198
|
+
else if ($$($nesting, 'APOS')['$===']($case)) {
|
|
26199
|
+
name = self.$parse_attribute_value(self.scanner.$get_byte());
|
|
26200
|
+
if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) {
|
|
26189
26201
|
} else {
|
|
26202
|
+
single_quoted = true
|
|
26203
|
+
};}
|
|
26204
|
+
else {
|
|
26205
|
+
skipped = ($truthy($a = ($truthy($b = (name = self.$scan_name())) ? self.$skip_blank() : $b)) ? $a : 0);
|
|
26206
|
+
if ($truthy(self.scanner['$eos?']())) {
|
|
26190
26207
|
|
|
26191
|
-
|
|
26192
|
-
skipped = 0;
|
|
26193
|
-
c = nil;
|
|
26194
|
-
if ($truthy(self.scanner['$eos?']())) {
|
|
26195
|
-
if ($truthy(name)) {
|
|
26196
|
-
} else {
|
|
26197
|
-
return false
|
|
26198
|
-
}
|
|
26208
|
+
if ($truthy(($truthy($a = name) ? $a : self.scanner.$string().$rstrip()['$end_with?'](self.delimiter)))) {
|
|
26199
26209
|
} else {
|
|
26200
|
-
|
|
26201
|
-
skipped = ($truthy($a = self.$skip_blank()) ? $a : 0);
|
|
26202
|
-
c = self.scanner.$get_byte();
|
|
26210
|
+
return nil
|
|
26203
26211
|
};
|
|
26204
|
-
|
|
26205
|
-
|
|
26206
|
-
|
|
26207
|
-
|
|
26208
|
-
|
|
26209
|
-
value = nil;
|
|
26210
|
-
} else {
|
|
26212
|
+
continue$ = nil;
|
|
26213
|
+
} else if ((c = self.scanner.$get_byte())['$=='](self.delimiter)) {
|
|
26214
|
+
self.scanner.$unscan()
|
|
26215
|
+
} else if ($truthy(name)) {
|
|
26216
|
+
if (c['$==']("=")) {
|
|
26211
26217
|
|
|
26212
26218
|
self.$skip_blank();
|
|
26213
|
-
|
|
26214
|
-
|
|
26215
|
-
|
|
26216
|
-
|
|
26217
|
-
|
|
26218
|
-
|
|
26219
|
-
|
|
26220
|
-
|
|
26221
|
-
|
|
26222
|
-
|
|
26223
|
-
|
|
26224
|
-
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
|
|
26228
|
-
|
|
26229
|
-
|
|
26230
|
-
|
|
26231
|
-
}
|
|
26232
|
-
}
|
|
26219
|
+
$case = (c = self.scanner.$get_byte());
|
|
26220
|
+
if ($$($nesting, 'QUOT')['$===']($case)) {value = self.$parse_attribute_value(c)}
|
|
26221
|
+
else if ($$($nesting, 'APOS')['$===']($case)) {
|
|
26222
|
+
value = self.$parse_attribute_value(c);
|
|
26223
|
+
if ($truthy(value['$start_with?']($$($nesting, 'APOS')))) {
|
|
26224
|
+
} else {
|
|
26225
|
+
single_quoted = true
|
|
26226
|
+
};}
|
|
26227
|
+
else if (self.delimiter['$===']($case)) {
|
|
26228
|
+
value = "";
|
|
26229
|
+
self.scanner.$unscan();}
|
|
26230
|
+
else if (nil['$===']($case)) {value = ""}
|
|
26231
|
+
else {
|
|
26232
|
+
value = "" + (c) + (self.$scan_to_delimiter());
|
|
26233
|
+
if (value['$==']("None")) {
|
|
26234
|
+
return true};};
|
|
26235
|
+
} else {
|
|
26236
|
+
name = "" + (name) + ($rb_times(" ", skipped)) + (c) + (self.$scan_to_delimiter())
|
|
26237
|
+
}
|
|
26238
|
+
} else {
|
|
26239
|
+
name = "" + (c) + (self.$scan_to_delimiter())
|
|
26240
|
+
};};
|
|
26233
26241
|
if ($truthy(value)) {
|
|
26234
26242
|
$case = name;
|
|
26235
26243
|
if ("options"['$===']($case) || "opts"['$===']($case)) {if ($truthy(value['$include?'](","))) {
|
|
@@ -26259,7 +26267,7 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
26259
26267
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
26260
26268
|
$writer[$rb_minus($writer["length"], 1)];
|
|
26261
26269
|
}}
|
|
26262
|
-
else {if ($truthy(($truthy($a =
|
|
26270
|
+
else {if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) {
|
|
26263
26271
|
$case = name;
|
|
26264
26272
|
if ("title"['$===']($case) || "reftext"['$===']($case)) {
|
|
26265
26273
|
$writer = [name, value];
|
|
@@ -26277,44 +26285,40 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
26277
26285
|
}}
|
|
26278
26286
|
} else {
|
|
26279
26287
|
|
|
26280
|
-
|
|
26281
|
-
|
|
26282
|
-
return self.block.$apply_subs(name);
|
|
26283
|
-
} else {
|
|
26284
|
-
return name
|
|
26285
|
-
}; return nil; })();
|
|
26288
|
+
if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) {
|
|
26289
|
+
name = self.block.$apply_subs(name)};
|
|
26286
26290
|
if ($truthy((positional_attr_name = positional_attrs['$[]'](index)))) {
|
|
26287
26291
|
|
|
26288
|
-
$writer = [positional_attr_name,
|
|
26292
|
+
$writer = [positional_attr_name, name];
|
|
26289
26293
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
26290
26294
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
26291
26295
|
|
|
26292
|
-
$writer = [$rb_plus(index, 1),
|
|
26296
|
+
$writer = [$rb_plus(index, 1), name];
|
|
26293
26297
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
26294
26298
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
26295
26299
|
};
|
|
26296
|
-
return
|
|
26297
|
-
}, $AttributeList_parse_attribute$7.$$arity =
|
|
26300
|
+
return continue$;
|
|
26301
|
+
}, $AttributeList_parse_attribute$7.$$arity = 2);
|
|
26298
26302
|
|
|
26299
26303
|
Opal.def(self, '$parse_attribute_value', $AttributeList_parse_attribute_value$9 = function $$parse_attribute_value(quote) {
|
|
26300
26304
|
var self = this, value = nil;
|
|
26301
26305
|
|
|
26302
|
-
|
|
26303
26306
|
if (self.scanner.$peek(1)['$=='](quote)) {
|
|
26304
26307
|
|
|
26305
26308
|
self.scanner.$get_byte();
|
|
26306
|
-
return "";
|
|
26307
|
-
if ($truthy((value = self.$scan_to_quote(quote)))) {
|
|
26309
|
+
return "";
|
|
26310
|
+
} else if ($truthy((value = self.$scan_to_quote(quote)))) {
|
|
26308
26311
|
|
|
26309
26312
|
self.scanner.$get_byte();
|
|
26310
26313
|
if ($truthy(value['$include?']($$($nesting, 'BACKSLASH')))) {
|
|
26311
|
-
|
|
26314
|
+
|
|
26315
|
+
return value.$gsub($$($nesting, 'EscapedQuotes')['$[]'](quote), quote);
|
|
26312
26316
|
} else {
|
|
26313
26317
|
return value
|
|
26314
26318
|
};
|
|
26315
26319
|
} else {
|
|
26316
26320
|
return "" + (quote) + (self.$scan_to_delimiter())
|
|
26317
|
-
}
|
|
26321
|
+
}
|
|
26318
26322
|
}, $AttributeList_parse_attribute_value$9.$$arity = 1);
|
|
26319
26323
|
|
|
26320
26324
|
Opal.def(self, '$skip_blank', $AttributeList_skip_blank$10 = function $$skip_blank() {
|
|
@@ -27147,9 +27151,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27147
27151
|
function $rb_lt(lhs, rhs) {
|
|
27148
27152
|
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
|
|
27149
27153
|
}
|
|
27150
|
-
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $
|
|
27154
|
+
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $hash = Opal.hash, $gvars = Opal.gvars;
|
|
27151
27155
|
|
|
27152
|
-
Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$attributes', '$safe', '$compat_mode', '$outfilesuffix', '$sourcemap', '$path_resolver', '$converter', '$extensions', '$syntax_highlighter', '$each', '$end_with?', '$start_with?', '$slice', '$length', '$chop', '$==', '$downcase', '$extname', '$===', '$value_for_name', '$key?', '$freeze', '$attribute_undefined', '$attribute_missing', '$update', '$name_for_value', '$expand_path', '$pwd', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$groups', '$create', '$to_proc', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$nil_or_empty?', '$nextval', '$to_s', '$value', '$save_to', '$register', '$tap', '$xreftext', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$>', '$<', '$find', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$attribute_locked?', '$apply_attribute_value_subs', '$delete?', '$start', '$doctype', '$content_model', '$warn', '$logger', '$content', '$convert', '$postprocessors?', '$postprocessors', '$record', '$write', '$respond_to?', '$chomp', '$class', '$write_alternate_pages', '$map', '$split', '$resolve_docinfo_subs', '
|
|
27156
|
+
Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$attributes', '$safe', '$compat_mode', '$outfilesuffix', '$sourcemap', '$path_resolver', '$converter', '$extensions', '$syntax_highlighter', '$each', '$end_with?', '$start_with?', '$slice', '$length', '$chop', '$==', '$downcase', '$extname', '$===', '$value_for_name', '$key?', '$freeze', '$attribute_undefined', '$attribute_missing', '$update', '$&', '$keys', '$name_for_value', '$expand_path', '$pwd', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$groups', '$create', '$to_proc', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$nil_or_empty?', '$nextval', '$to_s', '$value', '$save_to', '$register', '$tap', '$xreftext', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$>', '$<', '$find', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$attribute_locked?', '$apply_attribute_value_subs', '$delete?', '$start', '$doctype', '$content_model', '$warn', '$logger', '$content', '$convert', '$postprocessors?', '$postprocessors', '$record', '$write', '$respond_to?', '$chomp', '$class', '$write_alternate_pages', '$map', '$split', '$resolve_docinfo_subs', '$normalize_system_path', '$read_asset', '$apply_subs', '$docinfo_processors?', '$join', '$concat', '$compact', '$docinfo_processors', '$object_id', '$inspect', '$size', '$private', '$=~', '$resolve_pass_subs', '$apply_header_subs', '$limit_bytesize', '$bytesize', '$valid_encoding?', '$byteslice', '$resolve_subs', '$utc', '$at', '$Integer', '$now', '$index', '$strftime', '$year', '$utc_offset', '$partition', '$create_converter', '$basebackend', '$filetype', '$htmlsyntax', '$derive_backend_traits', '$raise']);
|
|
27153
27157
|
return (function($base, $parent_nesting) {
|
|
27154
27158
|
var self = $module($base, 'Asciidoctor');
|
|
27155
27159
|
|
|
@@ -27437,10 +27441,22 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27437
27441
|
$writer = ["embedded", ""];
|
|
27438
27442
|
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
27439
27443
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
27440
|
-
|
|
27441
|
-
|
|
27442
|
-
|
|
27443
|
-
|
|
27444
|
+
if ($truthy(($truthy($a = attr_overrides['$key?']("showtitle")) ? attr_overrides.$keys()['$&'](["notitle", "showtitle"])['$[]'](-1)['$==']("showtitle") : $a))) {
|
|
27445
|
+
|
|
27446
|
+
$writer = ["notitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("showtitle"))];
|
|
27447
|
+
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
27448
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
27449
|
+
} else if ($truthy(attr_overrides['$key?']("notitle"))) {
|
|
27450
|
+
|
|
27451
|
+
$writer = ["showtitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("notitle"))];
|
|
27452
|
+
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
27453
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
27454
|
+
} else {
|
|
27455
|
+
|
|
27456
|
+
$writer = ["notitle", ""];
|
|
27457
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
27458
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
27459
|
+
};
|
|
27444
27460
|
};
|
|
27445
27461
|
|
|
27446
27462
|
$writer = ["asciidoctor", ""];
|
|
@@ -27964,9 +27980,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27964
27980
|
}, $Document_revdate$38.$$arity = 0);
|
|
27965
27981
|
|
|
27966
27982
|
Opal.def(self, '$notitle', $Document_notitle$39 = function $$notitle() {
|
|
27967
|
-
var
|
|
27983
|
+
var self = this;
|
|
27968
27984
|
|
|
27969
|
-
return
|
|
27985
|
+
return self.attributes['$key?']("notitle")
|
|
27970
27986
|
}, $Document_notitle$39.$$arity = 0);
|
|
27971
27987
|
|
|
27972
27988
|
Opal.def(self, '$noheader', $Document_noheader$40 = function $$noheader() {
|
|
@@ -29118,7 +29134,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
29118
29134
|
}
|
|
29119
29135
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $gvars = Opal.gvars;
|
|
29120
29136
|
|
|
29121
|
-
Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$private_class_method', '$parse_document_header', '$[]', '$has_more_lines?', '$next_section', '$assign_numeral', '$<<', '$blocks', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$finalize_header', '$nil_or_empty?', '$title=', '$-', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$apply_header_subs', '$[]=', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$include?', '$==', '$!', '$register', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$sub_attributes', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$skip_blank_lines', '$save', '$update', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$title', '$split', '$restore_save', '$discard_save', '$context', '$empty?', '$header?', '$!=', '$attr?', '$attr', '$key?', '$document', '$+', '$level', '$special', '$sectname', '$to_i', '$<', '$>', '$warn', '$next_block', '$blocks?', '$style', '$context=', '$style=', '$parent=', '$size', '$content_model', '$shift', '$unwrap_standalone_preamble', '$merge', '$fetch', '$parse_block_metadata_line', '$extensions', '$block_macros?', '$mark', '$read_line', '$terminator', '$to_s', '$masq', '$to_sym', '$registered_for_block?', '$debug?', '$debug', '$cursor_at_mark', '$strict_verbatim_paragraphs', '$unshift_line', '$markdown_syntax', '$keys', '$chr', '$uniform?', '$length', '$end_with?', '$===', '$parse_attributes', '$attribute_missing', '$tr', '$basename', '$assign_caption', '$registered_for_block_macro?', '$config', '$process_method', '$replace', '$parse_callout_list', '$callouts', '$parse_list', '$parse_description_list', '$underline_style_section_titles', '$is_section_title?', '$peek_line', '$atx_section_title?', '$generate_id', '$level=', '$read_paragraph_lines', '$adjust_indentation!', '$map!', '$slice', '$pop', '$build_block', '$apply_subs', '$chop', '$catalog_inline_anchors', '$rekey', '$index', '$strip', '$parse_table', '$each', '$raise', '$title?', '$update_attributes', '$commit_subs', '$sub?', '$catalog_callouts', '$source', '$remove_sub', '$block_terminates_paragraph', '$to_proc', '$nil?', '$lines', '$parse_blocks', '$parse_list_item', '$items', '$scan', '$gsub', '$count', '$advance', '$dup', '$match', '$callout_ids', '$next_list', '$catalog_inline_anchor', '$
|
|
29137
|
+
Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$private_class_method', '$parse_document_header', '$[]', '$has_more_lines?', '$next_section', '$assign_numeral', '$<<', '$blocks', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$finalize_header', '$nil_or_empty?', '$title=', '$-', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$apply_header_subs', '$[]=', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$include?', '$==', '$!', '$register', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$sub_attributes', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$skip_blank_lines', '$save', '$update', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$title', '$split', '$restore_save', '$discard_save', '$context', '$empty?', '$header?', '$!=', '$attr?', '$attr', '$key?', '$document', '$+', '$level', '$special', '$sectname', '$to_i', '$<', '$>', '$warn', '$next_block', '$blocks?', '$style', '$context=', '$style=', '$parent=', '$size', '$content_model', '$shift', '$unwrap_standalone_preamble', '$source_location', '$merge', '$fetch', '$parse_block_metadata_line', '$extensions', '$block_macros?', '$mark', '$read_line', '$terminator', '$to_s', '$masq', '$to_sym', '$registered_for_block?', '$debug?', '$debug', '$cursor_at_mark', '$strict_verbatim_paragraphs', '$unshift_line', '$markdown_syntax', '$keys', '$chr', '$uniform?', '$length', '$end_with?', '$===', '$parse_attributes', '$attribute_missing', '$tr', '$basename', '$assign_caption', '$registered_for_block_macro?', '$config', '$process_method', '$replace', '$parse_callout_list', '$callouts', '$parse_list', '$parse_description_list', '$underline_style_section_titles', '$is_section_title?', '$peek_line', '$atx_section_title?', '$generate_id', '$level=', '$read_paragraph_lines', '$adjust_indentation!', '$map!', '$slice', '$pop', '$build_block', '$apply_subs', '$chop', '$catalog_inline_anchors', '$rekey', '$index', '$strip', '$parse_table', '$each', '$raise', '$title?', '$update_attributes', '$commit_subs', '$sub?', '$catalog_callouts', '$source', '$remove_sub', '$block_terminates_paragraph', '$to_proc', '$nil?', '$lines', '$parse_blocks', '$parse_list_item', '$items', '$scan', '$gsub', '$count', '$advance', '$dup', '$match', '$callout_ids', '$next_list', '$catalog_inline_anchor', '$marker=', '$catalog_inline_biblio_anchor', '$set_option', '$text=', '$resolve_ordered_list_marker', '$read_lines_for_list_item', '$skip_line_comments', '$unshift_lines', '$fold_first', '$text?', '$is_sibling_list_item?', '$concat', '$find', '$casecmp', '$sectname=', '$special=', '$numbered=', '$numbered', '$lineno', '$peek_lines', '$setext_section_title?', '$abs', '$cursor_at_prev_line', '$process_attribute_entries', '$next_line_empty?', '$process_authors', '$rstrip', '$each_with_index', '$compact', '$squeeze', '$to_a', '$parse_style_attribute', '$process_attribute_entry', '$skip_comment_lines', '$store_attribute', '$sanitize_attribute_name', '$set_attribute', '$save_to', '$delete_attribute', '$ord', '$int_to_roman', '$resolve_list_marker', '$parse_colspecs', '$create_columns', '$has_header_option=', '$format', '$starts_with_delimiter?', '$close_open_cell', '$parse_cellspec', '$delimiter', '$match_delimiter', '$pre_match', '$post_match', '$buffer_has_unclosed_quotes?', '$skip_past_delimiter', '$buffer', '$buffer=', '$skip_past_escaped_delimiter', '$keep_cell_open', '$push_cellspec', '$close_cell', '$cell_open?', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
|
|
29122
29138
|
return (function($base, $parent_nesting) {
|
|
29123
29139
|
var self = $module($base, 'Asciidoctor');
|
|
29124
29140
|
|
|
@@ -29591,6 +29607,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
29591
29607
|
} else if ($truthy(preamble)) {
|
|
29592
29608
|
if ($truthy(preamble['$blocks?']())) {
|
|
29593
29609
|
if ($truthy(($truthy($a = ($truthy($b = book) ? $b : document.$blocks()['$[]'](1))) ? $a : $$($nesting, 'Compliance').$unwrap_standalone_preamble()['$!']()))) {
|
|
29610
|
+
if ($truthy(document.$sourcemap())) {
|
|
29611
|
+
|
|
29612
|
+
$writer = [preamble.$blocks()['$[]'](0).$source_location()];
|
|
29613
|
+
$send(preamble, 'source_location=', Opal.to_a($writer));
|
|
29614
|
+
$writer[$rb_minus($writer["length"], 1)];}
|
|
29594
29615
|
} else {
|
|
29595
29616
|
|
|
29596
29617
|
document.$blocks().$shift();
|
|
@@ -30145,7 +30166,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
30145
30166
|
block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);}
|
|
30146
30167
|
else if ("open"['$===']($case) || "abstract"['$===']($case) || "partintro"['$===']($case)) {block = self.$build_block("open", "compound", terminator, parent, reader, attributes)}
|
|
30147
30168
|
else if ("literal"['$===']($case)) {block = self.$build_block(block_context, "verbatim", terminator, parent, reader, attributes)}
|
|
30148
|
-
else if ("example"['$===']($case)) {
|
|
30169
|
+
else if ("example"['$===']($case)) {
|
|
30170
|
+
if ($truthy(attributes['$[]']("collapsible-option"))) {
|
|
30171
|
+
|
|
30172
|
+
$writer = ["caption", ""];
|
|
30173
|
+
$send(attributes, '[]=', Opal.to_a($writer));
|
|
30174
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
30175
|
+
block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);}
|
|
30149
30176
|
else if ("quote"['$===']($case) || "verse"['$===']($case)) {
|
|
30150
30177
|
$$($nesting, 'AttributeList').$rekey(attributes, [nil, "attribution", "citetitle"]);
|
|
30151
30178
|
block = self.$build_block(block_context, (function() {if (block_context['$==']("verse")) {
|
|
@@ -30489,22 +30516,23 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
30489
30516
|
|
|
30490
30517
|
|
|
30491
30518
|
if ($truthy(($truthy($a = text['$include?']("[[")) ? $a : text['$include?']("or:")))) {
|
|
30492
|
-
$send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, id = nil, reftext = nil, location = nil, offset = nil;
|
|
30519
|
+
$send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, $c, $d, id = nil, reftext = nil, location = nil, offset = nil;
|
|
30493
30520
|
|
|
30494
30521
|
|
|
30495
30522
|
if ($truthy((id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))))) {
|
|
30496
|
-
if ($truthy((reftext = (($
|
|
30497
|
-
|
|
30498
|
-
return nil;}}
|
|
30523
|
+
if ($truthy(($truthy($b = ($truthy($c = (reftext = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2)))) ? reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')) : $c)) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
|
|
30524
|
+
return nil;}
|
|
30499
30525
|
} else {
|
|
30500
30526
|
|
|
30501
30527
|
id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3));
|
|
30502
30528
|
if ($truthy((reftext = (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))))) {
|
|
30503
|
-
|
|
30504
30529
|
if ($truthy(reftext['$include?']("]"))) {
|
|
30505
|
-
|
|
30506
|
-
|
|
30507
|
-
|
|
30530
|
+
|
|
30531
|
+
reftext = reftext.$gsub("\\]", "]");
|
|
30532
|
+
if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
|
|
30533
|
+
reftext = document.$sub_attributes(reftext)};
|
|
30534
|
+
} else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
|
|
30535
|
+
return nil;}};
|
|
30508
30536
|
};
|
|
30509
30537
|
if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
|
|
30510
30538
|
return nil
|
|
@@ -31670,7 +31698,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31670
31698
|
if ((name = self.$sanitize_attribute_name(name))['$==']("numbered")) {
|
|
31671
31699
|
name = "sectnums"
|
|
31672
31700
|
} else if (name['$==']("hardbreaks")) {
|
|
31673
|
-
name = "hardbreaks-option"
|
|
31701
|
+
name = "hardbreaks-option"
|
|
31702
|
+
} else if (name['$==']("showtitle")) {
|
|
31703
|
+
self.$store_attribute("notitle", (function() {if ($truthy(value)) {
|
|
31704
|
+
return nil
|
|
31705
|
+
} else {
|
|
31706
|
+
return ""
|
|
31707
|
+
}; return nil; })(), doc, attrs)};
|
|
31674
31708
|
if ($truthy(doc)) {
|
|
31675
31709
|
if ($truthy(value)) {
|
|
31676
31710
|
|
|
@@ -31784,7 +31818,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31784
31818
|
}
|
|
31785
31819
|
}, $Parser_is_sibling_list_item$ques$59.$$arity = 3);
|
|
31786
31820
|
Opal.defs(self, '$parse_table', $Parser_parse_table$60 = function $$parse_table(table_reader, parent, attributes) {
|
|
31787
|
-
var $a, $b, $c, $d, self = this, table = nil, colspecs = nil, explicit_colspecs = nil, skipped = nil,
|
|
31821
|
+
var $a, $b, $c, $d, self = this, table = nil, colspecs = nil, explicit_colspecs = nil, skipped = nil, $writer = nil, implicit_header = nil, parser_ctx = nil, format = nil, loop_idx = nil, implicit_header_boundary = nil, line = nil, beyond_first = nil, next_cellspec = nil, m = nil, pre_match = nil, post_match = nil, $case = nil, cell_text = nil, $logical_op_recvr_tmp_2 = nil;
|
|
31788
31822
|
|
|
31789
31823
|
|
|
31790
31824
|
table = $$($nesting, 'Table').$new(parent, attributes);
|
|
@@ -31793,12 +31827,20 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31793
31827
|
table.$create_columns(colspecs);
|
|
31794
31828
|
explicit_colspecs = true;};
|
|
31795
31829
|
skipped = ($truthy($a = table_reader.$skip_blank_lines()) ? $a : 0);
|
|
31830
|
+
if ($truthy(attributes['$[]']("header-option"))) {
|
|
31831
|
+
|
|
31832
|
+
$writer = [true];
|
|
31833
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
31834
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
31835
|
+
} else if ($truthy((($a = skipped['$=='](0)) ? attributes['$[]']("noheader-option")['$!']() : skipped['$=='](0)))) {
|
|
31836
|
+
|
|
31837
|
+
|
|
31838
|
+
$writer = ["implicit"];
|
|
31839
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
31840
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
31841
|
+
implicit_header = true;};
|
|
31796
31842
|
parser_ctx = $$$($$($nesting, 'Table'), 'ParserContext').$new(table_reader, table, attributes);
|
|
31797
31843
|
$a = [parser_ctx.$format(), -1, nil], (format = $a[0]), (loop_idx = $a[1]), (implicit_header_boundary = $a[2]), $a;
|
|
31798
|
-
if ($truthy(($truthy($a = ($truthy($b = $rb_gt(skipped, 0)) ? $b : attributes['$[]']("header-option"))) ? $a : attributes['$[]']("noheader-option")))) {
|
|
31799
|
-
} else {
|
|
31800
|
-
implicit_header = true
|
|
31801
|
-
};
|
|
31802
31844
|
$a = false; while ($a || $truthy((line = table_reader.$read_line()))) {$a = false;
|
|
31803
31845
|
|
|
31804
31846
|
if ($truthy(($truthy($b = (beyond_first = $rb_gt((loop_idx = $rb_plus(loop_idx, 1)), 0))) ? line['$empty?']() : $b))) {
|
|
@@ -31822,7 +31864,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31822
31864
|
if ($truthy(implicit_header_boundary)) {
|
|
31823
31865
|
implicit_header_boundary = nil};
|
|
31824
31866
|
} else if ($truthy(($truthy($b = implicit_header_boundary) ? implicit_header_boundary['$=='](loop_idx) : $b))) {
|
|
31825
|
-
|
|
31867
|
+
|
|
31868
|
+
$writer = [(implicit_header = (implicit_header_boundary = nil))];
|
|
31869
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
31870
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
31826
31871
|
}};
|
|
31827
31872
|
if ($truthy(beyond_first)) {
|
|
31828
31873
|
} else {
|
|
@@ -31832,7 +31877,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31832
31877
|
if ($truthy(($truthy($b = table_reader['$has_more_lines?']()) ? table_reader.$peek_line()['$empty?']() : $b))) {
|
|
31833
31878
|
implicit_header_boundary = 1
|
|
31834
31879
|
} else {
|
|
31835
|
-
|
|
31880
|
+
|
|
31881
|
+
$writer = [(implicit_header = nil)];
|
|
31882
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
31883
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
31836
31884
|
}};
|
|
31837
31885
|
};
|
|
31838
31886
|
$b = false; while ($b || $truthy(true)) {$b = false;
|
|
@@ -31900,7 +31948,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31900
31948
|
if ("csv"['$===']($case)) {if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?']())) {
|
|
31901
31949
|
|
|
31902
31950
|
if ($truthy(($truthy($c = implicit_header_boundary) ? loop_idx['$=='](0) : $c))) {
|
|
31903
|
-
|
|
31951
|
+
|
|
31952
|
+
$writer = [(implicit_header = (implicit_header_boundary = nil))];
|
|
31953
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
31954
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
31904
31955
|
parser_ctx.$keep_cell_open();
|
|
31905
31956
|
} else {
|
|
31906
31957
|
parser_ctx.$close_cell(true)
|
|
@@ -31929,14 +31980,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31929
31980
|
};
|
|
31930
31981
|
if ($truthy(implicit_header)) {
|
|
31931
31982
|
|
|
31932
|
-
|
|
31933
31983
|
$writer = [true];
|
|
31934
31984
|
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
31935
|
-
$writer[$rb_minus($writer["length"], 1)]
|
|
31936
|
-
|
|
31937
|
-
$writer = ["header-option", ""];
|
|
31938
|
-
$send(attributes, '[]=', Opal.to_a($writer));
|
|
31939
|
-
$writer[$rb_minus($writer["length"], 1)];;};
|
|
31985
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
31940
31986
|
table.$partition_header_footer(attributes);
|
|
31941
31987
|
return table;
|
|
31942
31988
|
}, $Parser_parse_table$60.$$arity = 3);
|
|
@@ -34885,7 +34931,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
34885
34931
|
}
|
|
34886
34932
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars;
|
|
34887
34933
|
|
|
34888
|
-
Opal.add_stubs(['$attr_accessor', '$attr_reader', '$new', '$[]', '$>', '$to_i', '$<', '$==', '$[]=', '$-', '$attributes', '$truncate', '$*', '$/', '$to_f', '$empty?', '$body', '$each', '$<<', '$size', '$+', '$assign_column_widths', '$warn', '$logger', '$update_attributes', '$assign_width', '$round', '$shift', '$
|
|
34934
|
+
Opal.add_stubs(['$attr_accessor', '$attr_reader', '$new', '$[]', '$>', '$to_i', '$<', '$==', '$[]=', '$-', '$attributes', '$truncate', '$*', '$/', '$to_f', '$empty?', '$body', '$each', '$<<', '$size', '$+', '$assign_column_widths', '$warn', '$logger', '$update_attributes', '$assign_width', '$round', '$map', '$shift', '$reinitialize', '$head=', '$nil?', '$unshift', '$pop', '$foot=', '$parent', '$sourcemap', '$dup', '$header_row?', '$table', '$style', '$merge', '$delete', '$start_with?', '$rstrip', '$slice', '$length', '$advance', '$lstrip', '$strip', '$split', '$include?', '$readlines', '$catalog_inline_anchor', '$=~', '$apply_subs', '$convert', '$text', '$!=', '$file', '$lineno', '$to_s', '$include', '$to_set', '$mark', '$key?', '$nested?', '$document', '$error', '$message_with_context', '$cursor_at_prev_line', '$nil_or_empty?', '$escape', '$columns', '$match', '$chop', '$end_with?', '$gsub', '$!', '$push_cellspec', '$cell_open?', '$close_cell', '$take_cellspec', '$squeeze', '$upto', '$times', '$cursor_before_mark', '$rowspan', '$activate_rowspan', '$colspan', '$end_of_row?', '$close_row', '$private', '$rows', '$effective_column_visits']);
|
|
34889
34935
|
return (function($base, $parent_nesting) {
|
|
34890
34936
|
var self = $module($base, 'Asciidoctor');
|
|
34891
34937
|
|
|
@@ -34955,11 +35001,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
34955
35001
|
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Table_initialize$4, false), [parent, "table"], null);
|
|
34956
35002
|
self.rows = $$($nesting, 'Rows').$new();
|
|
34957
35003
|
self.columns = [];
|
|
34958
|
-
self.has_header_option =
|
|
34959
|
-
return true
|
|
34960
|
-
} else {
|
|
34961
|
-
return false
|
|
34962
|
-
}; return nil; })();
|
|
35004
|
+
self.has_header_option = false;
|
|
34963
35005
|
if ($truthy((pcwidth = attributes['$[]']("width")))) {
|
|
34964
35006
|
if ($truthy(($truthy($a = $rb_gt((pcwidth_intval = pcwidth.$to_i()), 100)) ? $a : $rb_lt(pcwidth_intval, 1)))) {
|
|
34965
35007
|
if ($truthy((($a = pcwidth_intval['$=='](0)) ? ($truthy($b = pcwidth['$==']("0")) ? $b : pcwidth['$==']("0%")) : pcwidth_intval['$=='](0)))) {
|
|
@@ -34993,9 +35035,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
34993
35035
|
}, $Table_initialize$4.$$arity = 2);
|
|
34994
35036
|
|
|
34995
35037
|
Opal.def(self, '$header_row?', $Table_header_row$ques$5 = function() {
|
|
34996
|
-
var $a, self = this;
|
|
35038
|
+
var $a, self = this, val = nil;
|
|
34997
35039
|
|
|
34998
|
-
|
|
35040
|
+
if ($truthy(($truthy($a = (val = self.has_header_option)) ? self.rows.$body()['$empty?']() : $a))) {
|
|
35041
|
+
return val
|
|
35042
|
+
} else {
|
|
35043
|
+
return nil
|
|
35044
|
+
}
|
|
34999
35045
|
}, $Table_header_row$ques$5.$$arity = 0);
|
|
35000
35046
|
|
|
35001
35047
|
Opal.def(self, '$create_columns', $Table_create_columns$6 = function $$create_columns(colspecs) {
|
|
@@ -35100,35 +35146,39 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35100
35146
|
return nil;
|
|
35101
35147
|
}, $Table_assign_column_widths$8.$$arity = -1);
|
|
35102
35148
|
return (Opal.def(self, '$partition_header_footer', $Table_partition_header_footer$12 = function $$partition_header_footer(attrs) {
|
|
35103
|
-
var
|
|
35149
|
+
var $$13, $$14, $a, self = this, num_body_rows = nil, $writer = nil, body = nil;
|
|
35104
35150
|
|
|
35105
35151
|
|
|
35106
|
-
|
|
35107
|
-
$
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
|
|
35111
|
-
|
|
35112
|
-
|
|
35113
|
-
head = self.rows.$body().$shift();
|
|
35114
|
-
num_body_rows = $rb_minus(num_body_rows, 1);
|
|
35115
|
-
$send(head, 'each', [], ($$13 = function(c){var self = $$13.$$s || this;
|
|
35152
|
+
num_body_rows = (($writer = ["rowcount", (body = self.rows.$body()).$size()]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]);
|
|
35153
|
+
if ($truthy($rb_gt(num_body_rows, 0))) {
|
|
35154
|
+
if ($truthy(self.has_header_option)) {
|
|
35155
|
+
|
|
35156
|
+
|
|
35157
|
+
$writer = [[$send(body.$shift(), 'map', [], ($$13 = function(cell){var self = $$13.$$s || this;
|
|
35116
35158
|
|
|
35117
|
-
|
|
35118
35159
|
|
|
35119
|
-
|
|
35120
|
-
|
|
35121
|
-
|
|
35122
|
-
|
|
35123
|
-
|
|
35124
|
-
|
|
35125
|
-
|
|
35126
|
-
|
|
35127
|
-
$
|
|
35128
|
-
|
|
35160
|
+
|
|
35161
|
+
if (cell == null) {
|
|
35162
|
+
cell = nil;
|
|
35163
|
+
};
|
|
35164
|
+
return cell.$reinitialize(true);}, $$13.$$s = self, $$13.$$arity = 1, $$13))]];
|
|
35165
|
+
$send(self.rows, 'head=', Opal.to_a($writer));
|
|
35166
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35167
|
+
num_body_rows = $rb_minus(num_body_rows, 1);
|
|
35168
|
+
} else if ($truthy(self.has_header_option['$nil?']())) {
|
|
35169
|
+
|
|
35170
|
+
self.has_header_option = false;
|
|
35171
|
+
body.$unshift($send(body.$shift(), 'map', [], ($$14 = function(cell){var self = $$14.$$s || this;
|
|
35172
|
+
|
|
35173
|
+
|
|
35174
|
+
|
|
35175
|
+
if (cell == null) {
|
|
35176
|
+
cell = nil;
|
|
35177
|
+
};
|
|
35178
|
+
return cell.$reinitialize(false);}, $$14.$$s = self, $$14.$$arity = 1, $$14)));}};
|
|
35129
35179
|
if ($truthy(($truthy($a = $rb_gt(num_body_rows, 0)) ? attrs['$[]']("footer-option") : $a))) {
|
|
35130
35180
|
|
|
35131
|
-
$writer = [[
|
|
35181
|
+
$writer = [[body.$pop()]];
|
|
35132
35182
|
$send(self.rows, 'foot=', Opal.to_a($writer));
|
|
35133
35183
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
35134
35184
|
return nil;
|
|
@@ -35137,22 +35187,22 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35137
35187
|
(function($base, $super, $parent_nesting) {
|
|
35138
35188
|
var self = $klass($base, $super, 'Column');
|
|
35139
35189
|
|
|
35140
|
-
var $nesting = [self].concat($parent_nesting), $Column_initialize$
|
|
35190
|
+
var $nesting = [self].concat($parent_nesting), $Column_initialize$15, $Column_assign_width$16, $Column_block$ques$17, $Column_inline$ques$18;
|
|
35141
35191
|
|
|
35142
35192
|
self.$$prototype.attributes = nil;
|
|
35143
35193
|
|
|
35144
35194
|
self.$attr_accessor("style");
|
|
35145
35195
|
|
|
35146
|
-
Opal.def(self, '$initialize', $Column_initialize$
|
|
35147
|
-
var $a, $iter = $Column_initialize$
|
|
35196
|
+
Opal.def(self, '$initialize', $Column_initialize$15 = function $$initialize(table, index, attributes) {
|
|
35197
|
+
var $a, $iter = $Column_initialize$15.$$p, $yield = $iter || nil, self = this, $writer = nil;
|
|
35148
35198
|
|
|
35149
|
-
if ($iter) $Column_initialize$
|
|
35199
|
+
if ($iter) $Column_initialize$15.$$p = null;
|
|
35150
35200
|
|
|
35151
35201
|
|
|
35152
35202
|
if (attributes == null) {
|
|
35153
35203
|
attributes = $hash2([], {});
|
|
35154
35204
|
};
|
|
35155
|
-
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$
|
|
35205
|
+
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$15, false), [table, "table_column"], null);
|
|
35156
35206
|
self.style = attributes['$[]']("style");
|
|
35157
35207
|
|
|
35158
35208
|
$writer = ["colnumber", $rb_plus(index, 1)];
|
|
@@ -35162,10 +35212,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35162
35212
|
($truthy($a = attributes['$[]']("halign")) ? $a : (($writer = ["halign", "left"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
35163
35213
|
($truthy($a = attributes['$[]']("valign")) ? $a : (($writer = ["valign", "top"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
35164
35214
|
return self.$update_attributes(attributes);
|
|
35165
|
-
}, $Column_initialize$
|
|
35215
|
+
}, $Column_initialize$15.$$arity = -3);
|
|
35166
35216
|
Opal.alias(self, "table", "parent");
|
|
35167
35217
|
|
|
35168
|
-
Opal.def(self, '$assign_width', $Column_assign_width$
|
|
35218
|
+
Opal.def(self, '$assign_width', $Column_assign_width$16 = function $$assign_width(col_pcwidth, width_base, precision) {
|
|
35169
35219
|
var self = this, $writer = nil, col_abswidth = nil;
|
|
35170
35220
|
|
|
35171
35221
|
|
|
@@ -35187,25 +35237,25 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35187
35237
|
$writer = ["colpcwidth", col_pcwidth];
|
|
35188
35238
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
35189
35239
|
return $writer[$rb_minus($writer["length"], 1)];;
|
|
35190
|
-
}, $Column_assign_width$
|
|
35240
|
+
}, $Column_assign_width$16.$$arity = 3);
|
|
35191
35241
|
|
|
35192
|
-
Opal.def(self, '$block?', $Column_block$ques$
|
|
35242
|
+
Opal.def(self, '$block?', $Column_block$ques$17 = function() {
|
|
35193
35243
|
var self = this;
|
|
35194
35244
|
|
|
35195
35245
|
return false
|
|
35196
|
-
}, $Column_block$ques$
|
|
35197
|
-
return (Opal.def(self, '$inline?', $Column_inline$ques$
|
|
35246
|
+
}, $Column_block$ques$17.$$arity = 0);
|
|
35247
|
+
return (Opal.def(self, '$inline?', $Column_inline$ques$18 = function() {
|
|
35198
35248
|
var self = this;
|
|
35199
35249
|
|
|
35200
35250
|
return false
|
|
35201
|
-
}, $Column_inline$ques$
|
|
35251
|
+
}, $Column_inline$ques$18.$$arity = 0), nil) && 'inline?';
|
|
35202
35252
|
})($$($nesting, 'Table'), $$($nesting, 'AbstractNode'), $nesting);
|
|
35203
35253
|
(function($base, $super, $parent_nesting) {
|
|
35204
35254
|
var self = $klass($base, $super, 'Cell');
|
|
35205
35255
|
|
|
35206
|
-
var $nesting = [self].concat($parent_nesting), $Cell_initialize$
|
|
35256
|
+
var $nesting = [self].concat($parent_nesting), $Cell_initialize$19, $Cell_reinitialize$20, $Cell_catalog_inline_anchor$21, $Cell_text$22, $Cell_text$eq$23, $Cell_content$24, $Cell_lines$26, $Cell_source$27, $Cell_file$28, $Cell_lineno$29, $Cell_to_s$30;
|
|
35207
35257
|
|
|
35208
|
-
self.$$prototype.document = self.$$prototype.text = self.$$prototype.subs = self.$$prototype.style = self.$$prototype.inner_document = self.$$prototype.source_location = self.$$prototype.colspan = self.$$prototype.rowspan =
|
|
35258
|
+
self.$$prototype.document = self.$$prototype.reinitialize_args = self.$$prototype.attributes = self.$$prototype.cursor = self.$$prototype.text = self.$$prototype.subs = self.$$prototype.style = self.$$prototype.inner_document = self.$$prototype.source_location = self.$$prototype.colspan = self.$$prototype.rowspan = nil;
|
|
35209
35259
|
|
|
35210
35260
|
Opal.const_set($nesting[0], 'DOUBLE_LF', $rb_times($$($nesting, 'LF'), 2));
|
|
35211
35261
|
self.$attr_accessor("colspan");
|
|
@@ -35213,10 +35263,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35213
35263
|
Opal.alias(self, "column", "parent");
|
|
35214
35264
|
self.$attr_reader("inner_document");
|
|
35215
35265
|
|
|
35216
|
-
Opal.def(self, '$initialize', $Cell_initialize$
|
|
35217
|
-
var $a, $b, $iter = $Cell_initialize$
|
|
35266
|
+
Opal.def(self, '$initialize', $Cell_initialize$19 = function $$initialize(column, cell_text, attributes, opts) {
|
|
35267
|
+
var $a, $b, $c, $iter = $Cell_initialize$19.$$p, $yield = $iter || nil, self = this, in_header_row = nil, cell_style = nil, asciidoc = nil, inner_document_cursor = nil, lines_advanced = nil, literal = nil, normal_psv = nil, parent_doctitle = nil, inner_document_lines = nil, unprocessed_line1 = nil, preprocessed_lines = nil, $writer = nil;
|
|
35218
35268
|
|
|
35219
|
-
if ($iter) $Cell_initialize$
|
|
35269
|
+
if ($iter) $Cell_initialize$19.$$p = null;
|
|
35220
35270
|
|
|
35221
35271
|
|
|
35222
35272
|
if (attributes == null) {
|
|
@@ -35226,14 +35276,20 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35226
35276
|
if (opts == null) {
|
|
35227
35277
|
opts = $hash2([], {});
|
|
35228
35278
|
};
|
|
35229
|
-
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$
|
|
35279
|
+
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$19, false), [column, "table_cell"], null);
|
|
35280
|
+
self.cursor = (self.reinitialize_args = nil);
|
|
35230
35281
|
if ($truthy(self.document.$sourcemap())) {
|
|
35231
35282
|
self.source_location = opts['$[]']("cursor").$dup()};
|
|
35232
35283
|
if ($truthy(column)) {
|
|
35233
35284
|
|
|
35234
35285
|
if ($truthy((in_header_row = column.$table()['$header_row?']()))) {
|
|
35286
|
+
if ($truthy((($a = in_header_row['$==']("implicit")) ? (cell_style = ($truthy($b = column.$style()) ? $b : ($truthy($c = attributes) ? attributes['$[]']("style") : $c))) : in_header_row['$==']("implicit")))) {
|
|
35287
|
+
|
|
35288
|
+
if ($truthy(($truthy($a = cell_style['$==']("asciidoc")) ? $a : cell_style['$==']("literal")))) {
|
|
35289
|
+
self.reinitialize_args = [column, cell_text, ($truthy($a = attributes) ? attributes.$merge() : $a), opts]};
|
|
35290
|
+
cell_style = nil;}
|
|
35235
35291
|
} else {
|
|
35236
|
-
cell_style = column.$
|
|
35292
|
+
cell_style = column.$style()
|
|
35237
35293
|
};
|
|
35238
35294
|
self.$update_attributes(column.$attributes());};
|
|
35239
35295
|
if ($truthy(attributes)) {
|
|
@@ -35319,34 +35375,77 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35319
35375
|
self.subs = $$($nesting, 'BASIC_SUBS');
|
|
35320
35376
|
} else {
|
|
35321
35377
|
|
|
35322
|
-
if ($truthy(
|
|
35323
|
-
|
|
35378
|
+
if ($truthy(normal_psv)) {
|
|
35379
|
+
if ($truthy(in_header_row)) {
|
|
35380
|
+
self.cursor = opts['$[]']("cursor")
|
|
35381
|
+
} else {
|
|
35382
|
+
self.$catalog_inline_anchor(cell_text, opts['$[]']("cursor"))
|
|
35383
|
+
}};
|
|
35324
35384
|
self.content_model = "simple";
|
|
35325
35385
|
self.subs = $$($nesting, 'NORMAL_SUBS');
|
|
35326
35386
|
};
|
|
35327
35387
|
self.text = cell_text;
|
|
35328
35388
|
return (self.style = cell_style);
|
|
35329
|
-
}, $Cell_initialize$
|
|
35389
|
+
}, $Cell_initialize$19.$$arity = -3);
|
|
35330
35390
|
|
|
35331
|
-
Opal.def(self, '$
|
|
35391
|
+
Opal.def(self, '$reinitialize', $Cell_reinitialize$20 = function $$reinitialize(has_header) {
|
|
35392
|
+
var self = this;
|
|
35393
|
+
|
|
35394
|
+
|
|
35395
|
+
if ($truthy(has_header)) {
|
|
35396
|
+
self.reinitialize_args = nil
|
|
35397
|
+
} else if ($truthy(self.reinitialize_args)) {
|
|
35398
|
+
return $send($$$($$($nesting, 'Table'), 'Cell'), 'new', Opal.to_a(self.reinitialize_args))
|
|
35399
|
+
} else {
|
|
35400
|
+
self.style = self.attributes['$[]']("style")
|
|
35401
|
+
};
|
|
35402
|
+
if ($truthy(self.cursor)) {
|
|
35403
|
+
self.$catalog_inline_anchor()};
|
|
35404
|
+
return self;
|
|
35405
|
+
}, $Cell_reinitialize$20.$$arity = 1);
|
|
35406
|
+
|
|
35407
|
+
Opal.def(self, '$catalog_inline_anchor', $Cell_catalog_inline_anchor$21 = function $$catalog_inline_anchor(cell_text, cursor) {
|
|
35408
|
+
var $a, self = this;
|
|
35409
|
+
|
|
35410
|
+
|
|
35411
|
+
|
|
35412
|
+
if (cell_text == null) {
|
|
35413
|
+
cell_text = self.text;
|
|
35414
|
+
};
|
|
35415
|
+
|
|
35416
|
+
if (cursor == null) {
|
|
35417
|
+
cursor = nil;
|
|
35418
|
+
};
|
|
35419
|
+
if ($truthy(cursor)) {
|
|
35420
|
+
} else {
|
|
35421
|
+
$a = [self.cursor, nil], (cursor = $a[0]), (self.cursor = $a[1]), $a
|
|
35422
|
+
};
|
|
35423
|
+
if ($truthy(($truthy($a = cell_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](cell_text) : $a))) {
|
|
35424
|
+
return $$($nesting, 'Parser').$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), self, cursor, self.document)
|
|
35425
|
+
} else {
|
|
35426
|
+
return nil
|
|
35427
|
+
};
|
|
35428
|
+
}, $Cell_catalog_inline_anchor$21.$$arity = -1);
|
|
35429
|
+
|
|
35430
|
+
Opal.def(self, '$text', $Cell_text$22 = function $$text() {
|
|
35332
35431
|
var self = this;
|
|
35333
35432
|
|
|
35334
35433
|
return self.$apply_subs(self.text, self.subs)
|
|
35335
|
-
}, $Cell_text$
|
|
35434
|
+
}, $Cell_text$22.$$arity = 0);
|
|
35336
35435
|
|
|
35337
|
-
Opal.def(self, '$text=', $Cell_text$eq$
|
|
35436
|
+
Opal.def(self, '$text=', $Cell_text$eq$23 = function(val) {
|
|
35338
35437
|
var self = this;
|
|
35339
35438
|
|
|
35340
35439
|
return (self.text = val)
|
|
35341
|
-
}, $Cell_text$eq$
|
|
35440
|
+
}, $Cell_text$eq$23.$$arity = 1);
|
|
35342
35441
|
|
|
35343
|
-
Opal.def(self, '$content', $Cell_content$
|
|
35344
|
-
var $$
|
|
35442
|
+
Opal.def(self, '$content', $Cell_content$24 = function $$content() {
|
|
35443
|
+
var $$25, $a, self = this, cell_style = nil, subbed_text = nil;
|
|
35345
35444
|
|
|
35346
35445
|
if ((cell_style = self.style)['$==']("asciidoc")) {
|
|
35347
35446
|
return self.inner_document.$convert()
|
|
35348
35447
|
} else if ($truthy(self.text['$include?']($$($nesting, 'DOUBLE_LF')))) {
|
|
35349
|
-
return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$
|
|
35448
|
+
return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$25 = function(para){var self = $$25.$$s || this, $a;
|
|
35350
35449
|
|
|
35351
35450
|
|
|
35352
35451
|
|
|
@@ -35357,7 +35456,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35357
35456
|
return $$($nesting, 'Inline').$new(self.$parent(), "quoted", para, $hash2(["type"], {"type": cell_style})).$convert()
|
|
35358
35457
|
} else {
|
|
35359
35458
|
return para
|
|
35360
|
-
};}, $$
|
|
35459
|
+
};}, $$25.$$s = self, $$25.$$arity = 1, $$25))
|
|
35361
35460
|
} else if ($truthy((subbed_text = self.$text())['$empty?']())) {
|
|
35362
35461
|
return []
|
|
35363
35462
|
} else if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) {
|
|
@@ -35365,46 +35464,46 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35365
35464
|
} else {
|
|
35366
35465
|
return [subbed_text]
|
|
35367
35466
|
}
|
|
35368
|
-
}, $Cell_content$
|
|
35467
|
+
}, $Cell_content$24.$$arity = 0);
|
|
35369
35468
|
|
|
35370
|
-
Opal.def(self, '$lines', $Cell_lines$
|
|
35469
|
+
Opal.def(self, '$lines', $Cell_lines$26 = function $$lines() {
|
|
35371
35470
|
var self = this;
|
|
35372
35471
|
|
|
35373
35472
|
return self.text.$split($$($nesting, 'LF'))
|
|
35374
|
-
}, $Cell_lines$
|
|
35473
|
+
}, $Cell_lines$26.$$arity = 0);
|
|
35375
35474
|
|
|
35376
|
-
Opal.def(self, '$source', $Cell_source$
|
|
35475
|
+
Opal.def(self, '$source', $Cell_source$27 = function $$source() {
|
|
35377
35476
|
var self = this;
|
|
35378
35477
|
|
|
35379
35478
|
return self.text
|
|
35380
|
-
}, $Cell_source$
|
|
35479
|
+
}, $Cell_source$27.$$arity = 0);
|
|
35381
35480
|
|
|
35382
|
-
Opal.def(self, '$file', $Cell_file$
|
|
35481
|
+
Opal.def(self, '$file', $Cell_file$28 = function $$file() {
|
|
35383
35482
|
var $a, self = this;
|
|
35384
35483
|
|
|
35385
35484
|
return ($truthy($a = self.source_location) ? self.source_location.$file() : $a)
|
|
35386
|
-
}, $Cell_file$
|
|
35485
|
+
}, $Cell_file$28.$$arity = 0);
|
|
35387
35486
|
|
|
35388
|
-
Opal.def(self, '$lineno', $Cell_lineno$
|
|
35487
|
+
Opal.def(self, '$lineno', $Cell_lineno$29 = function $$lineno() {
|
|
35389
35488
|
var $a, self = this;
|
|
35390
35489
|
|
|
35391
35490
|
return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a)
|
|
35392
|
-
}, $Cell_lineno$
|
|
35393
|
-
return (Opal.def(self, '$to_s', $Cell_to_s$
|
|
35394
|
-
var $a, $iter = $Cell_to_s$
|
|
35491
|
+
}, $Cell_lineno$29.$$arity = 0);
|
|
35492
|
+
return (Opal.def(self, '$to_s', $Cell_to_s$30 = function $$to_s() {
|
|
35493
|
+
var $a, $iter = $Cell_to_s$30.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
|
|
35395
35494
|
|
|
35396
|
-
if ($iter) $Cell_to_s$
|
|
35495
|
+
if ($iter) $Cell_to_s$30.$$p = null;
|
|
35397
35496
|
// Prepare super implicit arguments
|
|
35398
35497
|
for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
|
|
35399
35498
|
$zuper[$zuper_i] = arguments[$zuper_i];
|
|
35400
35499
|
}
|
|
35401
|
-
return "" + ($send(self, Opal.find_super_dispatcher(self, 'to_s', $Cell_to_s$
|
|
35402
|
-
}, $Cell_to_s$
|
|
35500
|
+
return "" + ($send(self, Opal.find_super_dispatcher(self, 'to_s', $Cell_to_s$30, false), $zuper, $iter).$to_s()) + " - [text: " + (self.text) + ", colspan: " + (($truthy($a = self.colspan) ? $a : 1)) + ", rowspan: " + (($truthy($a = self.rowspan) ? $a : 1)) + ", attributes: " + (self.attributes) + "]"
|
|
35501
|
+
}, $Cell_to_s$30.$$arity = 0), nil) && 'to_s';
|
|
35403
35502
|
})($$($nesting, 'Table'), $$($nesting, 'AbstractBlock'), $nesting);
|
|
35404
35503
|
(function($base, $super, $parent_nesting) {
|
|
35405
35504
|
var self = $klass($base, $super, 'ParserContext');
|
|
35406
35505
|
|
|
35407
|
-
var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$
|
|
35506
|
+
var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$31, $ParserContext_starts_with_delimiter$ques$32, $ParserContext_match_delimiter$33, $ParserContext_skip_past_delimiter$34, $ParserContext_skip_past_escaped_delimiter$35, $ParserContext_buffer_has_unclosed_quotes$ques$36, $ParserContext_take_cellspec$37, $ParserContext_push_cellspec$38, $ParserContext_keep_cell_open$39, $ParserContext_mark_cell_closed$40, $ParserContext_cell_open$ques$41, $ParserContext_cell_closed$ques$42, $ParserContext_close_open_cell$43, $ParserContext_close_cell$44, $ParserContext_close_row$47, $ParserContext_activate_rowspan$48, $ParserContext_end_of_row$ques$50, $ParserContext_effective_column_visits$51, $ParserContext_advance$52;
|
|
35408
35507
|
|
|
35409
35508
|
self.$$prototype.delimiter = self.$$prototype.delimiter_rx = self.$$prototype.buffer = self.$$prototype.cellspecs = self.$$prototype.cell_open = self.$$prototype.format = self.$$prototype.start_cursor_data = self.$$prototype.reader = self.$$prototype.table = self.$$prototype.current_row = self.$$prototype.colcount = self.$$prototype.column_visits = self.$$prototype.active_rowspans = self.$$prototype.linenum = nil;
|
|
35410
35509
|
|
|
@@ -35418,7 +35517,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35418
35517
|
self.$attr_reader("delimiter");
|
|
35419
35518
|
self.$attr_reader("delimiter_re");
|
|
35420
35519
|
|
|
35421
|
-
Opal.def(self, '$initialize', $ParserContext_initialize$
|
|
35520
|
+
Opal.def(self, '$initialize', $ParserContext_initialize$31 = function $$initialize(reader, table, attributes) {
|
|
35422
35521
|
var $a, $b, self = this, xsv = nil, sep = nil;
|
|
35423
35522
|
|
|
35424
35523
|
|
|
@@ -35473,37 +35572,37 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35473
35572
|
self.column_visits = 0;
|
|
35474
35573
|
self.current_row = [];
|
|
35475
35574
|
return (self.linenum = -1);
|
|
35476
|
-
}, $ParserContext_initialize$
|
|
35575
|
+
}, $ParserContext_initialize$31.$$arity = -3);
|
|
35477
35576
|
|
|
35478
|
-
Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$
|
|
35577
|
+
Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$32 = function(line) {
|
|
35479
35578
|
var self = this;
|
|
35480
35579
|
|
|
35481
35580
|
return line['$start_with?'](self.delimiter)
|
|
35482
|
-
}, $ParserContext_starts_with_delimiter$ques$
|
|
35581
|
+
}, $ParserContext_starts_with_delimiter$ques$32.$$arity = 1);
|
|
35483
35582
|
|
|
35484
|
-
Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$
|
|
35583
|
+
Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$33 = function $$match_delimiter(line) {
|
|
35485
35584
|
var self = this;
|
|
35486
35585
|
|
|
35487
35586
|
return self.delimiter_rx.$match(line)
|
|
35488
|
-
}, $ParserContext_match_delimiter$
|
|
35587
|
+
}, $ParserContext_match_delimiter$33.$$arity = 1);
|
|
35489
35588
|
|
|
35490
|
-
Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$
|
|
35589
|
+
Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$34 = function $$skip_past_delimiter(pre) {
|
|
35491
35590
|
var self = this;
|
|
35492
35591
|
|
|
35493
35592
|
|
|
35494
35593
|
self.buffer = "" + (self.buffer) + (pre) + (self.delimiter);
|
|
35495
35594
|
return nil;
|
|
35496
|
-
}, $ParserContext_skip_past_delimiter$
|
|
35595
|
+
}, $ParserContext_skip_past_delimiter$34.$$arity = 1);
|
|
35497
35596
|
|
|
35498
|
-
Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$
|
|
35597
|
+
Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$35 = function $$skip_past_escaped_delimiter(pre) {
|
|
35499
35598
|
var self = this;
|
|
35500
35599
|
|
|
35501
35600
|
|
|
35502
35601
|
self.buffer = "" + (self.buffer) + (pre.$chop()) + (self.delimiter);
|
|
35503
35602
|
return nil;
|
|
35504
|
-
}, $ParserContext_skip_past_escaped_delimiter$
|
|
35603
|
+
}, $ParserContext_skip_past_escaped_delimiter$35.$$arity = 1);
|
|
35505
35604
|
|
|
35506
|
-
Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$
|
|
35605
|
+
Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$36 = function(append) {
|
|
35507
35606
|
var $a, $b, self = this, record = nil, trailing_quote = nil;
|
|
35508
35607
|
|
|
35509
35608
|
|
|
@@ -35526,15 +35625,15 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35526
35625
|
} else {
|
|
35527
35626
|
return false
|
|
35528
35627
|
};
|
|
35529
|
-
}, $ParserContext_buffer_has_unclosed_quotes$ques$
|
|
35628
|
+
}, $ParserContext_buffer_has_unclosed_quotes$ques$36.$$arity = -1);
|
|
35530
35629
|
|
|
35531
|
-
Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$
|
|
35630
|
+
Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$37 = function $$take_cellspec() {
|
|
35532
35631
|
var self = this;
|
|
35533
35632
|
|
|
35534
35633
|
return self.cellspecs.$shift()
|
|
35535
|
-
}, $ParserContext_take_cellspec$
|
|
35634
|
+
}, $ParserContext_take_cellspec$37.$$arity = 0);
|
|
35536
35635
|
|
|
35537
|
-
Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$
|
|
35636
|
+
Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$38 = function $$push_cellspec(cellspec) {
|
|
35538
35637
|
var $a, self = this;
|
|
35539
35638
|
|
|
35540
35639
|
|
|
@@ -35544,37 +35643,37 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35544
35643
|
};
|
|
35545
35644
|
self.cellspecs['$<<'](($truthy($a = cellspec) ? $a : $hash2([], {})));
|
|
35546
35645
|
return nil;
|
|
35547
|
-
}, $ParserContext_push_cellspec$
|
|
35646
|
+
}, $ParserContext_push_cellspec$38.$$arity = -1);
|
|
35548
35647
|
|
|
35549
|
-
Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$
|
|
35648
|
+
Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$39 = function $$keep_cell_open() {
|
|
35550
35649
|
var self = this;
|
|
35551
35650
|
|
|
35552
35651
|
|
|
35553
35652
|
self.cell_open = true;
|
|
35554
35653
|
return nil;
|
|
35555
|
-
}, $ParserContext_keep_cell_open$
|
|
35654
|
+
}, $ParserContext_keep_cell_open$39.$$arity = 0);
|
|
35556
35655
|
|
|
35557
|
-
Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$
|
|
35656
|
+
Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$40 = function $$mark_cell_closed() {
|
|
35558
35657
|
var self = this;
|
|
35559
35658
|
|
|
35560
35659
|
|
|
35561
35660
|
self.cell_open = false;
|
|
35562
35661
|
return nil;
|
|
35563
|
-
}, $ParserContext_mark_cell_closed$
|
|
35662
|
+
}, $ParserContext_mark_cell_closed$40.$$arity = 0);
|
|
35564
35663
|
|
|
35565
|
-
Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$
|
|
35664
|
+
Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$41 = function() {
|
|
35566
35665
|
var self = this;
|
|
35567
35666
|
|
|
35568
35667
|
return self.cell_open
|
|
35569
|
-
}, $ParserContext_cell_open$ques$
|
|
35668
|
+
}, $ParserContext_cell_open$ques$41.$$arity = 0);
|
|
35570
35669
|
|
|
35571
|
-
Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$
|
|
35670
|
+
Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$42 = function() {
|
|
35572
35671
|
var self = this;
|
|
35573
35672
|
|
|
35574
35673
|
return self.cell_open['$!']()
|
|
35575
|
-
}, $ParserContext_cell_closed$ques$
|
|
35674
|
+
}, $ParserContext_cell_closed$ques$42.$$arity = 0);
|
|
35576
35675
|
|
|
35577
|
-
Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$
|
|
35676
|
+
Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$43 = function $$close_open_cell(next_cellspec) {
|
|
35578
35677
|
var self = this;
|
|
35579
35678
|
|
|
35580
35679
|
|
|
@@ -35587,11 +35686,11 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35587
35686
|
self.$close_cell(true)};
|
|
35588
35687
|
self.$advance();
|
|
35589
35688
|
return nil;
|
|
35590
|
-
}, $ParserContext_close_open_cell$
|
|
35689
|
+
}, $ParserContext_close_open_cell$43.$$arity = -1);
|
|
35591
35690
|
|
|
35592
|
-
Opal.def(self, '$close_cell', $ParserContext_close_cell$
|
|
35691
|
+
Opal.def(self, '$close_cell', $ParserContext_close_cell$44 = function $$close_cell(eol) {try {
|
|
35593
35692
|
|
|
35594
|
-
var $a, $b, $$
|
|
35693
|
+
var $a, $b, $$45, self = this, cell_text = nil, cellspec = nil, repeat = nil;
|
|
35595
35694
|
|
|
35596
35695
|
|
|
35597
35696
|
|
|
@@ -35629,7 +35728,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35629
35728
|
cell_text = cell_text.$squeeze("\"")
|
|
35630
35729
|
}};
|
|
35631
35730
|
};
|
|
35632
|
-
$send((1), 'upto', [repeat], ($$
|
|
35731
|
+
$send((1), 'upto', [repeat], ($$45 = function(i){var self = $$45.$$s || this, $c, $d, $$46, $e, column = nil, extra_cols = nil, offset = nil, cell = nil;
|
|
35633
35732
|
if (self.colcount == null) self.colcount = nil;
|
|
35634
35733
|
if (self.table == null) self.table = nil;
|
|
35635
35734
|
if (self.current_row == null) self.current_row = nil;
|
|
@@ -35648,7 +35747,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35648
35747
|
if ($truthy(($truthy($c = ($truthy($d = cellspec) ? cellspec['$key?']("colspan") : $d)) ? $rb_gt((extra_cols = $rb_minus(cellspec['$[]']("colspan").$to_i(), 1)), 0) : $c))) {
|
|
35649
35748
|
|
|
35650
35749
|
offset = self.table.$columns().$size();
|
|
35651
|
-
$send(extra_cols, 'times', [], ($$
|
|
35750
|
+
$send(extra_cols, 'times', [], ($$46 = function(j){var self = $$46.$$s || this;
|
|
35652
35751
|
if (self.table == null) self.table = nil;
|
|
35653
35752
|
|
|
35654
35753
|
|
|
@@ -35656,7 +35755,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35656
35755
|
if (j == null) {
|
|
35657
35756
|
j = nil;
|
|
35658
35757
|
};
|
|
35659
|
-
return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$
|
|
35758
|
+
return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$46.$$s = self, $$46.$$arity = 1, $$46));};
|
|
35660
35759
|
} else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) {
|
|
35661
35760
|
} else {
|
|
35662
35761
|
|
|
@@ -35675,14 +35774,14 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35675
35774
|
return self.$close_row()
|
|
35676
35775
|
} else {
|
|
35677
35776
|
return nil
|
|
35678
|
-
};}, $$
|
|
35777
|
+
};}, $$45.$$s = self, $$45.$$arity = 1, $$45));
|
|
35679
35778
|
self.cell_open = false;
|
|
35680
35779
|
return nil;
|
|
35681
35780
|
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
|
|
35682
|
-
}, $ParserContext_close_cell$
|
|
35781
|
+
}, $ParserContext_close_cell$44.$$arity = -1);
|
|
35683
35782
|
self.$private();
|
|
35684
35783
|
|
|
35685
|
-
Opal.def(self, '$close_row', $ParserContext_close_row$
|
|
35784
|
+
Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row() {
|
|
35686
35785
|
var $a, self = this, $writer = nil;
|
|
35687
35786
|
|
|
35688
35787
|
|
|
@@ -35694,13 +35793,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35694
35793
|
self.active_rowspans.$shift();
|
|
35695
35794
|
($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
35696
35795
|
return nil;
|
|
35697
|
-
}, $ParserContext_close_row$
|
|
35796
|
+
}, $ParserContext_close_row$47.$$arity = 0);
|
|
35698
35797
|
|
|
35699
|
-
Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$
|
|
35700
|
-
var $$
|
|
35798
|
+
Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) {
|
|
35799
|
+
var $$49, self = this;
|
|
35701
35800
|
|
|
35702
35801
|
|
|
35703
|
-
$send((1), 'upto', [$rb_minus(rowspan, 1)], ($$
|
|
35802
|
+
$send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil;
|
|
35704
35803
|
if (self.active_rowspans == null) self.active_rowspans = nil;
|
|
35705
35804
|
|
|
35706
35805
|
|
|
@@ -35710,26 +35809,26 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35710
35809
|
};
|
|
35711
35810
|
$writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)];
|
|
35712
35811
|
$send(self.active_rowspans, '[]=', Opal.to_a($writer));
|
|
35713
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$
|
|
35812
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49));
|
|
35714
35813
|
return nil;
|
|
35715
|
-
}, $ParserContext_activate_rowspan$
|
|
35814
|
+
}, $ParserContext_activate_rowspan$48.$$arity = 2);
|
|
35716
35815
|
|
|
35717
|
-
Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$
|
|
35816
|
+
Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() {
|
|
35718
35817
|
var $a, self = this;
|
|
35719
35818
|
|
|
35720
35819
|
return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount))
|
|
35721
|
-
}, $ParserContext_end_of_row$ques$
|
|
35820
|
+
}, $ParserContext_end_of_row$ques$50.$$arity = 0);
|
|
35722
35821
|
|
|
35723
|
-
Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$
|
|
35822
|
+
Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() {
|
|
35724
35823
|
var self = this;
|
|
35725
35824
|
|
|
35726
35825
|
return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0))
|
|
35727
|
-
}, $ParserContext_effective_column_visits$
|
|
35728
|
-
return (Opal.def(self, '$advance', $ParserContext_advance$
|
|
35826
|
+
}, $ParserContext_effective_column_visits$51.$$arity = 0);
|
|
35827
|
+
return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() {
|
|
35729
35828
|
var self = this;
|
|
35730
35829
|
|
|
35731
35830
|
return (self.linenum = $rb_plus(self.linenum, 1))
|
|
35732
|
-
}, $ParserContext_advance$
|
|
35831
|
+
}, $ParserContext_advance$52.$$arity = 0), nil) && 'advance';
|
|
35733
35832
|
})($$($nesting, 'Table'), null, $nesting);
|
|
35734
35833
|
})($nesting[0], $nesting)
|
|
35735
35834
|
};
|
|
@@ -35793,205 +35892,207 @@ Opal.modules["asciidoctor/load"] = function(Opal) {
|
|
|
35793
35892
|
}
|
|
35794
35893
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send;
|
|
35795
35894
|
|
|
35796
|
-
Opal.add_stubs(['$
|
|
35895
|
+
Opal.add_stubs(['$merge', '$[]', '$start', '$!=', '$logger', '$logger=', '$-', '$!', '$===', '$dup', '$tap', '$each', '$partition', '$[]=', '$split', '$gsub', '$+', '$respond_to?', '$keys', '$raise', '$join', '$ancestors', '$class', '$mtime', '$absolute_path', '$path', '$dirname', '$basename', '$extname', '$read', '$rewind', '$drop', '$record', '$==', '$new', '$parse', '$exception', '$message', '$set_backtrace', '$backtrace', '$stack_trace', '$stack_trace=', '$open', '$load']);
|
|
35797
35896
|
return (function($base, $parent_nesting) {
|
|
35798
35897
|
var self = $module($base, 'Asciidoctor');
|
|
35799
35898
|
|
|
35800
|
-
var $nesting = [self].concat($parent_nesting)
|
|
35899
|
+
var $nesting = [self].concat($parent_nesting);
|
|
35801
35900
|
|
|
35802
|
-
|
|
35803
|
-
|
|
35804
|
-
|
|
35805
|
-
Opal.def(self, '$load', $Asciidoctor_load$1 = function $$load(input, options) {
|
|
35806
|
-
var $a, $b, $c, $d, $$2, $$4, $$6, self = this, timings = nil, logger = nil, $writer = nil, attrs = nil, input_path = nil, source = nil, doc = nil, ex = nil, context = nil, wrapped_ex = nil;
|
|
35901
|
+
(function(self, $parent_nesting) {
|
|
35902
|
+
var $nesting = [self].concat($parent_nesting), $load$1, $load_file$8;
|
|
35807
35903
|
|
|
35808
35904
|
|
|
35809
35905
|
|
|
35810
|
-
|
|
35811
|
-
|
|
35812
|
-
};
|
|
35813
|
-
try {
|
|
35814
|
-
|
|
35815
|
-
options = options.$merge();
|
|
35816
|
-
if ($truthy((timings = options['$[]']("timings")))) {
|
|
35817
|
-
timings.$start("read")};
|
|
35818
|
-
if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
|
|
35819
|
-
|
|
35820
|
-
$writer = [logger];
|
|
35821
|
-
$send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
|
|
35822
|
-
$writer[$rb_minus($writer["length"], 1)];};
|
|
35823
|
-
if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
|
|
35824
|
-
attrs = $hash2([], {})
|
|
35825
|
-
} else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
|
|
35826
|
-
attrs = attrs.$merge()
|
|
35827
|
-
} else if ($truthy(($truthy($a = (($d = $$$('::', 'Java', 'skip_raise')) && ($c = $$$($d, 'JavaUtil', 'skip_raise')) && ($b = $$$($c, 'Map', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'Java'), 'JavaUtil'), 'Map')['$==='](attrs) : $a))) {
|
|
35828
|
-
attrs = attrs.$dup()
|
|
35829
|
-
} else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
|
|
35830
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
|
|
35906
|
+
Opal.def(self, '$load', $load$1 = function $$load(input, options) {
|
|
35907
|
+
var $a, $b, $c, $d, $$2, $$4, $$6, self = this, timings = nil, logger = nil, $writer = nil, attrs = nil, input_path = nil, source = nil, doc = nil, ex = nil, context = nil, wrapped_ex = nil;
|
|
35831
35908
|
|
|
35909
|
+
|
|
35910
|
+
|
|
35911
|
+
if (options == null) {
|
|
35912
|
+
options = $hash2([], {});
|
|
35913
|
+
};
|
|
35914
|
+
try {
|
|
35832
35915
|
|
|
35916
|
+
options = options.$merge();
|
|
35917
|
+
if ($truthy((timings = options['$[]']("timings")))) {
|
|
35918
|
+
timings.$start("read")};
|
|
35919
|
+
if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
|
|
35833
35920
|
|
|
35834
|
-
|
|
35835
|
-
|
|
35836
|
-
};
|
|
35837
|
-
|
|
35921
|
+
$writer = [logger];
|
|
35922
|
+
$send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
|
|
35923
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
35924
|
+
if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
|
|
35925
|
+
attrs = $hash2([], {})
|
|
35926
|
+
} else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
|
|
35927
|
+
attrs = attrs.$merge()
|
|
35928
|
+
} else if ($truthy(($truthy($a = (($d = $$$('::', 'Java', 'skip_raise')) && ($c = $$$($d, 'JavaUtil', 'skip_raise')) && ($b = $$$($c, 'Map', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'Java'), 'JavaUtil'), 'Map')['$==='](attrs) : $a))) {
|
|
35929
|
+
attrs = attrs.$dup()
|
|
35930
|
+
} else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
|
|
35931
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
|
|
35838
35932
|
|
|
35839
35933
|
|
|
35840
35934
|
|
|
35841
|
-
if (
|
|
35842
|
-
|
|
35935
|
+
if (accum == null) {
|
|
35936
|
+
accum = nil;
|
|
35843
35937
|
};
|
|
35844
|
-
$
|
|
35845
|
-
|
|
35846
|
-
$writer = [k, v];
|
|
35847
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
35848
|
-
return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
|
|
35849
|
-
} else if ($truthy($$$('::', 'String')['$==='](attrs))) {
|
|
35850
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
|
|
35938
|
+
return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
|
|
35851
35939
|
|
|
35852
|
-
|
|
35853
|
-
|
|
35854
|
-
|
|
35855
|
-
|
|
35856
|
-
|
|
35857
|
-
|
|
35940
|
+
|
|
35941
|
+
|
|
35942
|
+
if (entry == null) {
|
|
35943
|
+
entry = nil;
|
|
35944
|
+
};
|
|
35945
|
+
$f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f;
|
|
35946
|
+
|
|
35947
|
+
$writer = [k, v];
|
|
35948
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
35949
|
+
return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
|
|
35950
|
+
} else if ($truthy($$$('::', 'String')['$==='](attrs))) {
|
|
35951
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
|
|
35858
35952
|
|
|
35859
35953
|
|
|
35860
35954
|
|
|
35861
|
-
if (
|
|
35862
|
-
|
|
35955
|
+
if (accum == null) {
|
|
35956
|
+
accum = nil;
|
|
35863
35957
|
};
|
|
35864
|
-
$
|
|
35865
|
-
|
|
35866
|
-
$writer = [k, v];
|
|
35867
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
35868
|
-
return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
|
|
35869
|
-
} else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
|
|
35870
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
|
|
35958
|
+
return $send(attrs.$gsub($$($nesting, 'SpaceDelimiterRx'), $rb_plus("\\1", $$($nesting, 'NULL'))).$gsub($$($nesting, 'EscapedSpaceRx'), "\\1").$split($$($nesting, 'NULL')), 'each', [], ($$5 = function(entry){var self = $$5.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
|
|
35871
35959
|
|
|
35872
|
-
|
|
35873
|
-
|
|
35874
|
-
|
|
35875
|
-
|
|
35876
|
-
|
|
35877
|
-
|
|
35960
|
+
|
|
35961
|
+
|
|
35962
|
+
if (entry == null) {
|
|
35963
|
+
entry = nil;
|
|
35964
|
+
};
|
|
35965
|
+
$f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f;
|
|
35966
|
+
|
|
35967
|
+
$writer = [k, v];
|
|
35968
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
35969
|
+
return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
|
|
35970
|
+
} else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
|
|
35971
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
|
|
35878
35972
|
|
|
35879
35973
|
|
|
35880
35974
|
|
|
35881
|
-
if (
|
|
35882
|
-
|
|
35975
|
+
if (accum == null) {
|
|
35976
|
+
accum = nil;
|
|
35883
35977
|
};
|
|
35884
|
-
$
|
|
35885
|
-
|
|
35886
|
-
|
|
35887
|
-
|
|
35888
|
-
|
|
35889
|
-
|
|
35890
|
-
|
|
35891
|
-
|
|
35892
|
-
|
|
35893
|
-
|
|
35894
|
-
|
|
35895
|
-
|
|
35896
|
-
|
|
35897
|
-
$writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
|
|
35898
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
35899
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
35900
|
-
|
|
35901
|
-
$writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
|
|
35902
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
35903
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
35904
|
-
|
|
35905
|
-
$writer = ["docname", $$($nesting, 'Helpers').$basename(input_path, (($writer = ["docfilesuffix", $$($nesting, 'Helpers').$extname(input_path)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))];
|
|
35906
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
35907
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
35908
|
-
source = input.$read();
|
|
35909
|
-
} else if ($truthy(input['$respond_to?']("read"))) {
|
|
35910
|
-
|
|
35911
|
-
try {
|
|
35912
|
-
input.$rewind()
|
|
35913
|
-
} catch ($err) {
|
|
35914
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
35915
|
-
try {
|
|
35916
|
-
nil
|
|
35917
|
-
} finally { Opal.pop_exception() }
|
|
35918
|
-
} else { throw $err; }
|
|
35978
|
+
return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this;
|
|
35979
|
+
|
|
35980
|
+
|
|
35981
|
+
|
|
35982
|
+
if (k == null) {
|
|
35983
|
+
k = nil;
|
|
35984
|
+
};
|
|
35985
|
+
$writer = [k, attrs['$[]'](k)];
|
|
35986
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
35987
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6))
|
|
35988
|
+
} else {
|
|
35989
|
+
self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
|
|
35919
35990
|
};
|
|
35920
|
-
|
|
35921
|
-
|
|
35922
|
-
source = input
|
|
35923
|
-
} else if ($truthy($$$('::', 'Array')['$==='](input))) {
|
|
35924
|
-
source = input.$drop(0)
|
|
35925
|
-
} else if ($truthy(input)) {
|
|
35926
|
-
self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
|
|
35927
|
-
if ($truthy(timings)) {
|
|
35928
|
-
|
|
35929
|
-
timings.$record("read");
|
|
35930
|
-
timings.$start("parse");};
|
|
35931
|
-
|
|
35932
|
-
$writer = ["attributes", attrs];
|
|
35933
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
35934
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
35935
|
-
doc = (function() {if (options['$[]']("parse")['$=='](false)) {
|
|
35936
|
-
|
|
35937
|
-
return $$($nesting, 'Document').$new(source, options);
|
|
35938
|
-
} else {
|
|
35939
|
-
return $$($nesting, 'Document').$new(source, options).$parse()
|
|
35940
|
-
}; return nil; })();
|
|
35941
|
-
if ($truthy(timings)) {
|
|
35942
|
-
timings.$record("parse")};
|
|
35943
|
-
return doc;
|
|
35944
|
-
} catch ($err) {
|
|
35945
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
|
|
35946
|
-
try {
|
|
35991
|
+
if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
35992
|
+
|
|
35947
35993
|
|
|
35994
|
+
$writer = ["input_mtime", input.$mtime()];
|
|
35995
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35996
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35997
|
+
|
|
35998
|
+
$writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
|
|
35999
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
36000
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
36001
|
+
|
|
36002
|
+
$writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
|
|
36003
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
36004
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
36005
|
+
|
|
36006
|
+
$writer = ["docname", $$($nesting, 'Helpers').$basename(input_path, (($writer = ["docfilesuffix", $$($nesting, 'Helpers').$extname(input_path)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))];
|
|
36007
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
36008
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
36009
|
+
source = input.$read();
|
|
36010
|
+
} else if ($truthy(input['$respond_to?']("read"))) {
|
|
35948
36011
|
|
|
35949
36012
|
try {
|
|
35950
|
-
|
|
35951
|
-
context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
|
|
35952
|
-
if ($truthy(ex['$respond_to?']("exception"))) {
|
|
35953
|
-
|
|
35954
|
-
wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
|
|
35955
|
-
wrapped_ex.$set_backtrace(ex.$backtrace());
|
|
35956
|
-
wrapped_ex.stack = ex.stack;
|
|
35957
|
-
} else {
|
|
35958
|
-
|
|
35959
|
-
wrapped_ex = ex.$class().$new(context, ex);
|
|
35960
|
-
|
|
35961
|
-
$writer = [ex.$stack_trace()];
|
|
35962
|
-
$send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
|
|
35963
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
35964
|
-
};
|
|
36013
|
+
input.$rewind()
|
|
35965
36014
|
} catch ($err) {
|
|
35966
36015
|
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
35967
36016
|
try {
|
|
35968
|
-
|
|
36017
|
+
nil
|
|
35969
36018
|
} finally { Opal.pop_exception() }
|
|
35970
36019
|
} else { throw $err; }
|
|
35971
|
-
}
|
|
35972
|
-
|
|
35973
|
-
}
|
|
35974
|
-
|
|
35975
|
-
|
|
35976
|
-
|
|
35977
|
-
|
|
35978
|
-
|
|
35979
|
-
|
|
35980
|
-
|
|
35981
|
-
|
|
35982
|
-
|
|
35983
|
-
|
|
35984
|
-
|
|
35985
|
-
|
|
35986
|
-
|
|
36020
|
+
};
|
|
36021
|
+
source = input.$read();
|
|
36022
|
+
} else if ($truthy($$$('::', 'String')['$==='](input))) {
|
|
36023
|
+
source = input
|
|
36024
|
+
} else if ($truthy($$$('::', 'Array')['$==='](input))) {
|
|
36025
|
+
source = input.$drop(0)
|
|
36026
|
+
} else if ($truthy(input)) {
|
|
36027
|
+
self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
|
|
36028
|
+
if ($truthy(timings)) {
|
|
36029
|
+
|
|
36030
|
+
timings.$record("read");
|
|
36031
|
+
timings.$start("parse");};
|
|
36032
|
+
|
|
36033
|
+
$writer = ["attributes", attrs];
|
|
36034
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36035
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
36036
|
+
doc = (function() {if (options['$[]']("parse")['$=='](false)) {
|
|
36037
|
+
|
|
36038
|
+
return $$($nesting, 'Document').$new(source, options);
|
|
36039
|
+
} else {
|
|
36040
|
+
return $$($nesting, 'Document').$new(source, options).$parse()
|
|
36041
|
+
}; return nil; })();
|
|
36042
|
+
if ($truthy(timings)) {
|
|
36043
|
+
timings.$record("parse")};
|
|
36044
|
+
return doc;
|
|
36045
|
+
} catch ($err) {
|
|
36046
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
|
|
36047
|
+
try {
|
|
36048
|
+
|
|
36049
|
+
|
|
36050
|
+
try {
|
|
36051
|
+
|
|
36052
|
+
context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
|
|
36053
|
+
if ($truthy(ex['$respond_to?']("exception"))) {
|
|
36054
|
+
|
|
36055
|
+
wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
|
|
36056
|
+
wrapped_ex.$set_backtrace(ex.$backtrace());
|
|
36057
|
+
wrapped_ex.stack = ex.stack;
|
|
36058
|
+
} else {
|
|
36059
|
+
|
|
36060
|
+
wrapped_ex = ex.$class().$new(context, ex);
|
|
36061
|
+
|
|
36062
|
+
$writer = [ex.$stack_trace()];
|
|
36063
|
+
$send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
|
|
36064
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
36065
|
+
};
|
|
36066
|
+
} catch ($err) {
|
|
36067
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
36068
|
+
try {
|
|
36069
|
+
wrapped_ex = ex
|
|
36070
|
+
} finally { Opal.pop_exception() }
|
|
36071
|
+
} else { throw $err; }
|
|
36072
|
+
};;
|
|
36073
|
+
return self.$raise(wrapped_ex);
|
|
36074
|
+
} finally { Opal.pop_exception() }
|
|
36075
|
+
} else { throw $err; }
|
|
36076
|
+
};
|
|
36077
|
+
}, $load$1.$$arity = -2);
|
|
36078
|
+
return (Opal.def(self, '$load_file', $load_file$8 = function $$load_file(filename, options) {
|
|
36079
|
+
var $$9, self = this;
|
|
35987
36080
|
|
|
35988
|
-
|
|
35989
36081
|
|
|
35990
|
-
|
|
35991
|
-
|
|
36082
|
+
|
|
36083
|
+
if (options == null) {
|
|
36084
|
+
options = $hash2([], {});
|
|
35992
36085
|
};
|
|
35993
|
-
return
|
|
35994
|
-
|
|
36086
|
+
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this;
|
|
36087
|
+
|
|
36088
|
+
|
|
36089
|
+
|
|
36090
|
+
if (file == null) {
|
|
36091
|
+
file = nil;
|
|
36092
|
+
};
|
|
36093
|
+
return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9));
|
|
36094
|
+
}, $load_file$8.$$arity = -2), nil) && 'load_file';
|
|
36095
|
+
})(Opal.get_singleton_class(self), $nesting)
|
|
35995
36096
|
})($nesting[0], $nesting)
|
|
35996
36097
|
};
|
|
35997
36098
|
|
|
@@ -36008,195 +36109,203 @@ Opal.modules["asciidoctor/convert"] = function(Opal) {
|
|
|
36008
36109
|
}
|
|
36009
36110
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send;
|
|
36010
36111
|
|
|
36011
|
-
Opal.add_stubs(['$
|
|
36112
|
+
Opal.add_stubs(['$delete', '$merge', '$===', '$absolute_path', '$path', '$load', '$respond_to?', '$[]=', '$-', '$key?', '$fetch', '$[]', '$dirname', '$expand_path', '$join', '$attributes', '$outfilesuffix', '$==', '$raise', '$pwd', '$>=', '$safe', '$normalize_system_path', '$mkdir_p', '$directory?', '$!', '$convert', '$write', '$<', '$attr?', '$basebackend?', '$attr', '$uriish?', '$include?', '$syntax_highlighter', '$write_stylesheet?', '$write_primary_stylesheet', '$instance', '$to_s', '$!=', '$read_asset', '$file?', '$write_stylesheet', '$open']);
|
|
36012
36113
|
return (function($base, $parent_nesting) {
|
|
36013
36114
|
var self = $module($base, 'Asciidoctor');
|
|
36014
36115
|
|
|
36015
|
-
var $nesting = [self].concat($parent_nesting)
|
|
36116
|
+
var $nesting = [self].concat($parent_nesting);
|
|
36016
36117
|
|
|
36017
|
-
|
|
36018
|
-
|
|
36019
|
-
|
|
36020
|
-
Opal.def(self, '$convert', $Asciidoctor_convert$1 = function $$convert(input, options) {
|
|
36021
|
-
var $a, $b, $c, $d, $e, self = this, to_dir = nil, mkdirs = nil, $case = nil, to_file = nil, write_to_target = nil, sibling_path = nil, stream_output = nil, $writer = nil, outdir = nil, doc = nil, outfile = nil, working_dir = nil, jail = nil, output = nil, stylesdir = nil, stylesheet = nil, copy_asciidoctor_stylesheet = nil, copy_user_stylesheet = nil, copy_syntax_hl_stylesheet = nil, syntax_hl = nil, stylesoutdir = nil, stylesheet_src = nil, stylesheet_dest = nil, stylesheet_data = nil;
|
|
36118
|
+
(function(self, $parent_nesting) {
|
|
36119
|
+
var $nesting = [self].concat($parent_nesting), $convert$1, $convert_file$2;
|
|
36022
36120
|
|
|
36023
36121
|
|
|
36024
36122
|
|
|
36025
|
-
|
|
36026
|
-
|
|
36027
|
-
|
|
36028
|
-
(options = options.$merge()).$delete("parse");
|
|
36029
|
-
to_dir = options.$delete("to_dir");
|
|
36030
|
-
mkdirs = options.$delete("mkdirs");
|
|
36031
|
-
$case = (to_file = options.$delete("to_file"));
|
|
36032
|
-
if (true['$===']($case) || nil['$===']($case)) {
|
|
36033
|
-
if ($truthy((write_to_target = to_dir))) {
|
|
36034
|
-
} else if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
36035
|
-
sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
|
|
36036
|
-
to_file = nil;}
|
|
36037
|
-
else if (false['$===']($case)) {to_file = nil}
|
|
36038
|
-
else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
|
|
36039
|
-
else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
|
|
36040
|
-
} else {
|
|
36041
|
-
|
|
36042
|
-
$writer = ["to_file", (write_to_target = to_file)];
|
|
36043
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
36044
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
36045
|
-
}};
|
|
36046
|
-
if ($truthy(options['$key?']("standalone"))) {
|
|
36047
|
-
} else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
|
|
36048
|
-
|
|
36049
|
-
$writer = ["standalone", options.$fetch("header_footer", true)];
|
|
36050
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
36051
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
36052
|
-
} else if ($truthy(options['$key?']("header_footer"))) {
|
|
36123
|
+
Opal.def(self, '$convert', $convert$1 = function $$convert(input, options) {
|
|
36124
|
+
var $a, $b, $c, $d, $e, self = this, to_dir = nil, mkdirs = nil, $case = nil, to_file = nil, write_to_target = nil, sibling_path = nil, stream_output = nil, $writer = nil, outdir = nil, doc = nil, outfile = nil, working_dir = nil, jail = nil, output = nil, stylesdir = nil, stylesheet = nil, copy_asciidoctor_stylesheet = nil, copy_user_stylesheet = nil, copy_syntax_hl_stylesheet = nil, syntax_hl = nil, stylesoutdir = nil, stylesheet_src = nil, stylesheet_dest = nil, stylesheet_data = nil, stylesheet_outdir = nil;
|
|
36125
|
+
|
|
36053
36126
|
|
|
36054
|
-
$writer = ["standalone", options['$[]']("header_footer")];
|
|
36055
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
36056
|
-
$writer[$rb_minus($writer["length"], 1)];};
|
|
36057
|
-
if ($truthy(sibling_path)) {
|
|
36058
36127
|
|
|
36059
|
-
|
|
36060
|
-
|
|
36061
|
-
|
|
36062
|
-
|
|
36063
|
-
|
|
36064
|
-
|
|
36065
|
-
|
|
36066
|
-
|
|
36067
|
-
|
|
36068
|
-
|
|
36069
|
-
|
|
36070
|
-
|
|
36071
|
-
|
|
36072
|
-
|
|
36073
|
-
|
|
36074
|
-
|
|
36075
|
-
|
|
36128
|
+
if (options == null) {
|
|
36129
|
+
options = $hash2([], {});
|
|
36130
|
+
};
|
|
36131
|
+
(options = options.$merge()).$delete("parse");
|
|
36132
|
+
to_dir = options.$delete("to_dir");
|
|
36133
|
+
mkdirs = options.$delete("mkdirs");
|
|
36134
|
+
$case = (to_file = options.$delete("to_file"));
|
|
36135
|
+
if (true['$===']($case) || nil['$===']($case)) {
|
|
36136
|
+
if ($truthy((write_to_target = to_dir))) {
|
|
36137
|
+
} else if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
36138
|
+
sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
|
|
36139
|
+
to_file = nil;}
|
|
36140
|
+
else if (false['$===']($case)) {to_file = nil}
|
|
36141
|
+
else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
|
|
36142
|
+
else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
|
|
36143
|
+
} else {
|
|
36144
|
+
|
|
36145
|
+
$writer = ["to_file", (write_to_target = to_file)];
|
|
36146
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36147
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
36148
|
+
}};
|
|
36149
|
+
if ($truthy(options['$key?']("standalone"))) {
|
|
36150
|
+
} else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
|
|
36076
36151
|
|
|
36077
|
-
$writer = ["
|
|
36152
|
+
$writer = ["standalone", options.$fetch("header_footer", true)];
|
|
36078
36153
|
$send(options, '[]=', Opal.to_a($writer));
|
|
36079
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
36080
|
-
|
|
36081
|
-
if ($truthy(sibling_path)) {
|
|
36082
|
-
|
|
36083
|
-
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
|
|
36084
|
-
if (outfile['$=='](sibling_path)) {
|
|
36085
|
-
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
36086
|
-
} else if ($truthy(write_to_target)) {
|
|
36087
|
-
|
|
36088
|
-
working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
|
|
36154
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
36155
|
+
} else if ($truthy(options['$key?']("header_footer"))) {
|
|
36089
36156
|
|
|
36090
|
-
|
|
36091
|
-
|
|
36092
|
-
|
|
36093
|
-
|
|
36094
|
-
jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36095
|
-
return working_dir
|
|
36096
|
-
} else {
|
|
36097
|
-
return nil
|
|
36098
|
-
}; return nil; })();
|
|
36099
|
-
if ($truthy(to_dir)) {
|
|
36157
|
+
$writer = ["standalone", options['$[]']("header_footer")];
|
|
36158
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36159
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
36160
|
+
if ($truthy(sibling_path)) {
|
|
36100
36161
|
|
|
36101
|
-
|
|
36102
|
-
|
|
36162
|
+
$writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
|
|
36163
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36164
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
36165
|
+
} else if ($truthy(write_to_target)) {
|
|
36166
|
+
if ($truthy(to_dir)) {
|
|
36167
|
+
if ($truthy(to_file)) {
|
|
36168
|
+
|
|
36169
|
+
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file, to_dir))];
|
|
36170
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36171
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
36172
|
+
} else {
|
|
36173
|
+
|
|
36174
|
+
$writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
|
|
36175
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36176
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
36177
|
+
}
|
|
36178
|
+
} else if ($truthy(to_file)) {
|
|
36179
|
+
|
|
36180
|
+
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
|
|
36181
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
36182
|
+
$writer[$rb_minus($writer["length"], 1)];}};
|
|
36183
|
+
doc = self.$load(input, options);
|
|
36184
|
+
if ($truthy(sibling_path)) {
|
|
36185
|
+
|
|
36186
|
+
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
|
|
36187
|
+
if (outfile['$=='](sibling_path)) {
|
|
36188
|
+
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
36189
|
+
} else if ($truthy(write_to_target)) {
|
|
36190
|
+
|
|
36191
|
+
working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
|
|
36103
36192
|
|
|
36104
|
-
|
|
36105
|
-
|
|
36193
|
+
return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
|
|
36194
|
+
} else {
|
|
36195
|
+
return $$$('::', 'Dir').$pwd()
|
|
36196
|
+
}; return nil; })();
|
|
36197
|
+
jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36198
|
+
return working_dir
|
|
36106
36199
|
} else {
|
|
36107
|
-
|
|
36200
|
+
return nil
|
|
36201
|
+
}; return nil; })();
|
|
36202
|
+
if ($truthy(to_dir)) {
|
|
36203
|
+
|
|
36204
|
+
outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
36205
|
+
if ($truthy(to_file)) {
|
|
36206
|
+
|
|
36207
|
+
outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
36208
|
+
outdir = $$$('::', 'File').$dirname(outfile);
|
|
36209
|
+
} else {
|
|
36210
|
+
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
|
|
36211
|
+
};
|
|
36212
|
+
} else if ($truthy(to_file)) {
|
|
36213
|
+
|
|
36214
|
+
outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
36215
|
+
outdir = $$$('::', 'File').$dirname(outfile);};
|
|
36216
|
+
if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
|
|
36217
|
+
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
36218
|
+
if ($truthy(mkdirs)) {
|
|
36219
|
+
$$($nesting, 'Helpers').$mkdir_p(outdir)
|
|
36220
|
+
} else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
|
|
36221
|
+
} else {
|
|
36222
|
+
self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
|
|
36108
36223
|
};
|
|
36109
|
-
} else
|
|
36224
|
+
} else {
|
|
36110
36225
|
|
|
36111
|
-
outfile =
|
|
36112
|
-
outdir =
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
$$($nesting, 'Helpers').$mkdir_p(outdir)
|
|
36117
|
-
} else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
|
|
36226
|
+
outfile = to_file;
|
|
36227
|
+
outdir = nil;
|
|
36228
|
+
};
|
|
36229
|
+
if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
|
|
36230
|
+
output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
|
|
36118
36231
|
} else {
|
|
36119
|
-
|
|
36232
|
+
output = doc.$convert()
|
|
36120
36233
|
};
|
|
36121
|
-
|
|
36122
|
-
|
|
36123
|
-
outfile = to_file;
|
|
36124
|
-
outdir = nil;
|
|
36125
|
-
};
|
|
36126
|
-
if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
|
|
36127
|
-
output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
|
|
36128
|
-
} else {
|
|
36129
|
-
output = doc.$convert()
|
|
36130
|
-
};
|
|
36131
|
-
if ($truthy(outfile)) {
|
|
36132
|
-
|
|
36133
|
-
doc.$write(output, outfile);
|
|
36134
|
-
if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = stream_output['$!']()) ? $rb_lt(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $e)) ? doc['$attr?']("linkcss") : $d)) ? doc['$attr?']("copycss") : $c)) ? doc['$basebackend?']("html") : $b)) ? ($truthy($b = (stylesdir = doc.$attr("stylesdir"))) ? $$($nesting, 'Helpers')['$uriish?'](stylesdir) : $b)['$!']() : $a))) {
|
|
36234
|
+
if ($truthy(outfile)) {
|
|
36135
36235
|
|
|
36136
|
-
|
|
36137
|
-
|
|
36138
|
-
copy_asciidoctor_stylesheet = true
|
|
36139
|
-
} else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
|
|
36140
|
-
copy_user_stylesheet = true}};
|
|
36141
|
-
copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
|
|
36142
|
-
if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
|
|
36236
|
+
doc.$write(output, outfile);
|
|
36237
|
+
if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = stream_output['$!']()) ? $rb_lt(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $e)) ? doc['$attr?']("linkcss") : $d)) ? doc['$attr?']("copycss") : $c)) ? doc['$basebackend?']("html") : $b)) ? ($truthy($b = (stylesdir = doc.$attr("stylesdir"))) ? $$($nesting, 'Helpers')['$uriish?'](stylesdir) : $b)['$!']() : $a))) {
|
|
36143
36238
|
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
|
|
36147
|
-
|
|
36148
|
-
|
|
36149
|
-
|
|
36150
|
-
|
|
36151
|
-
} else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
|
|
36152
|
-
} else {
|
|
36153
|
-
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
|
|
36154
|
-
};
|
|
36155
|
-
if ($truthy(copy_asciidoctor_stylesheet)) {
|
|
36156
|
-
$$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
|
|
36157
|
-
} else if ($truthy(copy_user_stylesheet)) {
|
|
36239
|
+
if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
|
|
36240
|
+
if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
|
|
36241
|
+
copy_asciidoctor_stylesheet = true
|
|
36242
|
+
} else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
|
|
36243
|
+
copy_user_stylesheet = true}};
|
|
36244
|
+
copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
|
|
36245
|
+
if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
|
|
36158
36246
|
|
|
36159
|
-
if ($truthy((
|
|
36160
|
-
stylesheet_src = doc.$normalize_system_path(stylesheet)
|
|
36161
|
-
} else {
|
|
36162
|
-
stylesheet_src = doc.$normalize_system_path(stylesheet_src)
|
|
36163
|
-
};
|
|
36164
|
-
stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36247
|
+
stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36165
36248
|
return outdir
|
|
36166
36249
|
} else {
|
|
36167
36250
|
return nil
|
|
36168
36251
|
}; return nil; })());
|
|
36169
|
-
if ($truthy(
|
|
36170
|
-
|
|
36171
|
-
|
|
36172
|
-
|
|
36173
|
-
|
|
36174
|
-
|
|
36175
|
-
|
|
36176
|
-
|
|
36177
|
-
|
|
36178
|
-
|
|
36179
|
-
|
|
36180
|
-
|
|
36181
|
-
|
|
36182
|
-
|
|
36252
|
+
if ($truthy(mkdirs)) {
|
|
36253
|
+
$$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
|
|
36254
|
+
} else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
|
|
36255
|
+
} else {
|
|
36256
|
+
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
|
|
36257
|
+
};
|
|
36258
|
+
if ($truthy(copy_asciidoctor_stylesheet)) {
|
|
36259
|
+
$$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
|
|
36260
|
+
} else if ($truthy(copy_user_stylesheet)) {
|
|
36261
|
+
|
|
36262
|
+
if ($truthy(($truthy($a = (stylesheet_src = doc.$attr("copycss"))['$==']("")) ? $a : stylesheet_src['$=='](true)))) {
|
|
36263
|
+
stylesheet_src = doc.$normalize_system_path(stylesheet)
|
|
36264
|
+
} else {
|
|
36265
|
+
stylesheet_src = doc.$normalize_system_path(stylesheet_src.$to_s())
|
|
36266
|
+
};
|
|
36267
|
+
stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36268
|
+
return outdir
|
|
36269
|
+
} else {
|
|
36270
|
+
return nil
|
|
36271
|
+
}; return nil; })());
|
|
36272
|
+
if ($truthy(($truthy($a = stylesheet_src['$!='](stylesheet_dest)) ? (stylesheet_data = doc.$read_asset(stylesheet_src, $hash2(["warn_on_failure", "label"], {"warn_on_failure": $$$('::', 'File')['$file?'](stylesheet_dest)['$!'](), "label": "stylesheet"}))) : $a))) {
|
|
36273
|
+
|
|
36274
|
+
if ($truthy(($truthy($a = (stylesheet_outdir = $$$('::', 'File').$dirname(stylesheet_dest))['$!='](stylesoutdir)) ? $$$('::', 'File')['$directory?'](stylesheet_outdir)['$!']() : $a))) {
|
|
36275
|
+
if ($truthy(mkdirs)) {
|
|
36276
|
+
$$($nesting, 'Helpers').$mkdir_p(stylesheet_outdir)
|
|
36277
|
+
} else {
|
|
36278
|
+
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesheet_outdir) + " (hint: set :mkdirs option)")
|
|
36279
|
+
}};
|
|
36280
|
+
$$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}));};};
|
|
36281
|
+
if ($truthy(copy_syntax_hl_stylesheet)) {
|
|
36282
|
+
syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
|
|
36283
|
+
return doc;
|
|
36284
|
+
} else {
|
|
36285
|
+
return output
|
|
36286
|
+
};
|
|
36287
|
+
}, $convert$1.$$arity = -2);
|
|
36183
36288
|
|
|
36184
|
-
|
|
36185
|
-
|
|
36186
|
-
};
|
|
36187
|
-
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
|
|
36289
|
+
Opal.def(self, '$convert_file', $convert_file$2 = function $$convert_file(filename, options) {
|
|
36290
|
+
var $$3, self = this;
|
|
36188
36291
|
|
|
36189
|
-
|
|
36190
36292
|
|
|
36191
|
-
|
|
36192
|
-
|
|
36293
|
+
|
|
36294
|
+
if (options == null) {
|
|
36295
|
+
options = $hash2([], {});
|
|
36193
36296
|
};
|
|
36194
|
-
return
|
|
36195
|
-
|
|
36196
|
-
|
|
36197
|
-
|
|
36198
|
-
|
|
36199
|
-
|
|
36297
|
+
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
|
|
36298
|
+
|
|
36299
|
+
|
|
36300
|
+
|
|
36301
|
+
if (file == null) {
|
|
36302
|
+
file = nil;
|
|
36303
|
+
};
|
|
36304
|
+
return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3));
|
|
36305
|
+
}, $convert_file$2.$$arity = -2);
|
|
36306
|
+
Opal.alias(self, "render", "convert");
|
|
36307
|
+
return Opal.alias(self, "render_file", "convert_file");
|
|
36308
|
+
})(Opal.get_singleton_class(self), $nesting)
|
|
36200
36309
|
})($nesting[0], $nesting)
|
|
36201
36310
|
};
|
|
36202
36311
|
|
|
@@ -36207,7 +36316,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
|
|
|
36207
36316
|
}
|
|
36208
36317
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy;
|
|
36209
36318
|
|
|
36210
|
-
Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '
|
|
36319
|
+
Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '$attr', '$[]', '$==', '$attr?', '$join', '$map', '$split', '$lstrip']);
|
|
36211
36320
|
return (function($base, $parent_nesting) {
|
|
36212
36321
|
var self = $module($base, 'Asciidoctor');
|
|
36213
36322
|
|
|
@@ -36261,25 +36370,29 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
|
|
|
36261
36370
|
Opal.def(self, '$docinfo?', $HighlightJsAdapter_docinfo$ques$4 = function(location) {
|
|
36262
36371
|
var self = this;
|
|
36263
36372
|
|
|
36264
|
-
return
|
|
36373
|
+
return true
|
|
36265
36374
|
}, $HighlightJsAdapter_docinfo$ques$4.$$arity = 1);
|
|
36266
36375
|
return (Opal.def(self, '$docinfo', $HighlightJsAdapter_docinfo$5 = function $$docinfo(location, doc, opts) {
|
|
36267
36376
|
var $$6, self = this, base_url = nil;
|
|
36268
36377
|
|
|
36269
36378
|
|
|
36270
36379
|
base_url = doc.$attr("highlightjsdir", "" + (opts['$[]']("cdn_base_url")) + "/highlight.js/" + ($$($nesting, 'HIGHLIGHT_JS_VERSION')));
|
|
36271
|
-
|
|
36272
|
-
return
|
|
36380
|
+
if (location['$==']("head")) {
|
|
36381
|
+
return "" + "<link rel=\"stylesheet\" href=\"" + (base_url) + "/styles/" + (doc.$attr("highlightjs-theme", "github")) + ".min.css\"" + (opts['$[]']("self_closing_tag_slash")) + ">"
|
|
36382
|
+
} else {
|
|
36383
|
+
return "" + "<script src=\"" + (base_url) + "/highlight.min.js\"></script>\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) {
|
|
36384
|
+
return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this;
|
|
36273
36385
|
|
|
36274
|
-
|
|
36275
36386
|
|
|
36276
|
-
|
|
36277
|
-
lang
|
|
36278
|
-
|
|
36279
|
-
|
|
36280
|
-
|
|
36281
|
-
|
|
36282
|
-
|
|
36387
|
+
|
|
36388
|
+
if (lang == null) {
|
|
36389
|
+
lang = nil;
|
|
36390
|
+
};
|
|
36391
|
+
return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
|
|
36392
|
+
} else {
|
|
36393
|
+
return ""
|
|
36394
|
+
}; return nil; })()) + "<script>\n" + "if (!hljs.initHighlighting.called) {\n" + " hljs.initHighlighting.called = true\n" + " ;[].slice.call(document.querySelectorAll('pre.highlight > code')).forEach(function (el) { hljs.highlightBlock(el) })\n" + "}\n" + "</script>"
|
|
36395
|
+
};
|
|
36283
36396
|
}, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
|
|
36284
36397
|
})($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
|
|
36285
36398
|
})($nesting[0], $nesting)
|
|
@@ -36292,7 +36405,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
36292
36405
|
}
|
|
36293
36406
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass;
|
|
36294
36407
|
|
|
36295
|
-
Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$join', '$content']);
|
|
36408
|
+
Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$delete', '$join', '$content']);
|
|
36296
36409
|
|
|
36297
36410
|
(function($base, $parent_nesting) {
|
|
36298
36411
|
var self = $module($base, 'Asciidoctor');
|
|
@@ -36526,7 +36639,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
36526
36639
|
|
|
36527
36640
|
self.$include($$($nesting, 'SyntaxHighlighter'));
|
|
36528
36641
|
return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) {
|
|
36529
|
-
var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil;
|
|
36642
|
+
var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil, $writer = nil;
|
|
36530
36643
|
|
|
36531
36644
|
|
|
36532
36645
|
class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) {
|
|
@@ -36536,13 +36649,16 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
36536
36649
|
}; return nil; })();
|
|
36537
36650
|
if ($truthy((transform = opts['$[]']("transform")))) {
|
|
36538
36651
|
|
|
36539
|
-
pre = $hash2(["class"], {"class": class_attr_val})
|
|
36540
|
-
code = (function() {if ($truthy(lang)) {
|
|
36652
|
+
transform['$[]']((pre = $hash2(["class"], {"class": class_attr_val})), (code = (function() {if ($truthy(lang)) {
|
|
36541
36653
|
return $hash2(["data-lang"], {"data-lang": lang})
|
|
36542
36654
|
} else {
|
|
36543
36655
|
return $hash2([], {})
|
|
36544
|
-
}; return nil; })();
|
|
36545
|
-
|
|
36656
|
+
}; return nil; })()));
|
|
36657
|
+
if ($truthy((lang = code.$delete("data-lang")))) {
|
|
36658
|
+
|
|
36659
|
+
$writer = ["data-lang", lang];
|
|
36660
|
+
$send(code, '[]=', Opal.to_a($writer));
|
|
36661
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
36546
36662
|
return "" + "<pre" + ($send(pre, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this;
|
|
36547
36663
|
|
|
36548
36664
|
|
|
@@ -36888,7 +37004,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
36888
37004
|
}
|
|
36889
37005
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $gvars = Opal.gvars;
|
|
36890
37006
|
|
|
36891
|
-
Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$
|
|
37007
|
+
Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$===', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$pop', '$split', '$nil_or_empty?', '$type', '$catalog', '$xreftext', '$target', '$reftext', '$map', '$chop', '$sub', '$match', '$private', '$upcase', '$to_s', '$handles?', '$send']);
|
|
36892
37008
|
return (function($base, $parent_nesting) {
|
|
36893
37009
|
var self = $module($base, 'Asciidoctor');
|
|
36894
37010
|
|
|
@@ -36899,19 +37015,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
36899
37015
|
|
|
36900
37016
|
var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$57, $Html5Converter_convert_inline_kbd$58, $Html5Converter_convert_inline_menu$59, $Html5Converter_convert_inline_quoted$60, $Html5Converter_read_svg_contents$61, $Html5Converter_append_boolean_attribute$63, $Html5Converter_append_link_constraint_attrs$64, $Html5Converter_encode_attribute_value$65, $Html5Converter_generate_manname_section$66, $Html5Converter_method_missing$67, $writer = nil;
|
|
36901
37017
|
|
|
36902
|
-
self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = nil;
|
|
37018
|
+
self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil;
|
|
36903
37019
|
|
|
36904
37020
|
self.$register_for("html5");
|
|
36905
37021
|
|
|
36906
37022
|
$writer = [["", ""]];
|
|
36907
37023
|
$send(Opal.const_set($nesting[0], 'QUOTE_TAGS', $hash2(["monospaced", "emphasis", "strong", "double", "single", "mark", "superscript", "subscript", "asciimath", "latexmath"], {"monospaced": ["<code>", "</code>", true], "emphasis": ["<em>", "</em>", true], "strong": ["<strong>", "</strong>", true], "double": ["“", "”"], "single": ["‘", "’"], "mark": ["<mark>", "</mark>", true], "superscript": ["<sup>", "</sup>", true], "subscript": ["<sub>", "</sub>", true], "asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})), 'default=', Opal.to_a($writer));
|
|
36908
37024
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
36909
|
-
Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a[
|
|
37025
|
+
Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a\b[^>]*|\/a)>/);
|
|
36910
37026
|
Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/);
|
|
36911
37027
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
36912
37028
|
|
|
36913
|
-
Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg\\
|
|
36914
|
-
Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg[^>]
|
|
37029
|
+
Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg[\\s>])"));
|
|
37030
|
+
Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg(?:\s[^>]*)?>/);
|
|
36915
37031
|
} else {
|
|
36916
37032
|
nil
|
|
36917
37033
|
};
|
|
@@ -37037,7 +37153,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37037
37153
|
}, $Html5Converter_convert$2.$$arity = -2);
|
|
37038
37154
|
|
|
37039
37155
|
Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) {
|
|
37040
|
-
var $a, $b, $c, $$4, $$5, self = this, br = nil, slash = nil, asset_uri_scheme = nil, cdn_base_url = nil, linkcss = nil, result = nil, lang_attribute = nil, authors = nil, icon_href = nil, icon_type = nil, icon_ext = nil, webfonts = nil, iconfont_stylesheet = nil, syntax_hl = nil, syntax_hl_docinfo_head_idx = nil, docinfo_content = nil,
|
|
37156
|
+
var $a, $b, $c, $$4, $$5, self = this, br = nil, slash = nil, asset_uri_scheme = nil, cdn_base_url = nil, linkcss = nil, max_width_attr = nil, result = nil, lang_attribute = nil, authors = nil, icon_href = nil, icon_type = nil, icon_ext = nil, webfonts = nil, iconfont_stylesheet = nil, syntax_hl = nil, syntax_hl_docinfo_head_idx = nil, docinfo_content = nil, id_attr = nil, sectioned = nil, classes = nil, details = nil, idx = nil, $writer = nil, eqnums_val = nil, eqnums_opt = nil;
|
|
37041
37157
|
|
|
37042
37158
|
|
|
37043
37159
|
br = "" + "<br" + ((slash = self.void_element_slash)) + ">";
|
|
@@ -37047,6 +37163,11 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37047
37163
|
};
|
|
37048
37164
|
cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs";
|
|
37049
37165
|
linkcss = node['$attr?']("linkcss");
|
|
37166
|
+
max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) {
|
|
37167
|
+
return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\""
|
|
37168
|
+
} else {
|
|
37169
|
+
return ""
|
|
37170
|
+
}; return nil; })();
|
|
37050
37171
|
result = ["<!DOCTYPE html>"];
|
|
37051
37172
|
lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) {
|
|
37052
37173
|
return ""
|
|
@@ -37108,7 +37229,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37108
37229
|
if ($truthy(linkcss)) {
|
|
37109
37230
|
result['$<<']("" + "<link rel=\"stylesheet\" href=\"" + (node.$normalize_web_path(node.$attr("stylesheet"), node.$attr("stylesdir", ""))) + "\"" + (slash) + ">")
|
|
37110
37231
|
} else {
|
|
37111
|
-
result['$<<']("" + "<style>\n" + (node.$
|
|
37232
|
+
result['$<<']("" + "<style>\n" + (node.$read_contents(node.$attr("stylesheet"), $hash2(["start", "warn_on_failure", "label"], {"start": node.$attr("stylesdir"), "warn_on_failure": true, "label": "stylesheet"}))) + "\n" + "</style>")
|
|
37112
37233
|
}};
|
|
37113
37234
|
if ($truthy(node['$attr?']("icons", "font"))) {
|
|
37114
37235
|
if ($truthy(node['$attr?']("iconfont-remote"))) {
|
|
@@ -37125,10 +37246,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37125
37246
|
result['$<<'](docinfo_content)
|
|
37126
37247
|
};
|
|
37127
37248
|
result['$<<']("</head>");
|
|
37128
|
-
|
|
37129
|
-
return
|
|
37249
|
+
id_attr = (function() {if ($truthy(node.$id())) {
|
|
37250
|
+
return "" + " id=\"" + (node.$id()) + "\""
|
|
37130
37251
|
} else {
|
|
37131
|
-
return
|
|
37252
|
+
return ""
|
|
37132
37253
|
}; return nil; })();
|
|
37133
37254
|
if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = (sectioned = node['$sections?']())) ? node['$attr?']("toc-class") : $c)) ? node['$attr?']("toc") : $b)) ? node['$attr?']("toc-placement", "auto") : $a))) {
|
|
37134
37255
|
classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))]
|
|
@@ -37137,10 +37258,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37137
37258
|
};
|
|
37138
37259
|
if ($truthy(node['$role?']())) {
|
|
37139
37260
|
classes['$<<'](node.$role())};
|
|
37140
|
-
|
|
37141
|
-
if ($truthy(node['$attr?']("max-width"))) {
|
|
37142
|
-
body_attrs['$<<']("" + "style=\"max-width: " + (node.$attr("max-width")) + ";\"")};
|
|
37143
|
-
result['$<<']("" + "<body " + (body_attrs.$join(" ")) + ">");
|
|
37261
|
+
result['$<<']("" + "<body" + (id_attr) + " class=\"" + (classes.$join(" ")) + "\">");
|
|
37144
37262
|
if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) {
|
|
37145
37263
|
} else {
|
|
37146
37264
|
result['$<<'](docinfo_content)
|
|
@@ -37148,7 +37266,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37148
37266
|
if ($truthy(node.$noheader())) {
|
|
37149
37267
|
} else {
|
|
37150
37268
|
|
|
37151
|
-
result['$<<']("<div id=\"header\">");
|
|
37269
|
+
result['$<<']("" + "<div id=\"header\"" + (max_width_attr) + ">");
|
|
37152
37270
|
if (node.$doctype()['$==']("manpage")) {
|
|
37153
37271
|
|
|
37154
37272
|
result['$<<']("" + "<h1>" + (node.$doctitle()) + " Manual Page</h1>");
|
|
@@ -37207,10 +37325,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37207
37325
|
};
|
|
37208
37326
|
result['$<<']("</div>");
|
|
37209
37327
|
};
|
|
37210
|
-
result['$<<']("" + "<div id=\"content\">\n" + (node.$content()) + "\n" + "</div>");
|
|
37328
|
+
result['$<<']("" + "<div id=\"content\"" + (max_width_attr) + ">\n" + (node.$content()) + "\n" + "</div>");
|
|
37211
37329
|
if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) {
|
|
37212
37330
|
|
|
37213
|
-
result['$<<']("" + "<div id=\"footnotes\">\n" + "<hr" + (slash) + ">");
|
|
37331
|
+
result['$<<']("" + "<div id=\"footnotes\"" + (max_width_attr) + ">\n" + "<hr" + (slash) + ">");
|
|
37214
37332
|
$send(node.$footnotes(), 'each', [], ($$5 = function(footnote){var self = $$5.$$s || this;
|
|
37215
37333
|
|
|
37216
37334
|
|
|
@@ -37223,7 +37341,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
37223
37341
|
if ($truthy(node.$nofooter())) {
|
|
37224
37342
|
} else {
|
|
37225
37343
|
|
|
37226
|
-
result['$<<']("<div id=\"footer\">");
|
|
37344
|
+
result['$<<']("" + "<div id=\"footer\"" + (max_width_attr) + ">");
|
|
37227
37345
|
result['$<<']("<div id=\"footer-text\">");
|
|
37228
37346
|
if ($truthy(node['$attr?']("revnumber"))) {
|
|
37229
37347
|
result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))};
|
|
@@ -38185,7 +38303,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38185
38303
|
}, $Html5Converter_convert_sidebar$38.$$arity = 1);
|
|
38186
38304
|
|
|
38187
38305
|
Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) {
|
|
38188
|
-
var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil;
|
|
38306
|
+
var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, frame = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil;
|
|
38189
38307
|
|
|
38190
38308
|
|
|
38191
38309
|
result = [];
|
|
@@ -38194,7 +38312,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38194
38312
|
} else {
|
|
38195
38313
|
return ""
|
|
38196
38314
|
}; return nil; })();
|
|
38197
|
-
|
|
38315
|
+
if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) {
|
|
38316
|
+
frame = "ends"};
|
|
38317
|
+
classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))];
|
|
38198
38318
|
if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) {
|
|
38199
38319
|
classes['$<<']("" + "stripes-" + (stripes))};
|
|
38200
38320
|
styles = [];
|
|
@@ -38670,7 +38790,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38670
38790
|
}, $Html5Converter_convert_video$48.$$arity = 1);
|
|
38671
38791
|
|
|
38672
38792
|
Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) {
|
|
38673
|
-
var $a, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil;
|
|
38793
|
+
var $a, $b, $c, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil, outer = nil;
|
|
38674
38794
|
|
|
38675
38795
|
return (function() {$case = node.$type();
|
|
38676
38796
|
if ("xref"['$===']($case)) {
|
|
@@ -38693,8 +38813,13 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38693
38813
|
} else {
|
|
38694
38814
|
|
|
38695
38815
|
refid = node.$attributes()['$[]']("refid");
|
|
38696
|
-
if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = (self.refs = ($truthy($
|
|
38697
|
-
|
|
38816
|
+
if ($truthy(($truthy($a = ($truthy($b = $$($nesting, 'AbstractNode')['$===']((ref = (self.refs = ($truthy($c = self.refs) ? $c : node.$document().$catalog()['$[]']("refs")))['$[]'](refid)))) ? (self.resolving_xref = ($truthy($c = self.resolving_xref) ? $c : (outer = true))) : $b)) ? outer : $a))) {
|
|
38817
|
+
|
|
38818
|
+
if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true)))['$!']())) {
|
|
38819
|
+
text = "" + "[" + (refid) + "]"
|
|
38820
|
+
} else if ($truthy(text['$include?']("<a"))) {
|
|
38821
|
+
text = text.$gsub($$($nesting, 'DropAnchorRx'), "")};
|
|
38822
|
+
self.resolving_xref = nil;
|
|
38698
38823
|
} else {
|
|
38699
38824
|
text = "" + "[" + (refid) + "]"
|
|
38700
38825
|
};
|
|
@@ -38921,17 +39046,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38921
39046
|
}, $Html5Converter_convert_inline_quoted$60.$$arity = 1);
|
|
38922
39047
|
|
|
38923
39048
|
Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) {
|
|
38924
|
-
var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil;
|
|
39049
|
+
var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil;
|
|
38925
39050
|
|
|
38926
39051
|
|
|
38927
|
-
if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG"}))))) {
|
|
39052
|
+
if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label", "warn_if_empty"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG", "warn_if_empty": true}))))) {
|
|
38928
39053
|
|
|
39054
|
+
if ($truthy(svg['$empty?']())) {
|
|
39055
|
+
return nil};
|
|
38929
39056
|
if ($truthy(svg['$start_with?']("<svg"))) {
|
|
38930
39057
|
} else {
|
|
38931
39058
|
svg = svg.$sub($$($nesting, 'SvgPreambleRx'), "")
|
|
38932
39059
|
};
|
|
38933
|
-
old_start_tag = (new_start_tag = nil);
|
|
38934
|
-
$send(["width", "height"], 'each', [], ($$62 = function(dim){var self = $$62.$$s || this,
|
|
39060
|
+
old_start_tag = (new_start_tag = (start_tag_match = nil));
|
|
39061
|
+
$send(["width", "height"], 'each', [], ($$62 = function(dim){var self = $$62.$$s || this, $a, $b;
|
|
38935
39062
|
|
|
38936
39063
|
|
|
38937
39064
|
|
|
@@ -38939,19 +39066,17 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38939
39066
|
dim = nil;
|
|
38940
39067
|
};
|
|
38941
39068
|
if ($truthy(node['$attr?'](dim))) {
|
|
38942
|
-
|
|
38943
|
-
if ($truthy(new_start_tag)) {
|
|
38944
|
-
} else {
|
|
38945
|
-
new_start_tag = (old_start_tag = svg.$match($$($nesting, 'SvgStartTagRx'))['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "")
|
|
38946
|
-
};
|
|
38947
|
-
if ($truthy((dim_val = node.$attr(dim))['$end_with?']("%"))) {
|
|
38948
|
-
} else {
|
|
38949
|
-
dim_val = $rb_plus(dim_val, "px")
|
|
38950
|
-
};
|
|
38951
|
-
return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (dim_val) + "\">");
|
|
38952
39069
|
} else {
|
|
38953
|
-
return nil
|
|
38954
|
-
};
|
|
39070
|
+
return nil;
|
|
39071
|
+
};
|
|
39072
|
+
if ($truthy(new_start_tag)) {
|
|
39073
|
+
} else {
|
|
39074
|
+
|
|
39075
|
+
if ((start_tag_match = ($truthy($a = start_tag_match) ? $a : ($truthy($b = svg.$match($$($nesting, 'SvgStartTagRx'))) ? $b : "no_match")))['$==']("no_match")) {
|
|
39076
|
+
return nil;};
|
|
39077
|
+
new_start_tag = (old_start_tag = start_tag_match['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "");
|
|
39078
|
+
};
|
|
39079
|
+
return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (node.$attr(dim)) + "\">");}, $$62.$$s = self, $$62.$$arity = 1, $$62));
|
|
38955
39080
|
if ($truthy(new_start_tag)) {
|
|
38956
39081
|
svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};};
|
|
38957
39082
|
return svg;
|
|
@@ -41218,8 +41343,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
41218
41343
|
$send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer));
|
|
41219
41344
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
41220
41345
|
Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0");
|
|
41221
|
-
Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.
|
|
41222
|
-
Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.
|
|
41346
|
+
Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.18.3");
|
|
41347
|
+
Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9");
|
|
41223
41348
|
Opal.const_set($nesting[0], 'DEFAULT_ATTRIBUTES', $hash2(["appendix-caption", "appendix-refsig", "caution-caption", "chapter-refsig", "example-caption", "figure-caption", "important-caption", "last-update-label", "note-caption", "part-refsig", "prewrap", "sectids", "section-refsig", "table-caption", "tip-caption", "toc-placement", "toc-title", "untitled-label", "version-label", "warning-caption"], {"appendix-caption": "Appendix", "appendix-refsig": "Appendix", "caution-caption": "Caution", "chapter-refsig": "Chapter", "example-caption": "Example", "figure-caption": "Figure", "important-caption": "Important", "last-update-label": "Last updated", "note-caption": "Note", "part-refsig": "Part", "prewrap": "", "sectids": "", "section-refsig": "Section", "table-caption": "Table", "tip-caption": "Tip", "toc-placement": "auto", "toc-title": "Table of Contents", "untitled-label": "Untitled", "version-label": "Version", "warning-caption": "Warning"}));
|
|
41224
41349
|
Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]);
|
|
41225
41350
|
Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"}));
|
|
@@ -41321,10 +41446,23 @@ var toHash = function (object) {
|
|
|
41321
41446
|
var fromHash = function (hash) {
|
|
41322
41447
|
var object = {}
|
|
41323
41448
|
if (hash) {
|
|
41324
|
-
var
|
|
41325
|
-
for (var
|
|
41326
|
-
var
|
|
41327
|
-
object[
|
|
41449
|
+
var stringMap = hash.$$smap
|
|
41450
|
+
for (var stringMapKey in stringMap) {
|
|
41451
|
+
var stringMapValue = stringMap[stringMapKey]
|
|
41452
|
+
object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue
|
|
41453
|
+
}
|
|
41454
|
+
var numericMap = hash.$$map
|
|
41455
|
+
if (numericMap) {
|
|
41456
|
+
var positional = []
|
|
41457
|
+
for (var numericMapKey in numericMap) {
|
|
41458
|
+
var entry = numericMap[numericMapKey]
|
|
41459
|
+
var numericMapValue = entry.value
|
|
41460
|
+
var index = entry.key - 1
|
|
41461
|
+
positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue
|
|
41462
|
+
}
|
|
41463
|
+
if (positional.length > 0) {
|
|
41464
|
+
object.$positional = positional
|
|
41465
|
+
}
|
|
41328
41466
|
}
|
|
41329
41467
|
}
|
|
41330
41468
|
return object
|
|
@@ -41630,9 +41768,34 @@ AbstractBlock.prototype.getTitle = function () {
|
|
|
41630
41768
|
* @memberof AbstractBlock
|
|
41631
41769
|
*/
|
|
41632
41770
|
AbstractBlock.prototype.setTitle = function (title) {
|
|
41771
|
+
title = typeof title === 'undefined' ? Opal.nil : title
|
|
41633
41772
|
return this['$title='](title)
|
|
41634
41773
|
}
|
|
41635
41774
|
|
|
41775
|
+
/**
|
|
41776
|
+
* Generate and assign caption to block if not already assigned.
|
|
41777
|
+
*
|
|
41778
|
+
* If the block has a title and a caption prefix is available for this block,
|
|
41779
|
+
* then build a caption from this information, assign it a number and store it
|
|
41780
|
+
* to the caption attribute on the block.
|
|
41781
|
+
*
|
|
41782
|
+
* If a caption has already been assigned to this block, do nothing.
|
|
41783
|
+
*
|
|
41784
|
+
* The parts of a complete caption are: <prefix> <number>. <title>
|
|
41785
|
+
* This partial caption represents the part the precedes the title.
|
|
41786
|
+
*
|
|
41787
|
+
* @param {string} value - the String caption to assign to this block or nil to use document attribute.
|
|
41788
|
+
* @param {string} captionContext - the String context to use when resolving caption-related attributes.
|
|
41789
|
+
* If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up.
|
|
41790
|
+
*
|
|
41791
|
+
* @memberof AbstractBlock
|
|
41792
|
+
*/
|
|
41793
|
+
AbstractBlock.prototype.assignCaption = function (value, captionContext) {
|
|
41794
|
+
value = typeof value === 'undefined' ? Opal.nil : value
|
|
41795
|
+
captionContext = typeof captionContext === 'undefined' ? null : captionContext
|
|
41796
|
+
this.$assign_caption(value, captionContext)
|
|
41797
|
+
}
|
|
41798
|
+
|
|
41636
41799
|
/**
|
|
41637
41800
|
* Convenience method that returns the interpreted title of the Block
|
|
41638
41801
|
* with the caption prepended.
|
|
@@ -41717,7 +41880,7 @@ AbstractBlock.prototype.getCaption = function () {
|
|
|
41717
41880
|
* @memberof AbstractBlock
|
|
41718
41881
|
*/
|
|
41719
41882
|
AbstractBlock.prototype.setCaption = function (caption) {
|
|
41720
|
-
this.caption = caption
|
|
41883
|
+
this.caption = typeof caption === 'undefined' ? Opal.nil : caption
|
|
41721
41884
|
}
|
|
41722
41885
|
|
|
41723
41886
|
/**
|
|
@@ -43138,7 +43301,7 @@ Callouts.prototype.getListIndex = function () {
|
|
|
43138
43301
|
* @memberof Callouts
|
|
43139
43302
|
*/
|
|
43140
43303
|
Callouts.prototype.getCurrentList = function () {
|
|
43141
|
-
|
|
43304
|
+
var currentList = this.$current_list()
|
|
43142
43305
|
if (currentList && currentList.length > 0) {
|
|
43143
43306
|
for (var i = 0; i < currentList.length; i++) {
|
|
43144
43307
|
if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) {
|
|
@@ -44900,7 +45063,7 @@ Cell.prototype.getColumnPercentageWidth = function () {
|
|
|
44900
45063
|
* @memberof Cell
|
|
44901
45064
|
*/
|
|
44902
45065
|
Cell.prototype.getInnerDocument = function () {
|
|
44903
|
-
|
|
45066
|
+
var innerDocument = this.inner_document
|
|
44904
45067
|
return innerDocument === Opal.nil ? undefined : innerDocument
|
|
44905
45068
|
}
|
|
44906
45069
|
|
|
@@ -46541,7 +46704,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
|
|
|
46541
46704
|
}
|
|
46542
46705
|
|
|
46543
46706
|
|
|
46544
|
-
var ASCIIDOCTOR_JS_VERSION = '2.2.
|
|
46707
|
+
var ASCIIDOCTOR_JS_VERSION = '2.2.1';
|
|
46545
46708
|
|
|
46546
46709
|
/**
|
|
46547
46710
|
* Get Asciidoctor.js version number.
|