@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
package/dist/node/asciidoctor.js
CHANGED
|
@@ -3136,7 +3136,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
|
|
|
3136
3136
|
Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
3137
3137
|
Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
|
|
3138
3138
|
Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
3139
|
-
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\]
|
|
3139
|
+
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
|
|
3140
3140
|
Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
3141
3141
|
Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
|
|
3142
3142
|
Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
@@ -3192,7 +3192,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
3192
3192
|
(function($base, $parent_nesting) {
|
|
3193
3193
|
var self = $module($base, 'Substitutors');
|
|
3194
3194
|
|
|
3195
|
-
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$
|
|
3195
|
+
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;
|
|
3196
3196
|
|
|
3197
3197
|
|
|
3198
3198
|
Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
|
|
@@ -3827,8 +3827,8 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
3827
3827
|
text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
|
|
3828
3828
|
} else {
|
|
3829
3829
|
|
|
3830
|
-
|
|
3831
|
-
|
|
3830
|
+
$case = prefix;
|
|
3831
|
+
if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
|
|
3832
3832
|
text = "";
|
|
3833
3833
|
$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
|
|
3834
3834
|
if (")"['$===']($case)) {
|
|
@@ -4136,7 +4136,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4136
4136
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
4137
4137
|
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))};
|
|
4138
4138
|
if ($truthy(($truthy($a = found_macroish) ? text['$include?']("tnote") : $a))) {
|
|
4139
|
-
text = $send(text, 'gsub', [$$($nesting, 'InlineFootnoteMacroRx')], ($$39 = function(){var self = $$39.$$s || this, $c, $d, $e, $$40, id = nil,
|
|
4139
|
+
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;
|
|
4140
4140
|
|
|
4141
4141
|
|
|
4142
4142
|
if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) {
|
|
@@ -4158,7 +4158,18 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4158
4158
|
text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
|
|
4159
4159
|
};
|
|
4160
4160
|
if ($truthy(id)) {
|
|
4161
|
-
if ($truthy(
|
|
4161
|
+
if ($truthy((footnote = $send(doc.$footnotes(), 'find', [], ($$40 = function(candidate){var self = $$40.$$s || this;
|
|
4162
|
+
|
|
4163
|
+
|
|
4164
|
+
|
|
4165
|
+
if (candidate == null) {
|
|
4166
|
+
candidate = nil;
|
|
4167
|
+
};
|
|
4168
|
+
return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) {
|
|
4169
|
+
|
|
4170
|
+
$c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c;
|
|
4171
|
+
$c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c;
|
|
4172
|
+
} else if ($truthy(text)) {
|
|
4162
4173
|
|
|
4163
4174
|
text = self.$restore_passthroughs(self.$normalize_text(text, true, true));
|
|
4164
4175
|
index = doc.$counter("footnote-number");
|
|
@@ -4166,21 +4177,8 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4166
4177
|
$c = ["ref", nil], (type = $c[0]), (target = $c[1]), $c;
|
|
4167
4178
|
} else {
|
|
4168
4179
|
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
if (candidate == null) {
|
|
4174
|
-
candidate = nil;
|
|
4175
|
-
};
|
|
4176
|
-
return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) {
|
|
4177
|
-
$c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c
|
|
4178
|
-
} else {
|
|
4179
|
-
|
|
4180
|
-
self.$logger().$warn("" + "invalid footnote reference: " + (id));
|
|
4181
|
-
$c = [nil, id], (index = $c[0]), (text = $c[1]), $c;
|
|
4182
|
-
};
|
|
4183
|
-
$c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c;
|
|
4180
|
+
self.$logger().$warn("" + "invalid footnote reference: " + (id));
|
|
4181
|
+
$c = ["xref", id, id, nil], (type = $c[0]), (target = $c[1]), (text = $c[2]), (id = $c[3]), $c;
|
|
4184
4182
|
}
|
|
4185
4183
|
} else if ($truthy(text)) {
|
|
4186
4184
|
|
|
@@ -4289,7 +4287,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4289
4287
|
if ($truthy($rb_lt((start_line_number = self.$attr("start", 1).$to_i()), 1))) {
|
|
4290
4288
|
start_line_number = 1}};
|
|
4291
4289
|
if ($truthy(self['$attr?']("highlight"))) {
|
|
4292
|
-
highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"))};
|
|
4290
|
+
highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"), start_line_number)};
|
|
4293
4291
|
$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;
|
|
4294
4292
|
if ($truthy(self.passthroughs['$empty?']())) {
|
|
4295
4293
|
} else {
|
|
@@ -4303,10 +4301,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4303
4301
|
};
|
|
4304
4302
|
}, $Substitutors_highlight_source$47.$$arity = 2);
|
|
4305
4303
|
|
|
4306
|
-
Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec) {
|
|
4307
|
-
var $$49, self = this, lines = nil;
|
|
4304
|
+
Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec, start) {
|
|
4305
|
+
var $$49, $$50, self = this, lines = nil, shift = nil;
|
|
4308
4306
|
|
|
4309
4307
|
|
|
4308
|
+
|
|
4309
|
+
if (start == null) {
|
|
4310
|
+
start = nil;
|
|
4311
|
+
};
|
|
4310
4312
|
lines = [];
|
|
4311
4313
|
if ($truthy(spec['$include?'](" "))) {
|
|
4312
4314
|
spec = spec.$delete(" ")};
|
|
@@ -4353,11 +4355,26 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4353
4355
|
} else {
|
|
4354
4356
|
return nil
|
|
4355
4357
|
};}, $$49.$$s = self, $$49.$$arity = 1, $$49));
|
|
4358
|
+
if ((shift = (function() {if ($truthy(start)) {
|
|
4359
|
+
return $rb_minus(start, 1)
|
|
4360
|
+
} else {
|
|
4361
|
+
return 0
|
|
4362
|
+
}; return nil; })())['$=='](0)) {
|
|
4363
|
+
} else {
|
|
4364
|
+
lines = $send(lines, 'map', [], ($$50 = function(it){var self = $$50.$$s || this;
|
|
4365
|
+
|
|
4366
|
+
|
|
4367
|
+
|
|
4368
|
+
if (it == null) {
|
|
4369
|
+
it = nil;
|
|
4370
|
+
};
|
|
4371
|
+
return $rb_minus(it, shift);}, $$50.$$s = self, $$50.$$arity = 1, $$50))
|
|
4372
|
+
};
|
|
4356
4373
|
return lines.$sort();
|
|
4357
|
-
}, $Substitutors_resolve_lines_to_highlight$48.$$arity =
|
|
4374
|
+
}, $Substitutors_resolve_lines_to_highlight$48.$$arity = -3);
|
|
4358
4375
|
|
|
4359
|
-
Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$
|
|
4360
|
-
var $a, $b, $$
|
|
4376
|
+
Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$51 = function $$extract_passthroughs(text) {
|
|
4377
|
+
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;
|
|
4361
4378
|
if (self.document == null) self.document = nil;
|
|
4362
4379
|
if (self.passthroughs == null) self.passthroughs = nil;
|
|
4363
4380
|
|
|
@@ -4365,7 +4382,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4365
4382
|
compat_mode = self.document.$compat_mode();
|
|
4366
4383
|
passthrus = self.passthroughs;
|
|
4367
4384
|
if ($truthy(($truthy($a = ($truthy($b = text['$include?']("++")) ? $b : text['$include?']("$$"))) ? $a : text['$include?']("ss:")))) {
|
|
4368
|
-
text = $send(text, 'gsub', [$$($nesting, 'InlinePassMacroRx')], ($$
|
|
4385
|
+
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;
|
|
4369
4386
|
|
|
4370
4387
|
|
|
4371
4388
|
if ($truthy((boundary = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4))))) {
|
|
@@ -4430,10 +4447,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4430
4447
|
$writer[$rb_minus($writer["length"], 1)];
|
|
4431
4448
|
};
|
|
4432
4449
|
};
|
|
4433
|
-
return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$
|
|
4450
|
+
return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$52.$$s = self, $$52.$$arity = 0, $$52))};
|
|
4434
4451
|
$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;
|
|
4435
4452
|
if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) {
|
|
4436
|
-
text = $send(text, 'gsub', [pass_inline_rx], ($$
|
|
4453
|
+
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;
|
|
4437
4454
|
|
|
4438
4455
|
|
|
4439
4456
|
preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
|
|
@@ -4489,9 +4506,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4489
4506
|
$send(passthrus, '[]=', Opal.to_a($writer));
|
|
4490
4507
|
$writer[$rb_minus($writer["length"], 1)];
|
|
4491
4508
|
};
|
|
4492
|
-
return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$
|
|
4509
|
+
return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
|
|
4493
4510
|
if ($truthy(($truthy($a = text['$include?'](":")) ? ($truthy($b = text['$include?']("stem:")) ? $b : text['$include?']("math:")) : $a))) {
|
|
4494
|
-
text = $send(text, 'gsub', [$$($nesting, 'InlineStemMacroRx')], ($$
|
|
4511
|
+
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;
|
|
4495
4512
|
if (self.document == null) self.document = nil;
|
|
4496
4513
|
|
|
4497
4514
|
|
|
@@ -4518,17 +4535,17 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4518
4535
|
$writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type"], {"text": content, "subs": subs, "type": type})];
|
|
4519
4536
|
$send(passthrus, '[]=', Opal.to_a($writer));
|
|
4520
4537
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
4521
|
-
return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$
|
|
4538
|
+
return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$54.$$s = self, $$54.$$arity = 0, $$54))};
|
|
4522
4539
|
return text;
|
|
4523
|
-
}, $Substitutors_extract_passthroughs$
|
|
4540
|
+
}, $Substitutors_extract_passthroughs$51.$$arity = 1);
|
|
4524
4541
|
|
|
4525
|
-
Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$
|
|
4526
|
-
var $$
|
|
4542
|
+
Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$55 = function $$restore_passthroughs(text) {
|
|
4543
|
+
var $$56, self = this, passthrus = nil;
|
|
4527
4544
|
if (self.passthroughs == null) self.passthroughs = nil;
|
|
4528
4545
|
|
|
4529
4546
|
|
|
4530
4547
|
passthrus = self.passthroughs;
|
|
4531
|
-
return $send(text, 'gsub', [$$($nesting, 'PassSlotRx')], ($$
|
|
4548
|
+
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;
|
|
4532
4549
|
|
|
4533
4550
|
if ($truthy((pass = passthrus['$[]']((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$to_i())))) {
|
|
4534
4551
|
|
|
@@ -4547,11 +4564,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4547
4564
|
|
|
4548
4565
|
self.$logger().$error("" + "unresolved passthrough detected: " + (text));
|
|
4549
4566
|
return "??pass??";
|
|
4550
|
-
}}, $$
|
|
4551
|
-
}, $Substitutors_restore_passthroughs$
|
|
4567
|
+
}}, $$56.$$s = self, $$56.$$arity = 0, $$56));
|
|
4568
|
+
}, $Substitutors_restore_passthroughs$55.$$arity = 1);
|
|
4552
4569
|
|
|
4553
|
-
Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$
|
|
4554
|
-
var $$
|
|
4570
|
+
Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$57 = function $$resolve_subs(subs, type, defaults, subject) {
|
|
4571
|
+
var $$58, self = this, candidates = nil, modifiers_present = nil, resolved = nil, invalid = nil;
|
|
4555
4572
|
|
|
4556
4573
|
|
|
4557
4574
|
|
|
@@ -4572,7 +4589,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4572
4589
|
if ($truthy(subs['$include?'](" "))) {
|
|
4573
4590
|
subs = subs.$delete(" ")};
|
|
4574
4591
|
modifiers_present = $$($nesting, 'SubModifierSniffRx')['$match?'](subs);
|
|
4575
|
-
$send(subs.$split(","), 'each', [], ($$
|
|
4592
|
+
$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;
|
|
4576
4593
|
|
|
4577
4594
|
|
|
4578
4595
|
|
|
@@ -4626,7 +4643,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4626
4643
|
|
|
4627
4644
|
candidates = ($truthy($a = candidates) ? $a : []);
|
|
4628
4645
|
return (candidates = $rb_plus(candidates, resolved_keys));
|
|
4629
|
-
};}, $$
|
|
4646
|
+
};}, $$58.$$s = self, $$58.$$arity = 1, $$58));
|
|
4630
4647
|
if ($truthy(candidates)) {
|
|
4631
4648
|
} else {
|
|
4632
4649
|
return nil
|
|
@@ -4647,22 +4664,22 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4647
4664
|
}; return nil; })()) + (subject) + ": " + (invalid.$join(", ")));
|
|
4648
4665
|
};
|
|
4649
4666
|
return resolved;
|
|
4650
|
-
}, $Substitutors_resolve_subs$
|
|
4667
|
+
}, $Substitutors_resolve_subs$57.$$arity = -2);
|
|
4651
4668
|
|
|
4652
|
-
Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$
|
|
4669
|
+
Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$59 = function $$resolve_block_subs(subs, defaults, subject) {
|
|
4653
4670
|
var self = this;
|
|
4654
4671
|
|
|
4655
4672
|
return self.$resolve_subs(subs, "block", defaults, subject)
|
|
4656
|
-
}, $Substitutors_resolve_block_subs$
|
|
4673
|
+
}, $Substitutors_resolve_block_subs$59.$$arity = 3);
|
|
4657
4674
|
|
|
4658
|
-
Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$
|
|
4675
|
+
Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$60 = function $$resolve_pass_subs(subs) {
|
|
4659
4676
|
var self = this;
|
|
4660
4677
|
|
|
4661
4678
|
return self.$resolve_subs(subs, "inline", nil, "passthrough macro")
|
|
4662
|
-
}, $Substitutors_resolve_pass_subs$
|
|
4679
|
+
}, $Substitutors_resolve_pass_subs$60.$$arity = 1);
|
|
4663
4680
|
|
|
4664
|
-
Opal.def(self, '$expand_subs', $Substitutors_expand_subs$
|
|
4665
|
-
var $a, $$
|
|
4681
|
+
Opal.def(self, '$expand_subs', $Substitutors_expand_subs$61 = function $$expand_subs(subs) {
|
|
4682
|
+
var $a, $$62, self = this, expanded_subs = nil;
|
|
4666
4683
|
|
|
4667
4684
|
if ($truthy($$$('::', 'Symbol')['$==='](subs))) {
|
|
4668
4685
|
if (subs['$==']("none")) {
|
|
@@ -4673,7 +4690,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4673
4690
|
} else {
|
|
4674
4691
|
|
|
4675
4692
|
expanded_subs = [];
|
|
4676
|
-
$send(subs, 'each', [], ($$
|
|
4693
|
+
$send(subs, 'each', [], ($$62 = function(key){var self = $$62.$$s || this, sub_group = nil;
|
|
4677
4694
|
|
|
4678
4695
|
|
|
4679
4696
|
|
|
@@ -4686,16 +4703,16 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4686
4703
|
return (expanded_subs = $rb_plus(expanded_subs, sub_group))
|
|
4687
4704
|
} else {
|
|
4688
4705
|
return expanded_subs['$<<'](key)
|
|
4689
|
-
};}, $$
|
|
4706
|
+
};}, $$62.$$s = self, $$62.$$arity = 1, $$62));
|
|
4690
4707
|
if ($truthy(expanded_subs['$empty?']())) {
|
|
4691
4708
|
return nil
|
|
4692
4709
|
} else {
|
|
4693
4710
|
return expanded_subs
|
|
4694
4711
|
};
|
|
4695
4712
|
}
|
|
4696
|
-
}, $Substitutors_expand_subs$
|
|
4713
|
+
}, $Substitutors_expand_subs$61.$$arity = 1);
|
|
4697
4714
|
|
|
4698
|
-
Opal.def(self, '$commit_subs', $Substitutors_commit_subs$
|
|
4715
|
+
Opal.def(self, '$commit_subs', $Substitutors_commit_subs$63 = function $$commit_subs() {
|
|
4699
4716
|
var $a, $b, $c, $d, self = this, default_subs = nil, $case = nil, custom_subs = nil, syntax_hl = nil, idx = nil, $writer = nil;
|
|
4700
4717
|
if (self.default_subs == null) self.default_subs = nil;
|
|
4701
4718
|
if (self.content_model == null) self.content_model = nil;
|
|
@@ -4733,9 +4750,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4733
4750
|
$send(self.subs, '[]=', Opal.to_a($writer));
|
|
4734
4751
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
4735
4752
|
return nil;
|
|
4736
|
-
}, $Substitutors_commit_subs$
|
|
4753
|
+
}, $Substitutors_commit_subs$63.$$arity = 0);
|
|
4737
4754
|
|
|
4738
|
-
Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$
|
|
4755
|
+
Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$64 = function $$parse_attributes(attrlist, posattrs, opts) {
|
|
4739
4756
|
var $a, self = this, block = nil, into = nil;
|
|
4740
4757
|
if (self.document == null) self.document = nil;
|
|
4741
4758
|
|
|
@@ -4765,10 +4782,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4765
4782
|
} else {
|
|
4766
4783
|
return $$($nesting, 'AttributeList').$new(attrlist, block).$parse(posattrs)
|
|
4767
4784
|
};
|
|
4768
|
-
}, $Substitutors_parse_attributes$
|
|
4785
|
+
}, $Substitutors_parse_attributes$64.$$arity = -2);
|
|
4769
4786
|
self.$private();
|
|
4770
4787
|
|
|
4771
|
-
Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$
|
|
4788
|
+
Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$65 = function $$extract_attributes_from_text(text, default_text) {
|
|
4772
4789
|
var self = this, attrlist = nil, resolved_text = nil, attrs = nil;
|
|
4773
4790
|
|
|
4774
4791
|
|
|
@@ -4791,10 +4808,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4791
4808
|
} else {
|
|
4792
4809
|
return [default_text, attrs]
|
|
4793
4810
|
};
|
|
4794
|
-
}, $Substitutors_extract_attributes_from_text$
|
|
4811
|
+
}, $Substitutors_extract_attributes_from_text$65.$$arity = -2);
|
|
4795
4812
|
|
|
4796
|
-
Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$
|
|
4797
|
-
var $$
|
|
4813
|
+
Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$66 = function $$extract_callouts(source) {
|
|
4814
|
+
var $$67, self = this, callout_marks = nil, autonum = nil, lineno = nil, last_lineno = nil, callout_rx = nil;
|
|
4798
4815
|
|
|
4799
4816
|
|
|
4800
4817
|
callout_marks = $hash2([], {});
|
|
@@ -4805,7 +4822,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4805
4822
|
} else {
|
|
4806
4823
|
return $$($nesting, 'CalloutExtractRx')
|
|
4807
4824
|
}; return nil; })();
|
|
4808
|
-
source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$
|
|
4825
|
+
source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$67 = function(line){var self = $$67.$$s || this, $$68;
|
|
4809
4826
|
|
|
4810
4827
|
|
|
4811
4828
|
|
|
@@ -4813,7 +4830,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4813
4830
|
line = nil;
|
|
4814
4831
|
};
|
|
4815
4832
|
lineno = $rb_plus(lineno, 1);
|
|
4816
|
-
return $send(line, 'gsub', [callout_rx], ($$
|
|
4833
|
+
return $send(line, 'gsub', [callout_rx], ($$68 = function(){var self = $$68.$$s || this, $a, $b, $writer = nil;
|
|
4817
4834
|
|
|
4818
4835
|
if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) {
|
|
4819
4836
|
return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "")
|
|
@@ -4830,7 +4847,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4830
4847
|
}; return nil; })()]);
|
|
4831
4848
|
last_lineno = lineno;
|
|
4832
4849
|
return "";
|
|
4833
|
-
}}, $$
|
|
4850
|
+
}}, $$68.$$s = self, $$68.$$arity = 0, $$68));}, $$67.$$s = self, $$67.$$arity = 1, $$67)).$join($$($nesting, 'LF'));
|
|
4834
4851
|
if ($truthy(last_lineno)) {
|
|
4835
4852
|
if (last_lineno['$=='](lineno)) {
|
|
4836
4853
|
source = "" + (source) + ($$($nesting, 'LF'))}
|
|
@@ -4838,10 +4855,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4838
4855
|
callout_marks = nil
|
|
4839
4856
|
};
|
|
4840
4857
|
return [source, callout_marks];
|
|
4841
|
-
}, $Substitutors_extract_callouts$
|
|
4858
|
+
}, $Substitutors_extract_callouts$66.$$arity = 1);
|
|
4842
4859
|
|
|
4843
|
-
Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$
|
|
4844
|
-
var $$
|
|
4860
|
+
Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$69 = function $$restore_callouts(source, callout_marks, source_offset) {
|
|
4861
|
+
var $$70, self = this, preamble = nil, lineno = nil;
|
|
4845
4862
|
|
|
4846
4863
|
|
|
4847
4864
|
|
|
@@ -4856,7 +4873,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4856
4873
|
preamble = ""
|
|
4857
4874
|
};
|
|
4858
4875
|
lineno = 0;
|
|
4859
|
-
return $rb_plus(preamble, $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$
|
|
4876
|
+
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;
|
|
4860
4877
|
if (self.document == null) self.document = nil;
|
|
4861
4878
|
|
|
4862
4879
|
|
|
@@ -4870,7 +4887,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4870
4887
|
$b = conums['$[]'](0), $a = Opal.to_ary($b), (guard = ($a[0] == null ? nil : $a[0])), (numeral = ($a[1] == null ? nil : $a[1])), $b;
|
|
4871
4888
|
return "" + (line) + ($$($nesting, 'Inline').$new(self, "callout", numeral, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard})})).$convert());
|
|
4872
4889
|
} else {
|
|
4873
|
-
return "" + (line) + ($send(conums, 'map', [], ($$
|
|
4890
|
+
return "" + (line) + ($send(conums, 'map', [], ($$71 = function(guard_it, numeral_it){var self = $$71.$$s || this;
|
|
4874
4891
|
if (self.document == null) self.document = nil;
|
|
4875
4892
|
|
|
4876
4893
|
|
|
@@ -4882,14 +4899,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4882
4899
|
if (numeral_it == null) {
|
|
4883
4900
|
numeral_it = nil;
|
|
4884
4901
|
};
|
|
4885
|
-
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();}, $$
|
|
4902
|
+
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(" "))
|
|
4886
4903
|
}
|
|
4887
4904
|
} else {
|
|
4888
4905
|
return line
|
|
4889
|
-
};}, $$
|
|
4890
|
-
}, $Substitutors_restore_callouts$
|
|
4906
|
+
};}, $$70.$$s = self, $$70.$$arity = 1, $$70)).$join($$($nesting, 'LF')));
|
|
4907
|
+
}, $Substitutors_restore_callouts$69.$$arity = -3);
|
|
4891
4908
|
|
|
4892
|
-
Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$
|
|
4909
|
+
Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$72 = function $$extract_inner_passthrough(text, pre) {
|
|
4893
4910
|
var $a, $b, self = this, $writer = nil, passthru_key = nil;
|
|
4894
4911
|
if (self.passthroughs == null) self.passthroughs = nil;
|
|
4895
4912
|
|
|
@@ -4907,9 +4924,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4907
4924
|
} else {
|
|
4908
4925
|
return "" + (pre) + "`" + (text) + "`"
|
|
4909
4926
|
}
|
|
4910
|
-
}, $Substitutors_extract_inner_passthrough$
|
|
4927
|
+
}, $Substitutors_extract_inner_passthrough$72.$$arity = 2);
|
|
4911
4928
|
|
|
4912
|
-
Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$
|
|
4929
|
+
Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
|
|
4913
4930
|
var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
|
|
4914
4931
|
|
|
4915
4932
|
|
|
@@ -4940,9 +4957,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4940
4957
|
type = "unquoted"};};
|
|
4941
4958
|
return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
|
|
4942
4959
|
};
|
|
4943
|
-
}, $Substitutors_convert_quoted_text$
|
|
4960
|
+
}, $Substitutors_convert_quoted_text$73.$$arity = 3);
|
|
4944
4961
|
|
|
4945
|
-
Opal.def(self, '$do_replacement', $Substitutors_do_replacement$
|
|
4962
|
+
Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
|
|
4946
4963
|
var self = this, captured = nil, $case = nil;
|
|
4947
4964
|
|
|
4948
4965
|
if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
|
|
@@ -4953,13 +4970,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
4953
4970
|
else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
|
|
4954
4971
|
else {return $rb_plus(m['$[]'](1), replacement)}})()
|
|
4955
4972
|
}
|
|
4956
|
-
}, $Substitutors_do_replacement$
|
|
4973
|
+
}, $Substitutors_do_replacement$74.$$arity = 3);
|
|
4957
4974
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
4958
4975
|
} else {
|
|
4959
4976
|
nil
|
|
4960
4977
|
};
|
|
4961
4978
|
|
|
4962
|
-
Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$
|
|
4979
|
+
Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
|
|
4963
4980
|
var $a, $b, self = this, segments = nil, id = nil, more_roles = nil, roles = nil, attrs = nil, $writer = nil;
|
|
4964
4981
|
|
|
4965
4982
|
|
|
@@ -5003,9 +5020,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
5003
5020
|
} else {
|
|
5004
5021
|
return $hash2(["role"], {"role": str})
|
|
5005
5022
|
};
|
|
5006
|
-
}, $Substitutors_parse_quoted_text_attributes$
|
|
5023
|
+
}, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
|
|
5007
5024
|
|
|
5008
|
-
Opal.def(self, '$normalize_text', $Substitutors_normalize_text$
|
|
5025
|
+
Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
|
|
5009
5026
|
var $a, self = this;
|
|
5010
5027
|
|
|
5011
5028
|
|
|
@@ -5026,10 +5043,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
5026
5043
|
text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
|
|
5027
5044
|
};
|
|
5028
5045
|
return text;
|
|
5029
|
-
}, $Substitutors_normalize_text$
|
|
5046
|
+
}, $Substitutors_normalize_text$76.$$arity = -2);
|
|
5030
5047
|
|
|
5031
|
-
Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$
|
|
5032
|
-
var $$
|
|
5048
|
+
Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
|
|
5049
|
+
var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
|
|
5033
5050
|
|
|
5034
5051
|
if ($truthy(str['$empty?']())) {
|
|
5035
5052
|
return []
|
|
@@ -5038,7 +5055,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
5038
5055
|
values = [];
|
|
5039
5056
|
accum = "";
|
|
5040
5057
|
quote_open = nil;
|
|
5041
|
-
$send(str, 'each_char', [], ($$
|
|
5058
|
+
$send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
|
|
5042
5059
|
|
|
5043
5060
|
|
|
5044
5061
|
|
|
@@ -5054,19 +5071,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
5054
5071
|
return (accum = "");
|
|
5055
5072
|
}}
|
|
5056
5073
|
else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
|
|
5057
|
-
else {return (accum = $rb_plus(accum, c))}})();}, $$
|
|
5074
|
+
else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
|
|
5058
5075
|
return values['$<<'](accum.$strip());
|
|
5059
5076
|
} else {
|
|
5060
|
-
return $send(str.$split(","), 'map', [], ($$
|
|
5077
|
+
return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
|
|
5061
5078
|
|
|
5062
5079
|
|
|
5063
5080
|
|
|
5064
5081
|
if (it == null) {
|
|
5065
5082
|
it = nil;
|
|
5066
5083
|
};
|
|
5067
|
-
return it.$strip();}, $$
|
|
5084
|
+
return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
|
|
5068
5085
|
}
|
|
5069
|
-
}, $Substitutors_split_simple_csv$
|
|
5086
|
+
}, $Substitutors_split_simple_csv$77.$$arity = 1);
|
|
5070
5087
|
})($nesting[0], $nesting)
|
|
5071
5088
|
})($nesting[0], $nesting)
|
|
5072
5089
|
};
|
|
@@ -5080,7 +5097,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
|
|
|
5080
5097
|
|
|
5081
5098
|
var $nesting = [self].concat($parent_nesting);
|
|
5082
5099
|
|
|
5083
|
-
Opal.const_set($nesting[0], 'VERSION', "2.0.
|
|
5100
|
+
Opal.const_set($nesting[0], 'VERSION', "2.0.12")
|
|
5084
5101
|
})($nesting[0], $nesting)
|
|
5085
5102
|
};
|
|
5086
5103
|
|
|
@@ -5094,7 +5111,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5094
5111
|
}
|
|
5095
5112
|
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;
|
|
5096
5113
|
|
|
5097
|
-
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?', '
|
|
5114
|
+
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']);
|
|
5098
5115
|
return (function($base, $parent_nesting) {
|
|
5099
5116
|
var self = $module($base, 'Asciidoctor');
|
|
5100
5117
|
|
|
@@ -5103,7 +5120,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5103
5120
|
(function($base, $super, $parent_nesting) {
|
|
5104
5121
|
var self = $klass($base, $super, 'AbstractNode');
|
|
5105
5122
|
|
|
5106
|
-
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, $
|
|
5123
|
+
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;
|
|
5107
5124
|
|
|
5108
5125
|
self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil;
|
|
5109
5126
|
|
|
@@ -5340,7 +5357,21 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5340
5357
|
}
|
|
5341
5358
|
}, $AbstractNode_has_role$ques$19.$$arity = 1);
|
|
5342
5359
|
|
|
5343
|
-
Opal.def(self, '$
|
|
5360
|
+
Opal.def(self, '$role=', $AbstractNode_role$eq$20 = function(names) {
|
|
5361
|
+
var self = this, $writer = nil;
|
|
5362
|
+
|
|
5363
|
+
|
|
5364
|
+
$writer = ["role", (function() {if ($truthy($$$('::', 'Array')['$==='](names))) {
|
|
5365
|
+
|
|
5366
|
+
return names.$join(" ");
|
|
5367
|
+
} else {
|
|
5368
|
+
return names
|
|
5369
|
+
}; return nil; })()];
|
|
5370
|
+
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
5371
|
+
return $writer[$rb_minus($writer["length"], 1)];
|
|
5372
|
+
}, $AbstractNode_role$eq$20.$$arity = 1);
|
|
5373
|
+
|
|
5374
|
+
Opal.def(self, '$add_role', $AbstractNode_add_role$21 = function $$add_role(name) {
|
|
5344
5375
|
var self = this, val = nil, $writer = nil;
|
|
5345
5376
|
|
|
5346
5377
|
if ($truthy((val = self.attributes['$[]']("role")))) {
|
|
@@ -5362,9 +5393,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5362
5393
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
5363
5394
|
return true;
|
|
5364
5395
|
}
|
|
5365
|
-
}, $AbstractNode_add_role$
|
|
5396
|
+
}, $AbstractNode_add_role$21.$$arity = 1);
|
|
5366
5397
|
|
|
5367
|
-
Opal.def(self, '$remove_role', $AbstractNode_remove_role$
|
|
5398
|
+
Opal.def(self, '$remove_role', $AbstractNode_remove_role$22 = function $$remove_role(name) {
|
|
5368
5399
|
var $a, self = this, val = nil, $writer = nil;
|
|
5369
5400
|
|
|
5370
5401
|
if ($truthy(($truthy($a = (val = self.attributes['$[]']("role"))) ? (val = val.$split()).$delete(name) : $a))) {
|
|
@@ -5381,9 +5412,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5381
5412
|
} else {
|
|
5382
5413
|
return false
|
|
5383
5414
|
}
|
|
5384
|
-
}, $AbstractNode_remove_role$
|
|
5415
|
+
}, $AbstractNode_remove_role$22.$$arity = 1);
|
|
5385
5416
|
|
|
5386
|
-
Opal.def(self, '$reftext', $AbstractNode_reftext$
|
|
5417
|
+
Opal.def(self, '$reftext', $AbstractNode_reftext$23 = function $$reftext() {
|
|
5387
5418
|
var self = this, val = nil;
|
|
5388
5419
|
|
|
5389
5420
|
if ($truthy((val = self.attributes['$[]']("reftext")))) {
|
|
@@ -5392,15 +5423,15 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5392
5423
|
} else {
|
|
5393
5424
|
return nil
|
|
5394
5425
|
}
|
|
5395
|
-
}, $AbstractNode_reftext$
|
|
5426
|
+
}, $AbstractNode_reftext$23.$$arity = 0);
|
|
5396
5427
|
|
|
5397
|
-
Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$
|
|
5428
|
+
Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$24 = function() {
|
|
5398
5429
|
var self = this;
|
|
5399
5430
|
|
|
5400
5431
|
return self.attributes['$key?']("reftext")
|
|
5401
|
-
}, $AbstractNode_reftext$ques$
|
|
5432
|
+
}, $AbstractNode_reftext$ques$24.$$arity = 0);
|
|
5402
5433
|
|
|
5403
|
-
Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$
|
|
5434
|
+
Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$25 = function $$icon_uri(name) {
|
|
5404
5435
|
var self = this, icon = nil;
|
|
5405
5436
|
|
|
5406
5437
|
|
|
@@ -5415,9 +5446,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5415
5446
|
icon = "" + (name) + "." + (self.document.$attr("icontype", "png"))
|
|
5416
5447
|
};
|
|
5417
5448
|
return self.$image_uri(icon, "iconsdir");
|
|
5418
|
-
}, $AbstractNode_icon_uri$
|
|
5449
|
+
}, $AbstractNode_icon_uri$25.$$arity = 1);
|
|
5419
5450
|
|
|
5420
|
-
Opal.def(self, '$image_uri', $AbstractNode_image_uri$
|
|
5451
|
+
Opal.def(self, '$image_uri', $AbstractNode_image_uri$26 = function $$image_uri(target_image, asset_dir_key) {
|
|
5421
5452
|
var $a, $b, $c, $d, self = this, doc = nil, images_base = nil;
|
|
5422
5453
|
|
|
5423
5454
|
|
|
@@ -5444,9 +5475,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5444
5475
|
return nil
|
|
5445
5476
|
}; return nil; })())
|
|
5446
5477
|
};
|
|
5447
|
-
}, $AbstractNode_image_uri$
|
|
5478
|
+
}, $AbstractNode_image_uri$26.$$arity = -2);
|
|
5448
5479
|
|
|
5449
|
-
Opal.def(self, '$media_uri', $AbstractNode_media_uri$
|
|
5480
|
+
Opal.def(self, '$media_uri', $AbstractNode_media_uri$27 = function $$media_uri(target, asset_dir_key) {
|
|
5450
5481
|
var self = this;
|
|
5451
5482
|
|
|
5452
5483
|
|
|
@@ -5459,9 +5490,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5459
5490
|
} else {
|
|
5460
5491
|
return nil
|
|
5461
5492
|
}; return nil; })());
|
|
5462
|
-
}, $AbstractNode_media_uri$
|
|
5493
|
+
}, $AbstractNode_media_uri$27.$$arity = -2);
|
|
5463
5494
|
|
|
5464
|
-
Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$
|
|
5495
|
+
Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$28 = function $$generate_data_uri(target_image, asset_dir_key) {
|
|
5465
5496
|
var self = this, ext = nil, mimetype = nil, image_path = nil;
|
|
5466
5497
|
|
|
5467
5498
|
|
|
@@ -5490,10 +5521,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5490
5521
|
self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
|
|
5491
5522
|
return "" + "data:" + (mimetype) + ";base64,";
|
|
5492
5523
|
};
|
|
5493
|
-
}, $AbstractNode_generate_data_uri$
|
|
5524
|
+
}, $AbstractNode_generate_data_uri$28.$$arity = -2);
|
|
5494
5525
|
|
|
5495
|
-
Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$
|
|
5496
|
-
var $a, $b, $$
|
|
5526
|
+
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) {
|
|
5527
|
+
var $a, $b, $$30, self = this, mimetype = nil, bindata = nil;
|
|
5497
5528
|
|
|
5498
5529
|
|
|
5499
5530
|
|
|
@@ -5507,14 +5538,14 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5507
5538
|
|
|
5508
5539
|
try {
|
|
5509
5540
|
|
|
5510
|
-
$b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$
|
|
5541
|
+
$b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$30 = function(f){var self = $$30.$$s || this;
|
|
5511
5542
|
|
|
5512
5543
|
|
|
5513
5544
|
|
|
5514
5545
|
if (f == null) {
|
|
5515
5546
|
f = nil;
|
|
5516
5547
|
};
|
|
5517
|
-
return [f.$content_type(), f.$read()];}, $$
|
|
5548
|
+
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;
|
|
5518
5549
|
return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata));
|
|
5519
5550
|
} catch ($err) {
|
|
5520
5551
|
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
@@ -5525,9 +5556,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5525
5556
|
} finally { Opal.pop_exception() }
|
|
5526
5557
|
} else { throw $err; }
|
|
5527
5558
|
};;
|
|
5528
|
-
}, $AbstractNode_generate_data_uri_from_uri$
|
|
5559
|
+
}, $AbstractNode_generate_data_uri_from_uri$29.$$arity = -2);
|
|
5529
5560
|
|
|
5530
|
-
Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$
|
|
5561
|
+
Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$31 = function $$normalize_asset_path(asset_ref, asset_name, autocorrect) {
|
|
5531
5562
|
var self = this;
|
|
5532
5563
|
|
|
5533
5564
|
|
|
@@ -5540,9 +5571,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5540
5571
|
autocorrect = true;
|
|
5541
5572
|
};
|
|
5542
5573
|
return self.$normalize_system_path(asset_ref, self.document.$base_dir(), nil, $hash2(["target_name", "recover"], {"target_name": asset_name, "recover": autocorrect}));
|
|
5543
|
-
}, $AbstractNode_normalize_asset_path$
|
|
5574
|
+
}, $AbstractNode_normalize_asset_path$31.$$arity = -2);
|
|
5544
5575
|
|
|
5545
|
-
Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$
|
|
5576
|
+
Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$32 = function $$normalize_system_path(target, start, jail, opts) {
|
|
5546
5577
|
var self = this, doc = nil;
|
|
5547
5578
|
|
|
5548
5579
|
|
|
@@ -5579,9 +5610,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5579
5610
|
};
|
|
5580
5611
|
};
|
|
5581
5612
|
return doc.$path_resolver().$system_path(target, start, jail, opts);
|
|
5582
|
-
}, $AbstractNode_normalize_system_path$
|
|
5613
|
+
}, $AbstractNode_normalize_system_path$32.$$arity = -2);
|
|
5583
5614
|
|
|
5584
|
-
Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$
|
|
5615
|
+
Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$33 = function $$normalize_web_path(target, start, preserve_uri_target) {
|
|
5585
5616
|
var $a, self = this;
|
|
5586
5617
|
|
|
5587
5618
|
|
|
@@ -5598,9 +5629,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5598
5629
|
} else {
|
|
5599
5630
|
return self.document.$path_resolver().$web_path(target, start)
|
|
5600
5631
|
};
|
|
5601
|
-
}, $AbstractNode_normalize_web_path$
|
|
5632
|
+
}, $AbstractNode_normalize_web_path$33.$$arity = -2);
|
|
5602
5633
|
|
|
5603
|
-
Opal.def(self, '$read_asset', $AbstractNode_read_asset$
|
|
5634
|
+
Opal.def(self, '$read_asset', $AbstractNode_read_asset$34 = function $$read_asset(path, opts) {
|
|
5604
5635
|
var $a, self = this;
|
|
5605
5636
|
|
|
5606
5637
|
|
|
@@ -5627,10 +5658,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5627
5658
|
} else {
|
|
5628
5659
|
return nil
|
|
5629
5660
|
};
|
|
5630
|
-
}, $AbstractNode_read_asset$
|
|
5661
|
+
}, $AbstractNode_read_asset$34.$$arity = -2);
|
|
5631
5662
|
|
|
5632
|
-
Opal.def(self, '$read_contents', $AbstractNode_read_contents$
|
|
5633
|
-
var $a, $b, $c, $$
|
|
5663
|
+
Opal.def(self, '$read_contents', $AbstractNode_read_contents$35 = function $$read_contents(target, opts) {
|
|
5664
|
+
var $a, $b, $c, $$36, $$37, self = this, doc = nil, start = nil, contents = nil;
|
|
5634
5665
|
|
|
5635
5666
|
|
|
5636
5667
|
|
|
@@ -5646,51 +5677,48 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
5646
5677
|
|
|
5647
5678
|
try {
|
|
5648
5679
|
if ($truthy(opts['$[]']("normalize"))) {
|
|
5649
|
-
|
|
5680
|
+
contents = $$($nesting, 'Helpers').$prepare_source_string($send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$36 = function(f){var self = $$36.$$s || this;
|
|
5650
5681
|
|
|
5651
5682
|
|
|
5652
5683
|
|
|
5653
5684
|
if (f == null) {
|
|
5654
5685
|
f = nil;
|
|
5655
5686
|
};
|
|
5656
|
-
return f.$read();}, $$
|
|
5687
|
+
return f.$read();}, $$36.$$s = self, $$36.$$arity = 1, $$36))).$join($$($nesting, 'LF'))
|
|
5657
5688
|
} else {
|
|
5658
|
-
|
|
5689
|
+
contents = $send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$37 = function(f){var self = $$37.$$s || this;
|
|
5659
5690
|
|
|
5660
5691
|
|
|
5661
5692
|
|
|
5662
5693
|
if (f == null) {
|
|
5663
5694
|
f = nil;
|
|
5664
5695
|
};
|
|
5665
|
-
return f.$read();}, $$
|
|
5696
|
+
return f.$read();}, $$37.$$s = self, $$37.$$arity = 1, $$37))
|
|
5666
5697
|
}
|
|
5667
5698
|
} catch ($err) {
|
|
5668
5699
|
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
5669
5700
|
try {
|
|
5670
|
-
|
|
5671
5701
|
if ($truthy(opts.$fetch("warn_on_failure", true))) {
|
|
5672
|
-
self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))}
|
|
5673
|
-
return nil;
|
|
5702
|
+
self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))}
|
|
5674
5703
|
} finally { Opal.pop_exception() }
|
|
5675
5704
|
} else { throw $err; }
|
|
5676
5705
|
};;
|
|
5677
|
-
} else {
|
|
5678
|
-
|
|
5679
|
-
if ($truthy(opts.$fetch("warn_on_failure", true))) {
|
|
5680
|
-
self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")};
|
|
5681
|
-
return nil;
|
|
5682
|
-
}
|
|
5706
|
+
} else if ($truthy(opts.$fetch("warn_on_failure", true))) {
|
|
5707
|
+
self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")}
|
|
5683
5708
|
} else {
|
|
5684
5709
|
|
|
5685
5710
|
target = self.$normalize_system_path(target, opts['$[]']("start"), nil, $hash2(["target_name"], {"target_name": ($truthy($a = opts['$[]']("label")) ? $a : "asset")}));
|
|
5686
|
-
|
|
5711
|
+
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")}));
|
|
5687
5712
|
};
|
|
5688
|
-
|
|
5689
|
-
|
|
5713
|
+
if ($truthy(($truthy($a = ($truthy($b = contents) ? opts['$[]']("warn_if_empty") : $b)) ? contents['$empty?']() : $a))) {
|
|
5714
|
+
self.$logger().$warn("" + "contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " is empty: " + (target))};
|
|
5715
|
+
return contents;
|
|
5716
|
+
}, $AbstractNode_read_contents$35.$$arity = -2);
|
|
5717
|
+
return (Opal.def(self, '$is_uri?', $AbstractNode_is_uri$ques$38 = function(str) {
|
|
5690
5718
|
var self = this;
|
|
5691
5719
|
|
|
5692
5720
|
return $$($nesting, 'Helpers')['$uriish?'](str)
|
|
5693
|
-
}, $AbstractNode_is_uri$ques$
|
|
5721
|
+
}, $AbstractNode_is_uri$ques$38.$$arity = 1), nil) && 'is_uri?';
|
|
5694
5722
|
})($nesting[0], null, $nesting)
|
|
5695
5723
|
})($nesting[0], $nesting)
|
|
5696
5724
|
};
|
|
@@ -5708,7 +5736,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
5708
5736
|
}
|
|
5709
5737
|
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;
|
|
5710
5738
|
|
|
5711
|
-
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']);
|
|
5739
|
+
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']);
|
|
5712
5740
|
return (function($base, $parent_nesting) {
|
|
5713
5741
|
var self = $module($base, 'Asciidoctor');
|
|
5714
5742
|
|
|
@@ -6025,7 +6053,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
6025
6053
|
};
|
|
6026
6054
|
if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) {
|
|
6027
6055
|
return val
|
|
6028
|
-
} else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption : $a))) {
|
|
6056
|
+
} else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption['$nil_or_empty?']()['$!']() : $a))) {
|
|
6029
6057
|
return (function() {$case = xrefstyle;
|
|
6030
6058
|
if ("full"['$===']($case)) {
|
|
6031
6059
|
quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) {
|
|
@@ -6291,7 +6319,7 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
6291
6319
|
}
|
|
6292
6320
|
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;
|
|
6293
6321
|
|
|
6294
|
-
Opal.add_stubs(['$new', '$[]', '$update', '$parse', '$parse_attribute', '$eos?', '$skip_delimiter', '$+', '$rekey', '$
|
|
6322
|
+
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']);
|
|
6295
6323
|
return (function($base, $parent_nesting) {
|
|
6296
6324
|
var self = $module($base, 'Asciidoctor');
|
|
6297
6325
|
|
|
@@ -6304,10 +6332,11 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
6304
6332
|
|
|
6305
6333
|
self.$$prototype.attributes = self.$$prototype.scanner = self.$$prototype.delimiter = self.$$prototype.block = self.$$prototype.delimiter_skip_pattern = self.$$prototype.delimiter_boundary_pattern = nil;
|
|
6306
6334
|
|
|
6307
|
-
Opal.const_set($nesting[0], 'BACKSLASH', "\\");
|
|
6308
6335
|
Opal.const_set($nesting[0], 'APOS', "'");
|
|
6309
|
-
Opal.const_set($nesting[0], '
|
|
6310
|
-
Opal.const_set($nesting[0], '
|
|
6336
|
+
Opal.const_set($nesting[0], 'BACKSLASH', "\\");
|
|
6337
|
+
Opal.const_set($nesting[0], 'QUOT', "\"");
|
|
6338
|
+
Opal.const_set($nesting[0], 'BoundaryRxs', $hash($$($nesting, 'QUOT'), /.*?[^\\](?=")/, $$($nesting, 'APOS'), /.*?[^\\](?=')/, ",", /.*?(?=[ \t]*(,|$))/));
|
|
6339
|
+
Opal.const_set($nesting[0], 'EscapedQuotes', $hash($$($nesting, 'QUOT'), "\\\"", $$($nesting, 'APOS'), "\\'"));
|
|
6311
6340
|
Opal.const_set($nesting[0], 'NameRx', new RegExp("" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-.]*"));
|
|
6312
6341
|
Opal.const_set($nesting[0], 'BlankRx', /[ \t]+/);
|
|
6313
6342
|
Opal.const_set($nesting[0], 'SkipRxs', $hash2([","], {",": /[ \t]*(,|$)/}));
|
|
@@ -6371,104 +6400,83 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
6371
6400
|
return $$($nesting, 'AttributeList').$rekey(self.attributes, positional_attrs)
|
|
6372
6401
|
}, $AttributeList_rekey$4.$$arity = 1);
|
|
6373
6402
|
Opal.defs(self, '$rekey', $AttributeList_rekey$5 = function $$rekey(attributes, positional_attrs) {
|
|
6374
|
-
var $$6, self = this
|
|
6403
|
+
var $$6, self = this;
|
|
6375
6404
|
|
|
6376
6405
|
|
|
6377
|
-
index =
|
|
6378
|
-
$send(positional_attrs, 'each', [], ($$6 = function(key){var self = $$6.$$s || this, val = nil, $writer = nil;
|
|
6406
|
+
$send(positional_attrs, 'each_with_index', [], ($$6 = function(key, index){var self = $$6.$$s || this, $a, val = nil, $writer = nil;
|
|
6379
6407
|
|
|
6380
6408
|
|
|
6381
6409
|
|
|
6382
6410
|
if (key == null) {
|
|
6383
6411
|
key = nil;
|
|
6384
6412
|
};
|
|
6385
|
-
|
|
6386
|
-
if (
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
}
|
|
6413
|
+
|
|
6414
|
+
if (index == null) {
|
|
6415
|
+
index = nil;
|
|
6416
|
+
};
|
|
6417
|
+
if ($truthy(($truthy($a = key) ? (val = attributes['$[]']($rb_plus(index, 1))) : $a))) {
|
|
6418
|
+
|
|
6419
|
+
$writer = [key, val];
|
|
6420
|
+
$send(attributes, '[]=', Opal.to_a($writer));
|
|
6421
|
+
return $writer[$rb_minus($writer["length"], 1)];
|
|
6395
6422
|
} else {
|
|
6396
6423
|
return nil
|
|
6397
|
-
};}, $$6.$$s = self, $$6.$$arity =
|
|
6424
|
+
};}, $$6.$$s = self, $$6.$$arity = 2, $$6));
|
|
6398
6425
|
return attributes;
|
|
6399
6426
|
}, $AttributeList_rekey$5.$$arity = 2);
|
|
6400
6427
|
self.$private();
|
|
6401
6428
|
|
|
6402
6429
|
Opal.def(self, '$parse_attribute', $AttributeList_parse_attribute$7 = function $$parse_attribute(index, positional_attrs) {
|
|
6403
|
-
var $a, $$8, self = this,
|
|
6430
|
+
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;
|
|
6404
6431
|
|
|
6405
6432
|
|
|
6406
|
-
|
|
6407
|
-
if (index == null) {
|
|
6408
|
-
index = 0;
|
|
6409
|
-
};
|
|
6410
|
-
|
|
6411
|
-
if (positional_attrs == null) {
|
|
6412
|
-
positional_attrs = [];
|
|
6413
|
-
};
|
|
6414
|
-
single_quoted_value = false;
|
|
6433
|
+
continue$ = true;
|
|
6415
6434
|
self.$skip_blank();
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
name = self.$parse_attribute_value(self.scanner.$get_byte());
|
|
6423
|
-
value = nil;
|
|
6424
|
-
if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) {
|
|
6425
|
-
} else {
|
|
6426
|
-
single_quoted_value = true
|
|
6427
|
-
};
|
|
6435
|
+
$case = self.scanner.$peek(1);
|
|
6436
|
+
if ($$($nesting, 'QUOT')['$===']($case)) {name = self.$parse_attribute_value(self.scanner.$get_byte())}
|
|
6437
|
+
else if ($$($nesting, 'APOS')['$===']($case)) {
|
|
6438
|
+
name = self.$parse_attribute_value(self.scanner.$get_byte());
|
|
6439
|
+
if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) {
|
|
6428
6440
|
} else {
|
|
6441
|
+
single_quoted = true
|
|
6442
|
+
};}
|
|
6443
|
+
else {
|
|
6444
|
+
skipped = ($truthy($a = ($truthy($b = (name = self.$scan_name())) ? self.$skip_blank() : $b)) ? $a : 0);
|
|
6445
|
+
if ($truthy(self.scanner['$eos?']())) {
|
|
6429
6446
|
|
|
6430
|
-
|
|
6431
|
-
skipped = 0;
|
|
6432
|
-
c = nil;
|
|
6433
|
-
if ($truthy(self.scanner['$eos?']())) {
|
|
6434
|
-
if ($truthy(name)) {
|
|
6435
|
-
} else {
|
|
6436
|
-
return false
|
|
6437
|
-
}
|
|
6447
|
+
if ($truthy(($truthy($a = name) ? $a : self.scanner.$string().$rstrip()['$end_with?'](self.delimiter)))) {
|
|
6438
6448
|
} else {
|
|
6439
|
-
|
|
6440
|
-
skipped = ($truthy($a = self.$skip_blank()) ? $a : 0);
|
|
6441
|
-
c = self.scanner.$get_byte();
|
|
6449
|
+
return nil
|
|
6442
6450
|
};
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
value = nil;
|
|
6449
|
-
} else {
|
|
6451
|
+
continue$ = nil;
|
|
6452
|
+
} else if ((c = self.scanner.$get_byte())['$=='](self.delimiter)) {
|
|
6453
|
+
self.scanner.$unscan()
|
|
6454
|
+
} else if ($truthy(name)) {
|
|
6455
|
+
if (c['$==']("=")) {
|
|
6450
6456
|
|
|
6451
6457
|
self.$skip_blank();
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
}
|
|
6471
|
-
}
|
|
6458
|
+
$case = (c = self.scanner.$get_byte());
|
|
6459
|
+
if ($$($nesting, 'QUOT')['$===']($case)) {value = self.$parse_attribute_value(c)}
|
|
6460
|
+
else if ($$($nesting, 'APOS')['$===']($case)) {
|
|
6461
|
+
value = self.$parse_attribute_value(c);
|
|
6462
|
+
if ($truthy(value['$start_with?']($$($nesting, 'APOS')))) {
|
|
6463
|
+
} else {
|
|
6464
|
+
single_quoted = true
|
|
6465
|
+
};}
|
|
6466
|
+
else if (self.delimiter['$===']($case)) {
|
|
6467
|
+
value = "";
|
|
6468
|
+
self.scanner.$unscan();}
|
|
6469
|
+
else if (nil['$===']($case)) {value = ""}
|
|
6470
|
+
else {
|
|
6471
|
+
value = "" + (c) + (self.$scan_to_delimiter());
|
|
6472
|
+
if (value['$==']("None")) {
|
|
6473
|
+
return true};};
|
|
6474
|
+
} else {
|
|
6475
|
+
name = "" + (name) + ($rb_times(" ", skipped)) + (c) + (self.$scan_to_delimiter())
|
|
6476
|
+
}
|
|
6477
|
+
} else {
|
|
6478
|
+
name = "" + (c) + (self.$scan_to_delimiter())
|
|
6479
|
+
};};
|
|
6472
6480
|
if ($truthy(value)) {
|
|
6473
6481
|
$case = name;
|
|
6474
6482
|
if ("options"['$===']($case) || "opts"['$===']($case)) {if ($truthy(value['$include?'](","))) {
|
|
@@ -6498,7 +6506,7 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
6498
6506
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
6499
6507
|
$writer[$rb_minus($writer["length"], 1)];
|
|
6500
6508
|
}}
|
|
6501
|
-
else {if ($truthy(($truthy($a =
|
|
6509
|
+
else {if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) {
|
|
6502
6510
|
$case = name;
|
|
6503
6511
|
if ("title"['$===']($case) || "reftext"['$===']($case)) {
|
|
6504
6512
|
$writer = [name, value];
|
|
@@ -6516,44 +6524,40 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
|
|
|
6516
6524
|
}}
|
|
6517
6525
|
} else {
|
|
6518
6526
|
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
return self.block.$apply_subs(name);
|
|
6522
|
-
} else {
|
|
6523
|
-
return name
|
|
6524
|
-
}; return nil; })();
|
|
6527
|
+
if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) {
|
|
6528
|
+
name = self.block.$apply_subs(name)};
|
|
6525
6529
|
if ($truthy((positional_attr_name = positional_attrs['$[]'](index)))) {
|
|
6526
6530
|
|
|
6527
|
-
$writer = [positional_attr_name,
|
|
6531
|
+
$writer = [positional_attr_name, name];
|
|
6528
6532
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
6529
6533
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
6530
6534
|
|
|
6531
|
-
$writer = [$rb_plus(index, 1),
|
|
6535
|
+
$writer = [$rb_plus(index, 1), name];
|
|
6532
6536
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
6533
6537
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
6534
6538
|
};
|
|
6535
|
-
return
|
|
6536
|
-
}, $AttributeList_parse_attribute$7.$$arity =
|
|
6539
|
+
return continue$;
|
|
6540
|
+
}, $AttributeList_parse_attribute$7.$$arity = 2);
|
|
6537
6541
|
|
|
6538
6542
|
Opal.def(self, '$parse_attribute_value', $AttributeList_parse_attribute_value$9 = function $$parse_attribute_value(quote) {
|
|
6539
6543
|
var self = this, value = nil;
|
|
6540
6544
|
|
|
6541
|
-
|
|
6542
6545
|
if (self.scanner.$peek(1)['$=='](quote)) {
|
|
6543
6546
|
|
|
6544
6547
|
self.scanner.$get_byte();
|
|
6545
|
-
return "";
|
|
6546
|
-
if ($truthy((value = self.$scan_to_quote(quote)))) {
|
|
6548
|
+
return "";
|
|
6549
|
+
} else if ($truthy((value = self.$scan_to_quote(quote)))) {
|
|
6547
6550
|
|
|
6548
6551
|
self.scanner.$get_byte();
|
|
6549
6552
|
if ($truthy(value['$include?']($$($nesting, 'BACKSLASH')))) {
|
|
6550
|
-
|
|
6553
|
+
|
|
6554
|
+
return value.$gsub($$($nesting, 'EscapedQuotes')['$[]'](quote), quote);
|
|
6551
6555
|
} else {
|
|
6552
6556
|
return value
|
|
6553
6557
|
};
|
|
6554
6558
|
} else {
|
|
6555
6559
|
return "" + (quote) + (self.$scan_to_delimiter())
|
|
6556
|
-
}
|
|
6560
|
+
}
|
|
6557
6561
|
}, $AttributeList_parse_attribute_value$9.$$arity = 1);
|
|
6558
6562
|
|
|
6559
6563
|
Opal.def(self, '$skip_blank', $AttributeList_skip_blank$10 = function $$skip_blank() {
|
|
@@ -7386,9 +7390,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
7386
7390
|
function $rb_lt(lhs, rhs) {
|
|
7387
7391
|
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
|
|
7388
7392
|
}
|
|
7389
|
-
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, $
|
|
7393
|
+
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;
|
|
7390
7394
|
|
|
7391
|
-
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', '
|
|
7395
|
+
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']);
|
|
7392
7396
|
return (function($base, $parent_nesting) {
|
|
7393
7397
|
var self = $module($base, 'Asciidoctor');
|
|
7394
7398
|
|
|
@@ -7676,10 +7680,22 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
7676
7680
|
$writer = ["embedded", ""];
|
|
7677
7681
|
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
7678
7682
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
+
if ($truthy(($truthy($a = attr_overrides['$key?']("showtitle")) ? attr_overrides.$keys()['$&'](["notitle", "showtitle"])['$[]'](-1)['$==']("showtitle") : $a))) {
|
|
7684
|
+
|
|
7685
|
+
$writer = ["notitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("showtitle"))];
|
|
7686
|
+
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
7687
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
7688
|
+
} else if ($truthy(attr_overrides['$key?']("notitle"))) {
|
|
7689
|
+
|
|
7690
|
+
$writer = ["showtitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("notitle"))];
|
|
7691
|
+
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
7692
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
7693
|
+
} else {
|
|
7694
|
+
|
|
7695
|
+
$writer = ["notitle", ""];
|
|
7696
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
7697
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
7698
|
+
};
|
|
7683
7699
|
};
|
|
7684
7700
|
|
|
7685
7701
|
$writer = ["asciidoctor", ""];
|
|
@@ -8203,9 +8219,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
8203
8219
|
}, $Document_revdate$38.$$arity = 0);
|
|
8204
8220
|
|
|
8205
8221
|
Opal.def(self, '$notitle', $Document_notitle$39 = function $$notitle() {
|
|
8206
|
-
var
|
|
8222
|
+
var self = this;
|
|
8207
8223
|
|
|
8208
|
-
return
|
|
8224
|
+
return self.attributes['$key?']("notitle")
|
|
8209
8225
|
}, $Document_notitle$39.$$arity = 0);
|
|
8210
8226
|
|
|
8211
8227
|
Opal.def(self, '$noheader', $Document_noheader$40 = function $$noheader() {
|
|
@@ -9357,7 +9373,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
9357
9373
|
}
|
|
9358
9374
|
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;
|
|
9359
9375
|
|
|
9360
|
-
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', '$
|
|
9376
|
+
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', '$%']);
|
|
9361
9377
|
return (function($base, $parent_nesting) {
|
|
9362
9378
|
var self = $module($base, 'Asciidoctor');
|
|
9363
9379
|
|
|
@@ -9830,6 +9846,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
9830
9846
|
} else if ($truthy(preamble)) {
|
|
9831
9847
|
if ($truthy(preamble['$blocks?']())) {
|
|
9832
9848
|
if ($truthy(($truthy($a = ($truthy($b = book) ? $b : document.$blocks()['$[]'](1))) ? $a : $$($nesting, 'Compliance').$unwrap_standalone_preamble()['$!']()))) {
|
|
9849
|
+
if ($truthy(document.$sourcemap())) {
|
|
9850
|
+
|
|
9851
|
+
$writer = [preamble.$blocks()['$[]'](0).$source_location()];
|
|
9852
|
+
$send(preamble, 'source_location=', Opal.to_a($writer));
|
|
9853
|
+
$writer[$rb_minus($writer["length"], 1)];}
|
|
9833
9854
|
} else {
|
|
9834
9855
|
|
|
9835
9856
|
document.$blocks().$shift();
|
|
@@ -10384,7 +10405,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
10384
10405
|
block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);}
|
|
10385
10406
|
else if ("open"['$===']($case) || "abstract"['$===']($case) || "partintro"['$===']($case)) {block = self.$build_block("open", "compound", terminator, parent, reader, attributes)}
|
|
10386
10407
|
else if ("literal"['$===']($case)) {block = self.$build_block(block_context, "verbatim", terminator, parent, reader, attributes)}
|
|
10387
|
-
else if ("example"['$===']($case)) {
|
|
10408
|
+
else if ("example"['$===']($case)) {
|
|
10409
|
+
if ($truthy(attributes['$[]']("collapsible-option"))) {
|
|
10410
|
+
|
|
10411
|
+
$writer = ["caption", ""];
|
|
10412
|
+
$send(attributes, '[]=', Opal.to_a($writer));
|
|
10413
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
10414
|
+
block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);}
|
|
10388
10415
|
else if ("quote"['$===']($case) || "verse"['$===']($case)) {
|
|
10389
10416
|
$$($nesting, 'AttributeList').$rekey(attributes, [nil, "attribution", "citetitle"]);
|
|
10390
10417
|
block = self.$build_block(block_context, (function() {if (block_context['$==']("verse")) {
|
|
@@ -10728,22 +10755,23 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
10728
10755
|
|
|
10729
10756
|
|
|
10730
10757
|
if ($truthy(($truthy($a = text['$include?']("[[")) ? $a : text['$include?']("or:")))) {
|
|
10731
|
-
$send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, id = nil, reftext = nil, location = nil, offset = nil;
|
|
10758
|
+
$send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, $c, $d, id = nil, reftext = nil, location = nil, offset = nil;
|
|
10732
10759
|
|
|
10733
10760
|
|
|
10734
10761
|
if ($truthy((id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))))) {
|
|
10735
|
-
if ($truthy((reftext = (($
|
|
10736
|
-
|
|
10737
|
-
return nil;}}
|
|
10762
|
+
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))) {
|
|
10763
|
+
return nil;}
|
|
10738
10764
|
} else {
|
|
10739
10765
|
|
|
10740
10766
|
id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3));
|
|
10741
10767
|
if ($truthy((reftext = (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))))) {
|
|
10742
|
-
|
|
10743
10768
|
if ($truthy(reftext['$include?']("]"))) {
|
|
10744
|
-
|
|
10745
|
-
|
|
10746
|
-
|
|
10769
|
+
|
|
10770
|
+
reftext = reftext.$gsub("\\]", "]");
|
|
10771
|
+
if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
|
|
10772
|
+
reftext = document.$sub_attributes(reftext)};
|
|
10773
|
+
} else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
|
|
10774
|
+
return nil;}};
|
|
10747
10775
|
};
|
|
10748
10776
|
if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
|
|
10749
10777
|
return nil
|
|
@@ -11909,7 +11937,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
11909
11937
|
if ((name = self.$sanitize_attribute_name(name))['$==']("numbered")) {
|
|
11910
11938
|
name = "sectnums"
|
|
11911
11939
|
} else if (name['$==']("hardbreaks")) {
|
|
11912
|
-
name = "hardbreaks-option"
|
|
11940
|
+
name = "hardbreaks-option"
|
|
11941
|
+
} else if (name['$==']("showtitle")) {
|
|
11942
|
+
self.$store_attribute("notitle", (function() {if ($truthy(value)) {
|
|
11943
|
+
return nil
|
|
11944
|
+
} else {
|
|
11945
|
+
return ""
|
|
11946
|
+
}; return nil; })(), doc, attrs)};
|
|
11913
11947
|
if ($truthy(doc)) {
|
|
11914
11948
|
if ($truthy(value)) {
|
|
11915
11949
|
|
|
@@ -12023,7 +12057,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
12023
12057
|
}
|
|
12024
12058
|
}, $Parser_is_sibling_list_item$ques$59.$$arity = 3);
|
|
12025
12059
|
Opal.defs(self, '$parse_table', $Parser_parse_table$60 = function $$parse_table(table_reader, parent, attributes) {
|
|
12026
|
-
var $a, $b, $c, $d, self = this, table = nil, colspecs = nil, explicit_colspecs = nil, skipped = nil,
|
|
12060
|
+
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;
|
|
12027
12061
|
|
|
12028
12062
|
|
|
12029
12063
|
table = $$($nesting, 'Table').$new(parent, attributes);
|
|
@@ -12032,12 +12066,20 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
12032
12066
|
table.$create_columns(colspecs);
|
|
12033
12067
|
explicit_colspecs = true;};
|
|
12034
12068
|
skipped = ($truthy($a = table_reader.$skip_blank_lines()) ? $a : 0);
|
|
12069
|
+
if ($truthy(attributes['$[]']("header-option"))) {
|
|
12070
|
+
|
|
12071
|
+
$writer = [true];
|
|
12072
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
12073
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
12074
|
+
} else if ($truthy((($a = skipped['$=='](0)) ? attributes['$[]']("noheader-option")['$!']() : skipped['$=='](0)))) {
|
|
12075
|
+
|
|
12076
|
+
|
|
12077
|
+
$writer = ["implicit"];
|
|
12078
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
12079
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
12080
|
+
implicit_header = true;};
|
|
12035
12081
|
parser_ctx = $$$($$($nesting, 'Table'), 'ParserContext').$new(table_reader, table, attributes);
|
|
12036
12082
|
$a = [parser_ctx.$format(), -1, nil], (format = $a[0]), (loop_idx = $a[1]), (implicit_header_boundary = $a[2]), $a;
|
|
12037
|
-
if ($truthy(($truthy($a = ($truthy($b = $rb_gt(skipped, 0)) ? $b : attributes['$[]']("header-option"))) ? $a : attributes['$[]']("noheader-option")))) {
|
|
12038
|
-
} else {
|
|
12039
|
-
implicit_header = true
|
|
12040
|
-
};
|
|
12041
12083
|
$a = false; while ($a || $truthy((line = table_reader.$read_line()))) {$a = false;
|
|
12042
12084
|
|
|
12043
12085
|
if ($truthy(($truthy($b = (beyond_first = $rb_gt((loop_idx = $rb_plus(loop_idx, 1)), 0))) ? line['$empty?']() : $b))) {
|
|
@@ -12061,7 +12103,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
12061
12103
|
if ($truthy(implicit_header_boundary)) {
|
|
12062
12104
|
implicit_header_boundary = nil};
|
|
12063
12105
|
} else if ($truthy(($truthy($b = implicit_header_boundary) ? implicit_header_boundary['$=='](loop_idx) : $b))) {
|
|
12064
|
-
|
|
12106
|
+
|
|
12107
|
+
$writer = [(implicit_header = (implicit_header_boundary = nil))];
|
|
12108
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
12109
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
12065
12110
|
}};
|
|
12066
12111
|
if ($truthy(beyond_first)) {
|
|
12067
12112
|
} else {
|
|
@@ -12071,7 +12116,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
12071
12116
|
if ($truthy(($truthy($b = table_reader['$has_more_lines?']()) ? table_reader.$peek_line()['$empty?']() : $b))) {
|
|
12072
12117
|
implicit_header_boundary = 1
|
|
12073
12118
|
} else {
|
|
12074
|
-
|
|
12119
|
+
|
|
12120
|
+
$writer = [(implicit_header = nil)];
|
|
12121
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
12122
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
12075
12123
|
}};
|
|
12076
12124
|
};
|
|
12077
12125
|
$b = false; while ($b || $truthy(true)) {$b = false;
|
|
@@ -12139,7 +12187,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
12139
12187
|
if ("csv"['$===']($case)) {if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?']())) {
|
|
12140
12188
|
|
|
12141
12189
|
if ($truthy(($truthy($c = implicit_header_boundary) ? loop_idx['$=='](0) : $c))) {
|
|
12142
|
-
|
|
12190
|
+
|
|
12191
|
+
$writer = [(implicit_header = (implicit_header_boundary = nil))];
|
|
12192
|
+
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
12193
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
12143
12194
|
parser_ctx.$keep_cell_open();
|
|
12144
12195
|
} else {
|
|
12145
12196
|
parser_ctx.$close_cell(true)
|
|
@@ -12168,14 +12219,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
12168
12219
|
};
|
|
12169
12220
|
if ($truthy(implicit_header)) {
|
|
12170
12221
|
|
|
12171
|
-
|
|
12172
12222
|
$writer = [true];
|
|
12173
12223
|
$send(table, 'has_header_option=', Opal.to_a($writer));
|
|
12174
|
-
$writer[$rb_minus($writer["length"], 1)]
|
|
12175
|
-
|
|
12176
|
-
$writer = ["header-option", ""];
|
|
12177
|
-
$send(attributes, '[]=', Opal.to_a($writer));
|
|
12178
|
-
$writer[$rb_minus($writer["length"], 1)];;};
|
|
12224
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
12179
12225
|
table.$partition_header_footer(attributes);
|
|
12180
12226
|
return table;
|
|
12181
12227
|
}, $Parser_parse_table$60.$$arity = 3);
|
|
@@ -15124,7 +15170,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15124
15170
|
}
|
|
15125
15171
|
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;
|
|
15126
15172
|
|
|
15127
|
-
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', '$
|
|
15173
|
+
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']);
|
|
15128
15174
|
return (function($base, $parent_nesting) {
|
|
15129
15175
|
var self = $module($base, 'Asciidoctor');
|
|
15130
15176
|
|
|
@@ -15194,11 +15240,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15194
15240
|
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Table_initialize$4, false), [parent, "table"], null);
|
|
15195
15241
|
self.rows = $$($nesting, 'Rows').$new();
|
|
15196
15242
|
self.columns = [];
|
|
15197
|
-
self.has_header_option =
|
|
15198
|
-
return true
|
|
15199
|
-
} else {
|
|
15200
|
-
return false
|
|
15201
|
-
}; return nil; })();
|
|
15243
|
+
self.has_header_option = false;
|
|
15202
15244
|
if ($truthy((pcwidth = attributes['$[]']("width")))) {
|
|
15203
15245
|
if ($truthy(($truthy($a = $rb_gt((pcwidth_intval = pcwidth.$to_i()), 100)) ? $a : $rb_lt(pcwidth_intval, 1)))) {
|
|
15204
15246
|
if ($truthy((($a = pcwidth_intval['$=='](0)) ? ($truthy($b = pcwidth['$==']("0")) ? $b : pcwidth['$==']("0%")) : pcwidth_intval['$=='](0)))) {
|
|
@@ -15232,9 +15274,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15232
15274
|
}, $Table_initialize$4.$$arity = 2);
|
|
15233
15275
|
|
|
15234
15276
|
Opal.def(self, '$header_row?', $Table_header_row$ques$5 = function() {
|
|
15235
|
-
var $a, self = this;
|
|
15277
|
+
var $a, self = this, val = nil;
|
|
15236
15278
|
|
|
15237
|
-
|
|
15279
|
+
if ($truthy(($truthy($a = (val = self.has_header_option)) ? self.rows.$body()['$empty?']() : $a))) {
|
|
15280
|
+
return val
|
|
15281
|
+
} else {
|
|
15282
|
+
return nil
|
|
15283
|
+
}
|
|
15238
15284
|
}, $Table_header_row$ques$5.$$arity = 0);
|
|
15239
15285
|
|
|
15240
15286
|
Opal.def(self, '$create_columns', $Table_create_columns$6 = function $$create_columns(colspecs) {
|
|
@@ -15339,35 +15385,39 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15339
15385
|
return nil;
|
|
15340
15386
|
}, $Table_assign_column_widths$8.$$arity = -1);
|
|
15341
15387
|
return (Opal.def(self, '$partition_header_footer', $Table_partition_header_footer$12 = function $$partition_header_footer(attrs) {
|
|
15342
|
-
var
|
|
15388
|
+
var $$13, $$14, $a, self = this, num_body_rows = nil, $writer = nil, body = nil;
|
|
15343
15389
|
|
|
15344
15390
|
|
|
15345
|
-
|
|
15346
|
-
$
|
|
15347
|
-
|
|
15348
|
-
|
|
15349
|
-
|
|
15350
|
-
|
|
15351
|
-
|
|
15352
|
-
head = self.rows.$body().$shift();
|
|
15353
|
-
num_body_rows = $rb_minus(num_body_rows, 1);
|
|
15354
|
-
$send(head, 'each', [], ($$13 = function(c){var self = $$13.$$s || this;
|
|
15391
|
+
num_body_rows = (($writer = ["rowcount", (body = self.rows.$body()).$size()]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]);
|
|
15392
|
+
if ($truthy($rb_gt(num_body_rows, 0))) {
|
|
15393
|
+
if ($truthy(self.has_header_option)) {
|
|
15394
|
+
|
|
15395
|
+
|
|
15396
|
+
$writer = [[$send(body.$shift(), 'map', [], ($$13 = function(cell){var self = $$13.$$s || this;
|
|
15355
15397
|
|
|
15356
|
-
|
|
15357
15398
|
|
|
15358
|
-
|
|
15359
|
-
|
|
15360
|
-
|
|
15361
|
-
|
|
15362
|
-
|
|
15363
|
-
|
|
15364
|
-
|
|
15365
|
-
|
|
15366
|
-
$
|
|
15367
|
-
|
|
15399
|
+
|
|
15400
|
+
if (cell == null) {
|
|
15401
|
+
cell = nil;
|
|
15402
|
+
};
|
|
15403
|
+
return cell.$reinitialize(true);}, $$13.$$s = self, $$13.$$arity = 1, $$13))]];
|
|
15404
|
+
$send(self.rows, 'head=', Opal.to_a($writer));
|
|
15405
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
15406
|
+
num_body_rows = $rb_minus(num_body_rows, 1);
|
|
15407
|
+
} else if ($truthy(self.has_header_option['$nil?']())) {
|
|
15408
|
+
|
|
15409
|
+
self.has_header_option = false;
|
|
15410
|
+
body.$unshift($send(body.$shift(), 'map', [], ($$14 = function(cell){var self = $$14.$$s || this;
|
|
15411
|
+
|
|
15412
|
+
|
|
15413
|
+
|
|
15414
|
+
if (cell == null) {
|
|
15415
|
+
cell = nil;
|
|
15416
|
+
};
|
|
15417
|
+
return cell.$reinitialize(false);}, $$14.$$s = self, $$14.$$arity = 1, $$14)));}};
|
|
15368
15418
|
if ($truthy(($truthy($a = $rb_gt(num_body_rows, 0)) ? attrs['$[]']("footer-option") : $a))) {
|
|
15369
15419
|
|
|
15370
|
-
$writer = [[
|
|
15420
|
+
$writer = [[body.$pop()]];
|
|
15371
15421
|
$send(self.rows, 'foot=', Opal.to_a($writer));
|
|
15372
15422
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
15373
15423
|
return nil;
|
|
@@ -15376,22 +15426,22 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15376
15426
|
(function($base, $super, $parent_nesting) {
|
|
15377
15427
|
var self = $klass($base, $super, 'Column');
|
|
15378
15428
|
|
|
15379
|
-
var $nesting = [self].concat($parent_nesting), $Column_initialize$
|
|
15429
|
+
var $nesting = [self].concat($parent_nesting), $Column_initialize$15, $Column_assign_width$16, $Column_block$ques$17, $Column_inline$ques$18;
|
|
15380
15430
|
|
|
15381
15431
|
self.$$prototype.attributes = nil;
|
|
15382
15432
|
|
|
15383
15433
|
self.$attr_accessor("style");
|
|
15384
15434
|
|
|
15385
|
-
Opal.def(self, '$initialize', $Column_initialize$
|
|
15386
|
-
var $a, $iter = $Column_initialize$
|
|
15435
|
+
Opal.def(self, '$initialize', $Column_initialize$15 = function $$initialize(table, index, attributes) {
|
|
15436
|
+
var $a, $iter = $Column_initialize$15.$$p, $yield = $iter || nil, self = this, $writer = nil;
|
|
15387
15437
|
|
|
15388
|
-
if ($iter) $Column_initialize$
|
|
15438
|
+
if ($iter) $Column_initialize$15.$$p = null;
|
|
15389
15439
|
|
|
15390
15440
|
|
|
15391
15441
|
if (attributes == null) {
|
|
15392
15442
|
attributes = $hash2([], {});
|
|
15393
15443
|
};
|
|
15394
|
-
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$
|
|
15444
|
+
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$15, false), [table, "table_column"], null);
|
|
15395
15445
|
self.style = attributes['$[]']("style");
|
|
15396
15446
|
|
|
15397
15447
|
$writer = ["colnumber", $rb_plus(index, 1)];
|
|
@@ -15401,10 +15451,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15401
15451
|
($truthy($a = attributes['$[]']("halign")) ? $a : (($writer = ["halign", "left"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
15402
15452
|
($truthy($a = attributes['$[]']("valign")) ? $a : (($writer = ["valign", "top"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
15403
15453
|
return self.$update_attributes(attributes);
|
|
15404
|
-
}, $Column_initialize$
|
|
15454
|
+
}, $Column_initialize$15.$$arity = -3);
|
|
15405
15455
|
Opal.alias(self, "table", "parent");
|
|
15406
15456
|
|
|
15407
|
-
Opal.def(self, '$assign_width', $Column_assign_width$
|
|
15457
|
+
Opal.def(self, '$assign_width', $Column_assign_width$16 = function $$assign_width(col_pcwidth, width_base, precision) {
|
|
15408
15458
|
var self = this, $writer = nil, col_abswidth = nil;
|
|
15409
15459
|
|
|
15410
15460
|
|
|
@@ -15426,25 +15476,25 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15426
15476
|
$writer = ["colpcwidth", col_pcwidth];
|
|
15427
15477
|
$send(self.attributes, '[]=', Opal.to_a($writer));
|
|
15428
15478
|
return $writer[$rb_minus($writer["length"], 1)];;
|
|
15429
|
-
}, $Column_assign_width$
|
|
15479
|
+
}, $Column_assign_width$16.$$arity = 3);
|
|
15430
15480
|
|
|
15431
|
-
Opal.def(self, '$block?', $Column_block$ques$
|
|
15481
|
+
Opal.def(self, '$block?', $Column_block$ques$17 = function() {
|
|
15432
15482
|
var self = this;
|
|
15433
15483
|
|
|
15434
15484
|
return false
|
|
15435
|
-
}, $Column_block$ques$
|
|
15436
|
-
return (Opal.def(self, '$inline?', $Column_inline$ques$
|
|
15485
|
+
}, $Column_block$ques$17.$$arity = 0);
|
|
15486
|
+
return (Opal.def(self, '$inline?', $Column_inline$ques$18 = function() {
|
|
15437
15487
|
var self = this;
|
|
15438
15488
|
|
|
15439
15489
|
return false
|
|
15440
|
-
}, $Column_inline$ques$
|
|
15490
|
+
}, $Column_inline$ques$18.$$arity = 0), nil) && 'inline?';
|
|
15441
15491
|
})($$($nesting, 'Table'), $$($nesting, 'AbstractNode'), $nesting);
|
|
15442
15492
|
(function($base, $super, $parent_nesting) {
|
|
15443
15493
|
var self = $klass($base, $super, 'Cell');
|
|
15444
15494
|
|
|
15445
|
-
var $nesting = [self].concat($parent_nesting), $Cell_initialize$
|
|
15495
|
+
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;
|
|
15446
15496
|
|
|
15447
|
-
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 =
|
|
15497
|
+
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;
|
|
15448
15498
|
|
|
15449
15499
|
Opal.const_set($nesting[0], 'DOUBLE_LF', $rb_times($$($nesting, 'LF'), 2));
|
|
15450
15500
|
self.$attr_accessor("colspan");
|
|
@@ -15452,10 +15502,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15452
15502
|
Opal.alias(self, "column", "parent");
|
|
15453
15503
|
self.$attr_reader("inner_document");
|
|
15454
15504
|
|
|
15455
|
-
Opal.def(self, '$initialize', $Cell_initialize$
|
|
15456
|
-
var $a, $b, $iter = $Cell_initialize$
|
|
15505
|
+
Opal.def(self, '$initialize', $Cell_initialize$19 = function $$initialize(column, cell_text, attributes, opts) {
|
|
15506
|
+
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;
|
|
15457
15507
|
|
|
15458
|
-
if ($iter) $Cell_initialize$
|
|
15508
|
+
if ($iter) $Cell_initialize$19.$$p = null;
|
|
15459
15509
|
|
|
15460
15510
|
|
|
15461
15511
|
if (attributes == null) {
|
|
@@ -15465,14 +15515,20 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15465
15515
|
if (opts == null) {
|
|
15466
15516
|
opts = $hash2([], {});
|
|
15467
15517
|
};
|
|
15468
|
-
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$
|
|
15518
|
+
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$19, false), [column, "table_cell"], null);
|
|
15519
|
+
self.cursor = (self.reinitialize_args = nil);
|
|
15469
15520
|
if ($truthy(self.document.$sourcemap())) {
|
|
15470
15521
|
self.source_location = opts['$[]']("cursor").$dup()};
|
|
15471
15522
|
if ($truthy(column)) {
|
|
15472
15523
|
|
|
15473
15524
|
if ($truthy((in_header_row = column.$table()['$header_row?']()))) {
|
|
15525
|
+
if ($truthy((($a = in_header_row['$==']("implicit")) ? (cell_style = ($truthy($b = column.$style()) ? $b : ($truthy($c = attributes) ? attributes['$[]']("style") : $c))) : in_header_row['$==']("implicit")))) {
|
|
15526
|
+
|
|
15527
|
+
if ($truthy(($truthy($a = cell_style['$==']("asciidoc")) ? $a : cell_style['$==']("literal")))) {
|
|
15528
|
+
self.reinitialize_args = [column, cell_text, ($truthy($a = attributes) ? attributes.$merge() : $a), opts]};
|
|
15529
|
+
cell_style = nil;}
|
|
15474
15530
|
} else {
|
|
15475
|
-
cell_style = column.$
|
|
15531
|
+
cell_style = column.$style()
|
|
15476
15532
|
};
|
|
15477
15533
|
self.$update_attributes(column.$attributes());};
|
|
15478
15534
|
if ($truthy(attributes)) {
|
|
@@ -15558,34 +15614,77 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15558
15614
|
self.subs = $$($nesting, 'BASIC_SUBS');
|
|
15559
15615
|
} else {
|
|
15560
15616
|
|
|
15561
|
-
if ($truthy(
|
|
15562
|
-
|
|
15617
|
+
if ($truthy(normal_psv)) {
|
|
15618
|
+
if ($truthy(in_header_row)) {
|
|
15619
|
+
self.cursor = opts['$[]']("cursor")
|
|
15620
|
+
} else {
|
|
15621
|
+
self.$catalog_inline_anchor(cell_text, opts['$[]']("cursor"))
|
|
15622
|
+
}};
|
|
15563
15623
|
self.content_model = "simple";
|
|
15564
15624
|
self.subs = $$($nesting, 'NORMAL_SUBS');
|
|
15565
15625
|
};
|
|
15566
15626
|
self.text = cell_text;
|
|
15567
15627
|
return (self.style = cell_style);
|
|
15568
|
-
}, $Cell_initialize$
|
|
15628
|
+
}, $Cell_initialize$19.$$arity = -3);
|
|
15569
15629
|
|
|
15570
|
-
Opal.def(self, '$
|
|
15630
|
+
Opal.def(self, '$reinitialize', $Cell_reinitialize$20 = function $$reinitialize(has_header) {
|
|
15631
|
+
var self = this;
|
|
15632
|
+
|
|
15633
|
+
|
|
15634
|
+
if ($truthy(has_header)) {
|
|
15635
|
+
self.reinitialize_args = nil
|
|
15636
|
+
} else if ($truthy(self.reinitialize_args)) {
|
|
15637
|
+
return $send($$$($$($nesting, 'Table'), 'Cell'), 'new', Opal.to_a(self.reinitialize_args))
|
|
15638
|
+
} else {
|
|
15639
|
+
self.style = self.attributes['$[]']("style")
|
|
15640
|
+
};
|
|
15641
|
+
if ($truthy(self.cursor)) {
|
|
15642
|
+
self.$catalog_inline_anchor()};
|
|
15643
|
+
return self;
|
|
15644
|
+
}, $Cell_reinitialize$20.$$arity = 1);
|
|
15645
|
+
|
|
15646
|
+
Opal.def(self, '$catalog_inline_anchor', $Cell_catalog_inline_anchor$21 = function $$catalog_inline_anchor(cell_text, cursor) {
|
|
15647
|
+
var $a, self = this;
|
|
15648
|
+
|
|
15649
|
+
|
|
15650
|
+
|
|
15651
|
+
if (cell_text == null) {
|
|
15652
|
+
cell_text = self.text;
|
|
15653
|
+
};
|
|
15654
|
+
|
|
15655
|
+
if (cursor == null) {
|
|
15656
|
+
cursor = nil;
|
|
15657
|
+
};
|
|
15658
|
+
if ($truthy(cursor)) {
|
|
15659
|
+
} else {
|
|
15660
|
+
$a = [self.cursor, nil], (cursor = $a[0]), (self.cursor = $a[1]), $a
|
|
15661
|
+
};
|
|
15662
|
+
if ($truthy(($truthy($a = cell_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](cell_text) : $a))) {
|
|
15663
|
+
return $$($nesting, 'Parser').$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), self, cursor, self.document)
|
|
15664
|
+
} else {
|
|
15665
|
+
return nil
|
|
15666
|
+
};
|
|
15667
|
+
}, $Cell_catalog_inline_anchor$21.$$arity = -1);
|
|
15668
|
+
|
|
15669
|
+
Opal.def(self, '$text', $Cell_text$22 = function $$text() {
|
|
15571
15670
|
var self = this;
|
|
15572
15671
|
|
|
15573
15672
|
return self.$apply_subs(self.text, self.subs)
|
|
15574
|
-
}, $Cell_text$
|
|
15673
|
+
}, $Cell_text$22.$$arity = 0);
|
|
15575
15674
|
|
|
15576
|
-
Opal.def(self, '$text=', $Cell_text$eq$
|
|
15675
|
+
Opal.def(self, '$text=', $Cell_text$eq$23 = function(val) {
|
|
15577
15676
|
var self = this;
|
|
15578
15677
|
|
|
15579
15678
|
return (self.text = val)
|
|
15580
|
-
}, $Cell_text$eq$
|
|
15679
|
+
}, $Cell_text$eq$23.$$arity = 1);
|
|
15581
15680
|
|
|
15582
|
-
Opal.def(self, '$content', $Cell_content$
|
|
15583
|
-
var $$
|
|
15681
|
+
Opal.def(self, '$content', $Cell_content$24 = function $$content() {
|
|
15682
|
+
var $$25, $a, self = this, cell_style = nil, subbed_text = nil;
|
|
15584
15683
|
|
|
15585
15684
|
if ((cell_style = self.style)['$==']("asciidoc")) {
|
|
15586
15685
|
return self.inner_document.$convert()
|
|
15587
15686
|
} else if ($truthy(self.text['$include?']($$($nesting, 'DOUBLE_LF')))) {
|
|
15588
|
-
return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$
|
|
15687
|
+
return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$25 = function(para){var self = $$25.$$s || this, $a;
|
|
15589
15688
|
|
|
15590
15689
|
|
|
15591
15690
|
|
|
@@ -15596,7 +15695,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15596
15695
|
return $$($nesting, 'Inline').$new(self.$parent(), "quoted", para, $hash2(["type"], {"type": cell_style})).$convert()
|
|
15597
15696
|
} else {
|
|
15598
15697
|
return para
|
|
15599
|
-
};}, $$
|
|
15698
|
+
};}, $$25.$$s = self, $$25.$$arity = 1, $$25))
|
|
15600
15699
|
} else if ($truthy((subbed_text = self.$text())['$empty?']())) {
|
|
15601
15700
|
return []
|
|
15602
15701
|
} else if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) {
|
|
@@ -15604,46 +15703,46 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15604
15703
|
} else {
|
|
15605
15704
|
return [subbed_text]
|
|
15606
15705
|
}
|
|
15607
|
-
}, $Cell_content$
|
|
15706
|
+
}, $Cell_content$24.$$arity = 0);
|
|
15608
15707
|
|
|
15609
|
-
Opal.def(self, '$lines', $Cell_lines$
|
|
15708
|
+
Opal.def(self, '$lines', $Cell_lines$26 = function $$lines() {
|
|
15610
15709
|
var self = this;
|
|
15611
15710
|
|
|
15612
15711
|
return self.text.$split($$($nesting, 'LF'))
|
|
15613
|
-
}, $Cell_lines$
|
|
15712
|
+
}, $Cell_lines$26.$$arity = 0);
|
|
15614
15713
|
|
|
15615
|
-
Opal.def(self, '$source', $Cell_source$
|
|
15714
|
+
Opal.def(self, '$source', $Cell_source$27 = function $$source() {
|
|
15616
15715
|
var self = this;
|
|
15617
15716
|
|
|
15618
15717
|
return self.text
|
|
15619
|
-
}, $Cell_source$
|
|
15718
|
+
}, $Cell_source$27.$$arity = 0);
|
|
15620
15719
|
|
|
15621
|
-
Opal.def(self, '$file', $Cell_file$
|
|
15720
|
+
Opal.def(self, '$file', $Cell_file$28 = function $$file() {
|
|
15622
15721
|
var $a, self = this;
|
|
15623
15722
|
|
|
15624
15723
|
return ($truthy($a = self.source_location) ? self.source_location.$file() : $a)
|
|
15625
|
-
}, $Cell_file$
|
|
15724
|
+
}, $Cell_file$28.$$arity = 0);
|
|
15626
15725
|
|
|
15627
|
-
Opal.def(self, '$lineno', $Cell_lineno$
|
|
15726
|
+
Opal.def(self, '$lineno', $Cell_lineno$29 = function $$lineno() {
|
|
15628
15727
|
var $a, self = this;
|
|
15629
15728
|
|
|
15630
15729
|
return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a)
|
|
15631
|
-
}, $Cell_lineno$
|
|
15632
|
-
return (Opal.def(self, '$to_s', $Cell_to_s$
|
|
15633
|
-
var $a, $iter = $Cell_to_s$
|
|
15730
|
+
}, $Cell_lineno$29.$$arity = 0);
|
|
15731
|
+
return (Opal.def(self, '$to_s', $Cell_to_s$30 = function $$to_s() {
|
|
15732
|
+
var $a, $iter = $Cell_to_s$30.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
|
|
15634
15733
|
|
|
15635
|
-
if ($iter) $Cell_to_s$
|
|
15734
|
+
if ($iter) $Cell_to_s$30.$$p = null;
|
|
15636
15735
|
// Prepare super implicit arguments
|
|
15637
15736
|
for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
|
|
15638
15737
|
$zuper[$zuper_i] = arguments[$zuper_i];
|
|
15639
15738
|
}
|
|
15640
|
-
return "" + ($send(self, Opal.find_super_dispatcher(self, 'to_s', $Cell_to_s$
|
|
15641
|
-
}, $Cell_to_s$
|
|
15739
|
+
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) + "]"
|
|
15740
|
+
}, $Cell_to_s$30.$$arity = 0), nil) && 'to_s';
|
|
15642
15741
|
})($$($nesting, 'Table'), $$($nesting, 'AbstractBlock'), $nesting);
|
|
15643
15742
|
(function($base, $super, $parent_nesting) {
|
|
15644
15743
|
var self = $klass($base, $super, 'ParserContext');
|
|
15645
15744
|
|
|
15646
|
-
var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$
|
|
15745
|
+
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;
|
|
15647
15746
|
|
|
15648
15747
|
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;
|
|
15649
15748
|
|
|
@@ -15657,7 +15756,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15657
15756
|
self.$attr_reader("delimiter");
|
|
15658
15757
|
self.$attr_reader("delimiter_re");
|
|
15659
15758
|
|
|
15660
|
-
Opal.def(self, '$initialize', $ParserContext_initialize$
|
|
15759
|
+
Opal.def(self, '$initialize', $ParserContext_initialize$31 = function $$initialize(reader, table, attributes) {
|
|
15661
15760
|
var $a, $b, self = this, xsv = nil, sep = nil;
|
|
15662
15761
|
|
|
15663
15762
|
|
|
@@ -15712,37 +15811,37 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15712
15811
|
self.column_visits = 0;
|
|
15713
15812
|
self.current_row = [];
|
|
15714
15813
|
return (self.linenum = -1);
|
|
15715
|
-
}, $ParserContext_initialize$
|
|
15814
|
+
}, $ParserContext_initialize$31.$$arity = -3);
|
|
15716
15815
|
|
|
15717
|
-
Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$
|
|
15816
|
+
Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$32 = function(line) {
|
|
15718
15817
|
var self = this;
|
|
15719
15818
|
|
|
15720
15819
|
return line['$start_with?'](self.delimiter)
|
|
15721
|
-
}, $ParserContext_starts_with_delimiter$ques$
|
|
15820
|
+
}, $ParserContext_starts_with_delimiter$ques$32.$$arity = 1);
|
|
15722
15821
|
|
|
15723
|
-
Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$
|
|
15822
|
+
Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$33 = function $$match_delimiter(line) {
|
|
15724
15823
|
var self = this;
|
|
15725
15824
|
|
|
15726
15825
|
return self.delimiter_rx.$match(line)
|
|
15727
|
-
}, $ParserContext_match_delimiter$
|
|
15826
|
+
}, $ParserContext_match_delimiter$33.$$arity = 1);
|
|
15728
15827
|
|
|
15729
|
-
Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$
|
|
15828
|
+
Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$34 = function $$skip_past_delimiter(pre) {
|
|
15730
15829
|
var self = this;
|
|
15731
15830
|
|
|
15732
15831
|
|
|
15733
15832
|
self.buffer = "" + (self.buffer) + (pre) + (self.delimiter);
|
|
15734
15833
|
return nil;
|
|
15735
|
-
}, $ParserContext_skip_past_delimiter$
|
|
15834
|
+
}, $ParserContext_skip_past_delimiter$34.$$arity = 1);
|
|
15736
15835
|
|
|
15737
|
-
Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$
|
|
15836
|
+
Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$35 = function $$skip_past_escaped_delimiter(pre) {
|
|
15738
15837
|
var self = this;
|
|
15739
15838
|
|
|
15740
15839
|
|
|
15741
15840
|
self.buffer = "" + (self.buffer) + (pre.$chop()) + (self.delimiter);
|
|
15742
15841
|
return nil;
|
|
15743
|
-
}, $ParserContext_skip_past_escaped_delimiter$
|
|
15842
|
+
}, $ParserContext_skip_past_escaped_delimiter$35.$$arity = 1);
|
|
15744
15843
|
|
|
15745
|
-
Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$
|
|
15844
|
+
Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$36 = function(append) {
|
|
15746
15845
|
var $a, $b, self = this, record = nil, trailing_quote = nil;
|
|
15747
15846
|
|
|
15748
15847
|
|
|
@@ -15765,15 +15864,15 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15765
15864
|
} else {
|
|
15766
15865
|
return false
|
|
15767
15866
|
};
|
|
15768
|
-
}, $ParserContext_buffer_has_unclosed_quotes$ques$
|
|
15867
|
+
}, $ParserContext_buffer_has_unclosed_quotes$ques$36.$$arity = -1);
|
|
15769
15868
|
|
|
15770
|
-
Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$
|
|
15869
|
+
Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$37 = function $$take_cellspec() {
|
|
15771
15870
|
var self = this;
|
|
15772
15871
|
|
|
15773
15872
|
return self.cellspecs.$shift()
|
|
15774
|
-
}, $ParserContext_take_cellspec$
|
|
15873
|
+
}, $ParserContext_take_cellspec$37.$$arity = 0);
|
|
15775
15874
|
|
|
15776
|
-
Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$
|
|
15875
|
+
Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$38 = function $$push_cellspec(cellspec) {
|
|
15777
15876
|
var $a, self = this;
|
|
15778
15877
|
|
|
15779
15878
|
|
|
@@ -15783,37 +15882,37 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15783
15882
|
};
|
|
15784
15883
|
self.cellspecs['$<<'](($truthy($a = cellspec) ? $a : $hash2([], {})));
|
|
15785
15884
|
return nil;
|
|
15786
|
-
}, $ParserContext_push_cellspec$
|
|
15885
|
+
}, $ParserContext_push_cellspec$38.$$arity = -1);
|
|
15787
15886
|
|
|
15788
|
-
Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$
|
|
15887
|
+
Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$39 = function $$keep_cell_open() {
|
|
15789
15888
|
var self = this;
|
|
15790
15889
|
|
|
15791
15890
|
|
|
15792
15891
|
self.cell_open = true;
|
|
15793
15892
|
return nil;
|
|
15794
|
-
}, $ParserContext_keep_cell_open$
|
|
15893
|
+
}, $ParserContext_keep_cell_open$39.$$arity = 0);
|
|
15795
15894
|
|
|
15796
|
-
Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$
|
|
15895
|
+
Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$40 = function $$mark_cell_closed() {
|
|
15797
15896
|
var self = this;
|
|
15798
15897
|
|
|
15799
15898
|
|
|
15800
15899
|
self.cell_open = false;
|
|
15801
15900
|
return nil;
|
|
15802
|
-
}, $ParserContext_mark_cell_closed$
|
|
15901
|
+
}, $ParserContext_mark_cell_closed$40.$$arity = 0);
|
|
15803
15902
|
|
|
15804
|
-
Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$
|
|
15903
|
+
Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$41 = function() {
|
|
15805
15904
|
var self = this;
|
|
15806
15905
|
|
|
15807
15906
|
return self.cell_open
|
|
15808
|
-
}, $ParserContext_cell_open$ques$
|
|
15907
|
+
}, $ParserContext_cell_open$ques$41.$$arity = 0);
|
|
15809
15908
|
|
|
15810
|
-
Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$
|
|
15909
|
+
Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$42 = function() {
|
|
15811
15910
|
var self = this;
|
|
15812
15911
|
|
|
15813
15912
|
return self.cell_open['$!']()
|
|
15814
|
-
}, $ParserContext_cell_closed$ques$
|
|
15913
|
+
}, $ParserContext_cell_closed$ques$42.$$arity = 0);
|
|
15815
15914
|
|
|
15816
|
-
Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$
|
|
15915
|
+
Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$43 = function $$close_open_cell(next_cellspec) {
|
|
15817
15916
|
var self = this;
|
|
15818
15917
|
|
|
15819
15918
|
|
|
@@ -15826,11 +15925,11 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15826
15925
|
self.$close_cell(true)};
|
|
15827
15926
|
self.$advance();
|
|
15828
15927
|
return nil;
|
|
15829
|
-
}, $ParserContext_close_open_cell$
|
|
15928
|
+
}, $ParserContext_close_open_cell$43.$$arity = -1);
|
|
15830
15929
|
|
|
15831
|
-
Opal.def(self, '$close_cell', $ParserContext_close_cell$
|
|
15930
|
+
Opal.def(self, '$close_cell', $ParserContext_close_cell$44 = function $$close_cell(eol) {try {
|
|
15832
15931
|
|
|
15833
|
-
var $a, $b, $$
|
|
15932
|
+
var $a, $b, $$45, self = this, cell_text = nil, cellspec = nil, repeat = nil;
|
|
15834
15933
|
|
|
15835
15934
|
|
|
15836
15935
|
|
|
@@ -15868,7 +15967,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15868
15967
|
cell_text = cell_text.$squeeze("\"")
|
|
15869
15968
|
}};
|
|
15870
15969
|
};
|
|
15871
|
-
$send((1), 'upto', [repeat], ($$
|
|
15970
|
+
$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;
|
|
15872
15971
|
if (self.colcount == null) self.colcount = nil;
|
|
15873
15972
|
if (self.table == null) self.table = nil;
|
|
15874
15973
|
if (self.current_row == null) self.current_row = nil;
|
|
@@ -15887,7 +15986,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15887
15986
|
if ($truthy(($truthy($c = ($truthy($d = cellspec) ? cellspec['$key?']("colspan") : $d)) ? $rb_gt((extra_cols = $rb_minus(cellspec['$[]']("colspan").$to_i(), 1)), 0) : $c))) {
|
|
15888
15987
|
|
|
15889
15988
|
offset = self.table.$columns().$size();
|
|
15890
|
-
$send(extra_cols, 'times', [], ($$
|
|
15989
|
+
$send(extra_cols, 'times', [], ($$46 = function(j){var self = $$46.$$s || this;
|
|
15891
15990
|
if (self.table == null) self.table = nil;
|
|
15892
15991
|
|
|
15893
15992
|
|
|
@@ -15895,7 +15994,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15895
15994
|
if (j == null) {
|
|
15896
15995
|
j = nil;
|
|
15897
15996
|
};
|
|
15898
|
-
return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$
|
|
15997
|
+
return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$46.$$s = self, $$46.$$arity = 1, $$46));};
|
|
15899
15998
|
} else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) {
|
|
15900
15999
|
} else {
|
|
15901
16000
|
|
|
@@ -15914,14 +16013,14 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15914
16013
|
return self.$close_row()
|
|
15915
16014
|
} else {
|
|
15916
16015
|
return nil
|
|
15917
|
-
};}, $$
|
|
16016
|
+
};}, $$45.$$s = self, $$45.$$arity = 1, $$45));
|
|
15918
16017
|
self.cell_open = false;
|
|
15919
16018
|
return nil;
|
|
15920
16019
|
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
|
|
15921
|
-
}, $ParserContext_close_cell$
|
|
16020
|
+
}, $ParserContext_close_cell$44.$$arity = -1);
|
|
15922
16021
|
self.$private();
|
|
15923
16022
|
|
|
15924
|
-
Opal.def(self, '$close_row', $ParserContext_close_row$
|
|
16023
|
+
Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row() {
|
|
15925
16024
|
var $a, self = this, $writer = nil;
|
|
15926
16025
|
|
|
15927
16026
|
|
|
@@ -15933,13 +16032,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15933
16032
|
self.active_rowspans.$shift();
|
|
15934
16033
|
($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
15935
16034
|
return nil;
|
|
15936
|
-
}, $ParserContext_close_row$
|
|
16035
|
+
}, $ParserContext_close_row$47.$$arity = 0);
|
|
15937
16036
|
|
|
15938
|
-
Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$
|
|
15939
|
-
var $$
|
|
16037
|
+
Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) {
|
|
16038
|
+
var $$49, self = this;
|
|
15940
16039
|
|
|
15941
16040
|
|
|
15942
|
-
$send((1), 'upto', [$rb_minus(rowspan, 1)], ($$
|
|
16041
|
+
$send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil;
|
|
15943
16042
|
if (self.active_rowspans == null) self.active_rowspans = nil;
|
|
15944
16043
|
|
|
15945
16044
|
|
|
@@ -15949,26 +16048,26 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
15949
16048
|
};
|
|
15950
16049
|
$writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)];
|
|
15951
16050
|
$send(self.active_rowspans, '[]=', Opal.to_a($writer));
|
|
15952
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$
|
|
16051
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49));
|
|
15953
16052
|
return nil;
|
|
15954
|
-
}, $ParserContext_activate_rowspan$
|
|
16053
|
+
}, $ParserContext_activate_rowspan$48.$$arity = 2);
|
|
15955
16054
|
|
|
15956
|
-
Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$
|
|
16055
|
+
Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() {
|
|
15957
16056
|
var $a, self = this;
|
|
15958
16057
|
|
|
15959
16058
|
return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount))
|
|
15960
|
-
}, $ParserContext_end_of_row$ques$
|
|
16059
|
+
}, $ParserContext_end_of_row$ques$50.$$arity = 0);
|
|
15961
16060
|
|
|
15962
|
-
Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$
|
|
16061
|
+
Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() {
|
|
15963
16062
|
var self = this;
|
|
15964
16063
|
|
|
15965
16064
|
return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0))
|
|
15966
|
-
}, $ParserContext_effective_column_visits$
|
|
15967
|
-
return (Opal.def(self, '$advance', $ParserContext_advance$
|
|
16065
|
+
}, $ParserContext_effective_column_visits$51.$$arity = 0);
|
|
16066
|
+
return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() {
|
|
15968
16067
|
var self = this;
|
|
15969
16068
|
|
|
15970
16069
|
return (self.linenum = $rb_plus(self.linenum, 1))
|
|
15971
|
-
}, $ParserContext_advance$
|
|
16070
|
+
}, $ParserContext_advance$52.$$arity = 0), nil) && 'advance';
|
|
15972
16071
|
})($$($nesting, 'Table'), null, $nesting);
|
|
15973
16072
|
})($nesting[0], $nesting)
|
|
15974
16073
|
};
|
|
@@ -16032,205 +16131,207 @@ Opal.modules["asciidoctor/load"] = function(Opal) {
|
|
|
16032
16131
|
}
|
|
16033
16132
|
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;
|
|
16034
16133
|
|
|
16035
|
-
Opal.add_stubs(['$
|
|
16134
|
+
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']);
|
|
16036
16135
|
return (function($base, $parent_nesting) {
|
|
16037
16136
|
var self = $module($base, 'Asciidoctor');
|
|
16038
16137
|
|
|
16039
|
-
var $nesting = [self].concat($parent_nesting)
|
|
16138
|
+
var $nesting = [self].concat($parent_nesting);
|
|
16040
16139
|
|
|
16041
|
-
|
|
16042
|
-
|
|
16043
|
-
|
|
16044
|
-
Opal.def(self, '$load', $Asciidoctor_load$1 = function $$load(input, options) {
|
|
16045
|
-
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;
|
|
16140
|
+
(function(self, $parent_nesting) {
|
|
16141
|
+
var $nesting = [self].concat($parent_nesting), $load$1, $load_file$8;
|
|
16046
16142
|
|
|
16047
16143
|
|
|
16048
16144
|
|
|
16049
|
-
|
|
16050
|
-
|
|
16051
|
-
};
|
|
16052
|
-
try {
|
|
16053
|
-
|
|
16054
|
-
options = options.$merge();
|
|
16055
|
-
if ($truthy((timings = options['$[]']("timings")))) {
|
|
16056
|
-
timings.$start("read")};
|
|
16057
|
-
if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
|
|
16058
|
-
|
|
16059
|
-
$writer = [logger];
|
|
16060
|
-
$send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
|
|
16061
|
-
$writer[$rb_minus($writer["length"], 1)];};
|
|
16062
|
-
if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
|
|
16063
|
-
attrs = $hash2([], {})
|
|
16064
|
-
} else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
|
|
16065
|
-
attrs = attrs.$merge()
|
|
16066
|
-
} 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))) {
|
|
16067
|
-
attrs = attrs.$dup()
|
|
16068
|
-
} else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
|
|
16069
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
|
|
16145
|
+
Opal.def(self, '$load', $load$1 = function $$load(input, options) {
|
|
16146
|
+
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;
|
|
16070
16147
|
|
|
16148
|
+
|
|
16149
|
+
|
|
16150
|
+
if (options == null) {
|
|
16151
|
+
options = $hash2([], {});
|
|
16152
|
+
};
|
|
16153
|
+
try {
|
|
16071
16154
|
|
|
16155
|
+
options = options.$merge();
|
|
16156
|
+
if ($truthy((timings = options['$[]']("timings")))) {
|
|
16157
|
+
timings.$start("read")};
|
|
16158
|
+
if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
|
|
16072
16159
|
|
|
16073
|
-
|
|
16074
|
-
|
|
16075
|
-
};
|
|
16076
|
-
|
|
16160
|
+
$writer = [logger];
|
|
16161
|
+
$send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
|
|
16162
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
16163
|
+
if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
|
|
16164
|
+
attrs = $hash2([], {})
|
|
16165
|
+
} else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
|
|
16166
|
+
attrs = attrs.$merge()
|
|
16167
|
+
} 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))) {
|
|
16168
|
+
attrs = attrs.$dup()
|
|
16169
|
+
} else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
|
|
16170
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
|
|
16077
16171
|
|
|
16078
16172
|
|
|
16079
16173
|
|
|
16080
|
-
if (
|
|
16081
|
-
|
|
16174
|
+
if (accum == null) {
|
|
16175
|
+
accum = nil;
|
|
16082
16176
|
};
|
|
16083
|
-
$
|
|
16084
|
-
|
|
16085
|
-
$writer = [k, v];
|
|
16086
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
16087
|
-
return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
|
|
16088
|
-
} else if ($truthy($$$('::', 'String')['$==='](attrs))) {
|
|
16089
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
|
|
16177
|
+
return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
|
|
16090
16178
|
|
|
16091
|
-
|
|
16092
|
-
|
|
16093
|
-
|
|
16094
|
-
|
|
16095
|
-
|
|
16096
|
-
|
|
16179
|
+
|
|
16180
|
+
|
|
16181
|
+
if (entry == null) {
|
|
16182
|
+
entry = nil;
|
|
16183
|
+
};
|
|
16184
|
+
$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;
|
|
16185
|
+
|
|
16186
|
+
$writer = [k, v];
|
|
16187
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
16188
|
+
return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
|
|
16189
|
+
} else if ($truthy($$$('::', 'String')['$==='](attrs))) {
|
|
16190
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
|
|
16097
16191
|
|
|
16098
16192
|
|
|
16099
16193
|
|
|
16100
|
-
if (
|
|
16101
|
-
|
|
16194
|
+
if (accum == null) {
|
|
16195
|
+
accum = nil;
|
|
16102
16196
|
};
|
|
16103
|
-
$
|
|
16104
|
-
|
|
16105
|
-
$writer = [k, v];
|
|
16106
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
16107
|
-
return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
|
|
16108
|
-
} else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
|
|
16109
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
|
|
16197
|
+
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;
|
|
16110
16198
|
|
|
16111
|
-
|
|
16112
|
-
|
|
16113
|
-
|
|
16114
|
-
|
|
16115
|
-
|
|
16116
|
-
|
|
16199
|
+
|
|
16200
|
+
|
|
16201
|
+
if (entry == null) {
|
|
16202
|
+
entry = nil;
|
|
16203
|
+
};
|
|
16204
|
+
$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;
|
|
16205
|
+
|
|
16206
|
+
$writer = [k, v];
|
|
16207
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
16208
|
+
return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
|
|
16209
|
+
} else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
|
|
16210
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
|
|
16117
16211
|
|
|
16118
16212
|
|
|
16119
16213
|
|
|
16120
|
-
if (
|
|
16121
|
-
|
|
16214
|
+
if (accum == null) {
|
|
16215
|
+
accum = nil;
|
|
16122
16216
|
};
|
|
16123
|
-
$
|
|
16124
|
-
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
|
|
16130
|
-
|
|
16131
|
-
|
|
16132
|
-
|
|
16133
|
-
|
|
16134
|
-
|
|
16135
|
-
|
|
16136
|
-
$writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
|
|
16137
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
16138
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
16139
|
-
|
|
16140
|
-
$writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
|
|
16141
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
16142
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
16143
|
-
|
|
16144
|
-
$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)]))];
|
|
16145
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
16146
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
16147
|
-
source = input.$read();
|
|
16148
|
-
} else if ($truthy(input['$respond_to?']("read"))) {
|
|
16149
|
-
|
|
16150
|
-
try {
|
|
16151
|
-
input.$rewind()
|
|
16152
|
-
} catch ($err) {
|
|
16153
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
16154
|
-
try {
|
|
16155
|
-
nil
|
|
16156
|
-
} finally { Opal.pop_exception() }
|
|
16157
|
-
} else { throw $err; }
|
|
16217
|
+
return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this;
|
|
16218
|
+
|
|
16219
|
+
|
|
16220
|
+
|
|
16221
|
+
if (k == null) {
|
|
16222
|
+
k = nil;
|
|
16223
|
+
};
|
|
16224
|
+
$writer = [k, attrs['$[]'](k)];
|
|
16225
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
16226
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6))
|
|
16227
|
+
} else {
|
|
16228
|
+
self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
|
|
16158
16229
|
};
|
|
16159
|
-
|
|
16160
|
-
|
|
16161
|
-
|
|
16162
|
-
|
|
16163
|
-
|
|
16164
|
-
|
|
16165
|
-
|
|
16166
|
-
|
|
16167
|
-
|
|
16168
|
-
|
|
16169
|
-
timings.$start("parse");};
|
|
16170
|
-
|
|
16171
|
-
$writer = ["attributes", attrs];
|
|
16172
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
16173
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
16174
|
-
doc = (function() {if (options['$[]']("parse")['$=='](false)) {
|
|
16175
|
-
|
|
16176
|
-
return $$($nesting, 'Document').$new(source, options);
|
|
16177
|
-
} else {
|
|
16178
|
-
return $$($nesting, 'Document').$new(source, options).$parse()
|
|
16179
|
-
}; return nil; })();
|
|
16180
|
-
if ($truthy(timings)) {
|
|
16181
|
-
timings.$record("parse")};
|
|
16182
|
-
return doc;
|
|
16183
|
-
} catch ($err) {
|
|
16184
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
|
|
16185
|
-
try {
|
|
16230
|
+
if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
16231
|
+
|
|
16232
|
+
|
|
16233
|
+
$writer = ["input_mtime", input.$mtime()];
|
|
16234
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16235
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
16236
|
+
|
|
16237
|
+
$writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
|
|
16238
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
16239
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
16186
16240
|
|
|
16241
|
+
$writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
|
|
16242
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
16243
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
16244
|
+
|
|
16245
|
+
$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)]))];
|
|
16246
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
16247
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
16248
|
+
source = input.$read();
|
|
16249
|
+
} else if ($truthy(input['$respond_to?']("read"))) {
|
|
16187
16250
|
|
|
16188
16251
|
try {
|
|
16189
|
-
|
|
16190
|
-
context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
|
|
16191
|
-
if ($truthy(ex['$respond_to?']("exception"))) {
|
|
16192
|
-
|
|
16193
|
-
wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
|
|
16194
|
-
wrapped_ex.$set_backtrace(ex.$backtrace());
|
|
16195
|
-
wrapped_ex.stack = ex.stack;
|
|
16196
|
-
} else {
|
|
16197
|
-
|
|
16198
|
-
wrapped_ex = ex.$class().$new(context, ex);
|
|
16199
|
-
|
|
16200
|
-
$writer = [ex.$stack_trace()];
|
|
16201
|
-
$send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
|
|
16202
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
16203
|
-
};
|
|
16252
|
+
input.$rewind()
|
|
16204
16253
|
} catch ($err) {
|
|
16205
16254
|
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
16206
16255
|
try {
|
|
16207
|
-
|
|
16256
|
+
nil
|
|
16208
16257
|
} finally { Opal.pop_exception() }
|
|
16209
16258
|
} else { throw $err; }
|
|
16210
|
-
}
|
|
16211
|
-
|
|
16212
|
-
}
|
|
16213
|
-
|
|
16214
|
-
|
|
16215
|
-
|
|
16216
|
-
|
|
16217
|
-
|
|
16218
|
-
|
|
16219
|
-
|
|
16220
|
-
|
|
16221
|
-
|
|
16222
|
-
|
|
16223
|
-
|
|
16224
|
-
|
|
16225
|
-
|
|
16259
|
+
};
|
|
16260
|
+
source = input.$read();
|
|
16261
|
+
} else if ($truthy($$$('::', 'String')['$==='](input))) {
|
|
16262
|
+
source = input
|
|
16263
|
+
} else if ($truthy($$$('::', 'Array')['$==='](input))) {
|
|
16264
|
+
source = input.$drop(0)
|
|
16265
|
+
} else if ($truthy(input)) {
|
|
16266
|
+
self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
|
|
16267
|
+
if ($truthy(timings)) {
|
|
16268
|
+
|
|
16269
|
+
timings.$record("read");
|
|
16270
|
+
timings.$start("parse");};
|
|
16271
|
+
|
|
16272
|
+
$writer = ["attributes", attrs];
|
|
16273
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16274
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
16275
|
+
doc = (function() {if (options['$[]']("parse")['$=='](false)) {
|
|
16276
|
+
|
|
16277
|
+
return $$($nesting, 'Document').$new(source, options);
|
|
16278
|
+
} else {
|
|
16279
|
+
return $$($nesting, 'Document').$new(source, options).$parse()
|
|
16280
|
+
}; return nil; })();
|
|
16281
|
+
if ($truthy(timings)) {
|
|
16282
|
+
timings.$record("parse")};
|
|
16283
|
+
return doc;
|
|
16284
|
+
} catch ($err) {
|
|
16285
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
|
|
16286
|
+
try {
|
|
16287
|
+
|
|
16288
|
+
|
|
16289
|
+
try {
|
|
16290
|
+
|
|
16291
|
+
context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
|
|
16292
|
+
if ($truthy(ex['$respond_to?']("exception"))) {
|
|
16293
|
+
|
|
16294
|
+
wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
|
|
16295
|
+
wrapped_ex.$set_backtrace(ex.$backtrace());
|
|
16296
|
+
wrapped_ex.stack = ex.stack;
|
|
16297
|
+
} else {
|
|
16298
|
+
|
|
16299
|
+
wrapped_ex = ex.$class().$new(context, ex);
|
|
16300
|
+
|
|
16301
|
+
$writer = [ex.$stack_trace()];
|
|
16302
|
+
$send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
|
|
16303
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
16304
|
+
};
|
|
16305
|
+
} catch ($err) {
|
|
16306
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
16307
|
+
try {
|
|
16308
|
+
wrapped_ex = ex
|
|
16309
|
+
} finally { Opal.pop_exception() }
|
|
16310
|
+
} else { throw $err; }
|
|
16311
|
+
};;
|
|
16312
|
+
return self.$raise(wrapped_ex);
|
|
16313
|
+
} finally { Opal.pop_exception() }
|
|
16314
|
+
} else { throw $err; }
|
|
16315
|
+
};
|
|
16316
|
+
}, $load$1.$$arity = -2);
|
|
16317
|
+
return (Opal.def(self, '$load_file', $load_file$8 = function $$load_file(filename, options) {
|
|
16318
|
+
var $$9, self = this;
|
|
16226
16319
|
|
|
16227
|
-
|
|
16228
16320
|
|
|
16229
|
-
|
|
16230
|
-
|
|
16321
|
+
|
|
16322
|
+
if (options == null) {
|
|
16323
|
+
options = $hash2([], {});
|
|
16231
16324
|
};
|
|
16232
|
-
return
|
|
16233
|
-
|
|
16325
|
+
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this;
|
|
16326
|
+
|
|
16327
|
+
|
|
16328
|
+
|
|
16329
|
+
if (file == null) {
|
|
16330
|
+
file = nil;
|
|
16331
|
+
};
|
|
16332
|
+
return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9));
|
|
16333
|
+
}, $load_file$8.$$arity = -2), nil) && 'load_file';
|
|
16334
|
+
})(Opal.get_singleton_class(self), $nesting)
|
|
16234
16335
|
})($nesting[0], $nesting)
|
|
16235
16336
|
};
|
|
16236
16337
|
|
|
@@ -16247,195 +16348,203 @@ Opal.modules["asciidoctor/convert"] = function(Opal) {
|
|
|
16247
16348
|
}
|
|
16248
16349
|
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;
|
|
16249
16350
|
|
|
16250
|
-
Opal.add_stubs(['$
|
|
16351
|
+
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']);
|
|
16251
16352
|
return (function($base, $parent_nesting) {
|
|
16252
16353
|
var self = $module($base, 'Asciidoctor');
|
|
16253
16354
|
|
|
16254
|
-
var $nesting = [self].concat($parent_nesting)
|
|
16355
|
+
var $nesting = [self].concat($parent_nesting);
|
|
16255
16356
|
|
|
16256
|
-
|
|
16257
|
-
|
|
16258
|
-
|
|
16259
|
-
Opal.def(self, '$convert', $Asciidoctor_convert$1 = function $$convert(input, options) {
|
|
16260
|
-
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;
|
|
16357
|
+
(function(self, $parent_nesting) {
|
|
16358
|
+
var $nesting = [self].concat($parent_nesting), $convert$1, $convert_file$2;
|
|
16261
16359
|
|
|
16262
16360
|
|
|
16263
16361
|
|
|
16264
|
-
|
|
16265
|
-
|
|
16266
|
-
|
|
16267
|
-
(options = options.$merge()).$delete("parse");
|
|
16268
|
-
to_dir = options.$delete("to_dir");
|
|
16269
|
-
mkdirs = options.$delete("mkdirs");
|
|
16270
|
-
$case = (to_file = options.$delete("to_file"));
|
|
16271
|
-
if (true['$===']($case) || nil['$===']($case)) {
|
|
16272
|
-
if ($truthy((write_to_target = to_dir))) {
|
|
16273
|
-
} else if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
16274
|
-
sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
|
|
16275
|
-
to_file = nil;}
|
|
16276
|
-
else if (false['$===']($case)) {to_file = nil}
|
|
16277
|
-
else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
|
|
16278
|
-
else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
|
|
16279
|
-
} else {
|
|
16362
|
+
Opal.def(self, '$convert', $convert$1 = function $$convert(input, options) {
|
|
16363
|
+
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;
|
|
16364
|
+
|
|
16280
16365
|
|
|
16281
|
-
|
|
16282
|
-
|
|
16283
|
-
|
|
16284
|
-
|
|
16285
|
-
|
|
16286
|
-
|
|
16287
|
-
|
|
16288
|
-
$
|
|
16289
|
-
$
|
|
16290
|
-
$
|
|
16291
|
-
|
|
16292
|
-
|
|
16293
|
-
|
|
16294
|
-
|
|
16295
|
-
|
|
16296
|
-
|
|
16297
|
-
|
|
16298
|
-
|
|
16299
|
-
|
|
16300
|
-
|
|
16301
|
-
|
|
16302
|
-
|
|
16303
|
-
|
|
16304
|
-
|
|
16305
|
-
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path($$$('::', 'File').$join(to_dir, to_file)))];
|
|
16306
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
16307
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
16308
|
-
} else {
|
|
16309
|
-
|
|
16310
|
-
$writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
|
|
16311
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
16312
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
16313
|
-
}
|
|
16314
|
-
} else if ($truthy(to_file)) {
|
|
16366
|
+
|
|
16367
|
+
if (options == null) {
|
|
16368
|
+
options = $hash2([], {});
|
|
16369
|
+
};
|
|
16370
|
+
(options = options.$merge()).$delete("parse");
|
|
16371
|
+
to_dir = options.$delete("to_dir");
|
|
16372
|
+
mkdirs = options.$delete("mkdirs");
|
|
16373
|
+
$case = (to_file = options.$delete("to_file"));
|
|
16374
|
+
if (true['$===']($case) || nil['$===']($case)) {
|
|
16375
|
+
if ($truthy((write_to_target = to_dir))) {
|
|
16376
|
+
} else if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
16377
|
+
sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
|
|
16378
|
+
to_file = nil;}
|
|
16379
|
+
else if (false['$===']($case)) {to_file = nil}
|
|
16380
|
+
else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
|
|
16381
|
+
else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
|
|
16382
|
+
} else {
|
|
16383
|
+
|
|
16384
|
+
$writer = ["to_file", (write_to_target = to_file)];
|
|
16385
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16386
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
16387
|
+
}};
|
|
16388
|
+
if ($truthy(options['$key?']("standalone"))) {
|
|
16389
|
+
} else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
|
|
16315
16390
|
|
|
16316
|
-
$writer = ["
|
|
16391
|
+
$writer = ["standalone", options.$fetch("header_footer", true)];
|
|
16317
16392
|
$send(options, '[]=', Opal.to_a($writer));
|
|
16318
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
16319
|
-
|
|
16320
|
-
if ($truthy(sibling_path)) {
|
|
16321
|
-
|
|
16322
|
-
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
|
|
16323
|
-
if (outfile['$=='](sibling_path)) {
|
|
16324
|
-
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
16325
|
-
} else if ($truthy(write_to_target)) {
|
|
16326
|
-
|
|
16327
|
-
working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
|
|
16393
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
16394
|
+
} else if ($truthy(options['$key?']("header_footer"))) {
|
|
16328
16395
|
|
|
16329
|
-
|
|
16330
|
-
|
|
16331
|
-
|
|
16332
|
-
|
|
16333
|
-
jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
16334
|
-
return working_dir
|
|
16335
|
-
} else {
|
|
16336
|
-
return nil
|
|
16337
|
-
}; return nil; })();
|
|
16338
|
-
if ($truthy(to_dir)) {
|
|
16396
|
+
$writer = ["standalone", options['$[]']("header_footer")];
|
|
16397
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16398
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
16399
|
+
if ($truthy(sibling_path)) {
|
|
16339
16400
|
|
|
16340
|
-
|
|
16341
|
-
|
|
16401
|
+
$writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
|
|
16402
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16403
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
16404
|
+
} else if ($truthy(write_to_target)) {
|
|
16405
|
+
if ($truthy(to_dir)) {
|
|
16406
|
+
if ($truthy(to_file)) {
|
|
16407
|
+
|
|
16408
|
+
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file, to_dir))];
|
|
16409
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16410
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
16411
|
+
} else {
|
|
16412
|
+
|
|
16413
|
+
$writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
|
|
16414
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16415
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
16416
|
+
}
|
|
16417
|
+
} else if ($truthy(to_file)) {
|
|
16342
16418
|
|
|
16343
|
-
|
|
16344
|
-
|
|
16419
|
+
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
|
|
16420
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
16421
|
+
$writer[$rb_minus($writer["length"], 1)];}};
|
|
16422
|
+
doc = self.$load(input, options);
|
|
16423
|
+
if ($truthy(sibling_path)) {
|
|
16424
|
+
|
|
16425
|
+
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
|
|
16426
|
+
if (outfile['$=='](sibling_path)) {
|
|
16427
|
+
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
16428
|
+
} else if ($truthy(write_to_target)) {
|
|
16429
|
+
|
|
16430
|
+
working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
|
|
16431
|
+
|
|
16432
|
+
return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
|
|
16433
|
+
} else {
|
|
16434
|
+
return $$$('::', 'Dir').$pwd()
|
|
16435
|
+
}; return nil; })();
|
|
16436
|
+
jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
16437
|
+
return working_dir
|
|
16345
16438
|
} else {
|
|
16346
|
-
|
|
16439
|
+
return nil
|
|
16440
|
+
}; return nil; })();
|
|
16441
|
+
if ($truthy(to_dir)) {
|
|
16442
|
+
|
|
16443
|
+
outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
16444
|
+
if ($truthy(to_file)) {
|
|
16445
|
+
|
|
16446
|
+
outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
16447
|
+
outdir = $$$('::', 'File').$dirname(outfile);
|
|
16448
|
+
} else {
|
|
16449
|
+
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
|
|
16450
|
+
};
|
|
16451
|
+
} else if ($truthy(to_file)) {
|
|
16452
|
+
|
|
16453
|
+
outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
16454
|
+
outdir = $$$('::', 'File').$dirname(outfile);};
|
|
16455
|
+
if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
|
|
16456
|
+
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
16457
|
+
if ($truthy(mkdirs)) {
|
|
16458
|
+
$$($nesting, 'Helpers').$mkdir_p(outdir)
|
|
16459
|
+
} else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
|
|
16460
|
+
} else {
|
|
16461
|
+
self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
|
|
16347
16462
|
};
|
|
16348
|
-
} else
|
|
16463
|
+
} else {
|
|
16349
16464
|
|
|
16350
|
-
outfile =
|
|
16351
|
-
outdir =
|
|
16352
|
-
|
|
16353
|
-
|
|
16354
|
-
|
|
16355
|
-
$$($nesting, 'Helpers').$mkdir_p(outdir)
|
|
16356
|
-
} else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
|
|
16465
|
+
outfile = to_file;
|
|
16466
|
+
outdir = nil;
|
|
16467
|
+
};
|
|
16468
|
+
if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
|
|
16469
|
+
output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
|
|
16357
16470
|
} else {
|
|
16358
|
-
|
|
16471
|
+
output = doc.$convert()
|
|
16359
16472
|
};
|
|
16360
|
-
|
|
16361
|
-
|
|
16362
|
-
outfile = to_file;
|
|
16363
|
-
outdir = nil;
|
|
16364
|
-
};
|
|
16365
|
-
if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
|
|
16366
|
-
output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
|
|
16367
|
-
} else {
|
|
16368
|
-
output = doc.$convert()
|
|
16369
|
-
};
|
|
16370
|
-
if ($truthy(outfile)) {
|
|
16371
|
-
|
|
16372
|
-
doc.$write(output, outfile);
|
|
16373
|
-
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))) {
|
|
16473
|
+
if ($truthy(outfile)) {
|
|
16374
16474
|
|
|
16375
|
-
|
|
16376
|
-
|
|
16377
|
-
copy_asciidoctor_stylesheet = true
|
|
16378
|
-
} else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
|
|
16379
|
-
copy_user_stylesheet = true}};
|
|
16380
|
-
copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
|
|
16381
|
-
if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
|
|
16475
|
+
doc.$write(output, outfile);
|
|
16476
|
+
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))) {
|
|
16382
16477
|
|
|
16383
|
-
|
|
16384
|
-
|
|
16385
|
-
|
|
16386
|
-
|
|
16387
|
-
|
|
16388
|
-
|
|
16389
|
-
|
|
16390
|
-
} else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
|
|
16391
|
-
} else {
|
|
16392
|
-
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
|
|
16393
|
-
};
|
|
16394
|
-
if ($truthy(copy_asciidoctor_stylesheet)) {
|
|
16395
|
-
$$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
|
|
16396
|
-
} else if ($truthy(copy_user_stylesheet)) {
|
|
16478
|
+
if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
|
|
16479
|
+
if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
|
|
16480
|
+
copy_asciidoctor_stylesheet = true
|
|
16481
|
+
} else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
|
|
16482
|
+
copy_user_stylesheet = true}};
|
|
16483
|
+
copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
|
|
16484
|
+
if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
|
|
16397
16485
|
|
|
16398
|
-
if ($truthy((
|
|
16399
|
-
stylesheet_src = doc.$normalize_system_path(stylesheet)
|
|
16400
|
-
} else {
|
|
16401
|
-
stylesheet_src = doc.$normalize_system_path(stylesheet_src)
|
|
16402
|
-
};
|
|
16403
|
-
stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
16486
|
+
stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
16404
16487
|
return outdir
|
|
16405
16488
|
} else {
|
|
16406
16489
|
return nil
|
|
16407
16490
|
}; return nil; })());
|
|
16408
|
-
if ($truthy(
|
|
16409
|
-
|
|
16410
|
-
|
|
16411
|
-
|
|
16412
|
-
|
|
16413
|
-
|
|
16414
|
-
|
|
16415
|
-
|
|
16416
|
-
|
|
16417
|
-
|
|
16418
|
-
|
|
16419
|
-
|
|
16420
|
-
|
|
16421
|
-
|
|
16491
|
+
if ($truthy(mkdirs)) {
|
|
16492
|
+
$$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
|
|
16493
|
+
} else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
|
|
16494
|
+
} else {
|
|
16495
|
+
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
|
|
16496
|
+
};
|
|
16497
|
+
if ($truthy(copy_asciidoctor_stylesheet)) {
|
|
16498
|
+
$$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
|
|
16499
|
+
} else if ($truthy(copy_user_stylesheet)) {
|
|
16500
|
+
|
|
16501
|
+
if ($truthy(($truthy($a = (stylesheet_src = doc.$attr("copycss"))['$==']("")) ? $a : stylesheet_src['$=='](true)))) {
|
|
16502
|
+
stylesheet_src = doc.$normalize_system_path(stylesheet)
|
|
16503
|
+
} else {
|
|
16504
|
+
stylesheet_src = doc.$normalize_system_path(stylesheet_src.$to_s())
|
|
16505
|
+
};
|
|
16506
|
+
stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
16507
|
+
return outdir
|
|
16508
|
+
} else {
|
|
16509
|
+
return nil
|
|
16510
|
+
}; return nil; })());
|
|
16511
|
+
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))) {
|
|
16512
|
+
|
|
16513
|
+
if ($truthy(($truthy($a = (stylesheet_outdir = $$$('::', 'File').$dirname(stylesheet_dest))['$!='](stylesoutdir)) ? $$$('::', 'File')['$directory?'](stylesheet_outdir)['$!']() : $a))) {
|
|
16514
|
+
if ($truthy(mkdirs)) {
|
|
16515
|
+
$$($nesting, 'Helpers').$mkdir_p(stylesheet_outdir)
|
|
16516
|
+
} else {
|
|
16517
|
+
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesheet_outdir) + " (hint: set :mkdirs option)")
|
|
16518
|
+
}};
|
|
16519
|
+
$$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}));};};
|
|
16520
|
+
if ($truthy(copy_syntax_hl_stylesheet)) {
|
|
16521
|
+
syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
|
|
16522
|
+
return doc;
|
|
16523
|
+
} else {
|
|
16524
|
+
return output
|
|
16525
|
+
};
|
|
16526
|
+
}, $convert$1.$$arity = -2);
|
|
16422
16527
|
|
|
16423
|
-
|
|
16424
|
-
|
|
16425
|
-
};
|
|
16426
|
-
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
|
|
16528
|
+
Opal.def(self, '$convert_file', $convert_file$2 = function $$convert_file(filename, options) {
|
|
16529
|
+
var $$3, self = this;
|
|
16427
16530
|
|
|
16428
|
-
|
|
16429
16531
|
|
|
16430
|
-
|
|
16431
|
-
|
|
16532
|
+
|
|
16533
|
+
if (options == null) {
|
|
16534
|
+
options = $hash2([], {});
|
|
16432
16535
|
};
|
|
16433
|
-
return
|
|
16434
|
-
|
|
16435
|
-
|
|
16436
|
-
|
|
16437
|
-
|
|
16438
|
-
|
|
16536
|
+
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
|
|
16537
|
+
|
|
16538
|
+
|
|
16539
|
+
|
|
16540
|
+
if (file == null) {
|
|
16541
|
+
file = nil;
|
|
16542
|
+
};
|
|
16543
|
+
return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3));
|
|
16544
|
+
}, $convert_file$2.$$arity = -2);
|
|
16545
|
+
Opal.alias(self, "render", "convert");
|
|
16546
|
+
return Opal.alias(self, "render_file", "convert_file");
|
|
16547
|
+
})(Opal.get_singleton_class(self), $nesting)
|
|
16439
16548
|
})($nesting[0], $nesting)
|
|
16440
16549
|
};
|
|
16441
16550
|
|
|
@@ -16446,7 +16555,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
|
|
|
16446
16555
|
}
|
|
16447
16556
|
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;
|
|
16448
16557
|
|
|
16449
|
-
Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '
|
|
16558
|
+
Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '$attr', '$[]', '$==', '$attr?', '$join', '$map', '$split', '$lstrip']);
|
|
16450
16559
|
return (function($base, $parent_nesting) {
|
|
16451
16560
|
var self = $module($base, 'Asciidoctor');
|
|
16452
16561
|
|
|
@@ -16500,25 +16609,29 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
|
|
|
16500
16609
|
Opal.def(self, '$docinfo?', $HighlightJsAdapter_docinfo$ques$4 = function(location) {
|
|
16501
16610
|
var self = this;
|
|
16502
16611
|
|
|
16503
|
-
return
|
|
16612
|
+
return true
|
|
16504
16613
|
}, $HighlightJsAdapter_docinfo$ques$4.$$arity = 1);
|
|
16505
16614
|
return (Opal.def(self, '$docinfo', $HighlightJsAdapter_docinfo$5 = function $$docinfo(location, doc, opts) {
|
|
16506
16615
|
var $$6, self = this, base_url = nil;
|
|
16507
16616
|
|
|
16508
16617
|
|
|
16509
16618
|
base_url = doc.$attr("highlightjsdir", "" + (opts['$[]']("cdn_base_url")) + "/highlight.js/" + ($$($nesting, 'HIGHLIGHT_JS_VERSION')));
|
|
16510
|
-
|
|
16511
|
-
return
|
|
16619
|
+
if (location['$==']("head")) {
|
|
16620
|
+
return "" + "<link rel=\"stylesheet\" href=\"" + (base_url) + "/styles/" + (doc.$attr("highlightjs-theme", "github")) + ".min.css\"" + (opts['$[]']("self_closing_tag_slash")) + ">"
|
|
16621
|
+
} else {
|
|
16622
|
+
return "" + "<script src=\"" + (base_url) + "/highlight.min.js\"></script>\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) {
|
|
16623
|
+
return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this;
|
|
16512
16624
|
|
|
16513
|
-
|
|
16514
16625
|
|
|
16515
|
-
|
|
16516
|
-
lang
|
|
16517
|
-
|
|
16518
|
-
|
|
16519
|
-
|
|
16520
|
-
|
|
16521
|
-
|
|
16626
|
+
|
|
16627
|
+
if (lang == null) {
|
|
16628
|
+
lang = nil;
|
|
16629
|
+
};
|
|
16630
|
+
return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
|
|
16631
|
+
} else {
|
|
16632
|
+
return ""
|
|
16633
|
+
}; 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>"
|
|
16634
|
+
};
|
|
16522
16635
|
}, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
|
|
16523
16636
|
})($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
|
|
16524
16637
|
})($nesting[0], $nesting)
|
|
@@ -16531,7 +16644,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
16531
16644
|
}
|
|
16532
16645
|
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;
|
|
16533
16646
|
|
|
16534
|
-
Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$join', '$content']);
|
|
16647
|
+
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']);
|
|
16535
16648
|
|
|
16536
16649
|
(function($base, $parent_nesting) {
|
|
16537
16650
|
var self = $module($base, 'Asciidoctor');
|
|
@@ -16765,7 +16878,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
16765
16878
|
|
|
16766
16879
|
self.$include($$($nesting, 'SyntaxHighlighter'));
|
|
16767
16880
|
return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) {
|
|
16768
|
-
var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil;
|
|
16881
|
+
var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil, $writer = nil;
|
|
16769
16882
|
|
|
16770
16883
|
|
|
16771
16884
|
class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) {
|
|
@@ -16775,13 +16888,16 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
16775
16888
|
}; return nil; })();
|
|
16776
16889
|
if ($truthy((transform = opts['$[]']("transform")))) {
|
|
16777
16890
|
|
|
16778
|
-
pre = $hash2(["class"], {"class": class_attr_val})
|
|
16779
|
-
code = (function() {if ($truthy(lang)) {
|
|
16891
|
+
transform['$[]']((pre = $hash2(["class"], {"class": class_attr_val})), (code = (function() {if ($truthy(lang)) {
|
|
16780
16892
|
return $hash2(["data-lang"], {"data-lang": lang})
|
|
16781
16893
|
} else {
|
|
16782
16894
|
return $hash2([], {})
|
|
16783
|
-
}; return nil; })();
|
|
16784
|
-
|
|
16895
|
+
}; return nil; })()));
|
|
16896
|
+
if ($truthy((lang = code.$delete("data-lang")))) {
|
|
16897
|
+
|
|
16898
|
+
$writer = ["data-lang", lang];
|
|
16899
|
+
$send(code, '[]=', Opal.to_a($writer));
|
|
16900
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
16785
16901
|
return "" + "<pre" + ($send(pre, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this;
|
|
16786
16902
|
|
|
16787
16903
|
|
|
@@ -17127,7 +17243,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17127
17243
|
}
|
|
17128
17244
|
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;
|
|
17129
17245
|
|
|
17130
|
-
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', '$
|
|
17246
|
+
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']);
|
|
17131
17247
|
return (function($base, $parent_nesting) {
|
|
17132
17248
|
var self = $module($base, 'Asciidoctor');
|
|
17133
17249
|
|
|
@@ -17138,19 +17254,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17138
17254
|
|
|
17139
17255
|
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;
|
|
17140
17256
|
|
|
17141
|
-
self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = nil;
|
|
17257
|
+
self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil;
|
|
17142
17258
|
|
|
17143
17259
|
self.$register_for("html5");
|
|
17144
17260
|
|
|
17145
17261
|
$writer = [["", ""]];
|
|
17146
17262
|
$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));
|
|
17147
17263
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
17148
|
-
Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a[
|
|
17264
|
+
Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a\b[^>]*|\/a)>/);
|
|
17149
17265
|
Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/);
|
|
17150
17266
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
17151
17267
|
|
|
17152
|
-
Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg\\
|
|
17153
|
-
Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg[^>]
|
|
17268
|
+
Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg[\\s>])"));
|
|
17269
|
+
Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg(?:\s[^>]*)?>/);
|
|
17154
17270
|
} else {
|
|
17155
17271
|
nil
|
|
17156
17272
|
};
|
|
@@ -17276,7 +17392,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17276
17392
|
}, $Html5Converter_convert$2.$$arity = -2);
|
|
17277
17393
|
|
|
17278
17394
|
Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) {
|
|
17279
|
-
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,
|
|
17395
|
+
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;
|
|
17280
17396
|
|
|
17281
17397
|
|
|
17282
17398
|
br = "" + "<br" + ((slash = self.void_element_slash)) + ">";
|
|
@@ -17286,6 +17402,11 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17286
17402
|
};
|
|
17287
17403
|
cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs";
|
|
17288
17404
|
linkcss = node['$attr?']("linkcss");
|
|
17405
|
+
max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) {
|
|
17406
|
+
return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\""
|
|
17407
|
+
} else {
|
|
17408
|
+
return ""
|
|
17409
|
+
}; return nil; })();
|
|
17289
17410
|
result = ["<!DOCTYPE html>"];
|
|
17290
17411
|
lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) {
|
|
17291
17412
|
return ""
|
|
@@ -17347,7 +17468,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17347
17468
|
if ($truthy(linkcss)) {
|
|
17348
17469
|
result['$<<']("" + "<link rel=\"stylesheet\" href=\"" + (node.$normalize_web_path(node.$attr("stylesheet"), node.$attr("stylesdir", ""))) + "\"" + (slash) + ">")
|
|
17349
17470
|
} else {
|
|
17350
|
-
result['$<<']("" + "<style>\n" + (node.$
|
|
17471
|
+
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>")
|
|
17351
17472
|
}};
|
|
17352
17473
|
if ($truthy(node['$attr?']("icons", "font"))) {
|
|
17353
17474
|
if ($truthy(node['$attr?']("iconfont-remote"))) {
|
|
@@ -17364,10 +17485,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17364
17485
|
result['$<<'](docinfo_content)
|
|
17365
17486
|
};
|
|
17366
17487
|
result['$<<']("</head>");
|
|
17367
|
-
|
|
17368
|
-
return
|
|
17488
|
+
id_attr = (function() {if ($truthy(node.$id())) {
|
|
17489
|
+
return "" + " id=\"" + (node.$id()) + "\""
|
|
17369
17490
|
} else {
|
|
17370
|
-
return
|
|
17491
|
+
return ""
|
|
17371
17492
|
}; return nil; })();
|
|
17372
17493
|
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))) {
|
|
17373
17494
|
classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))]
|
|
@@ -17376,10 +17497,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17376
17497
|
};
|
|
17377
17498
|
if ($truthy(node['$role?']())) {
|
|
17378
17499
|
classes['$<<'](node.$role())};
|
|
17379
|
-
|
|
17380
|
-
if ($truthy(node['$attr?']("max-width"))) {
|
|
17381
|
-
body_attrs['$<<']("" + "style=\"max-width: " + (node.$attr("max-width")) + ";\"")};
|
|
17382
|
-
result['$<<']("" + "<body " + (body_attrs.$join(" ")) + ">");
|
|
17500
|
+
result['$<<']("" + "<body" + (id_attr) + " class=\"" + (classes.$join(" ")) + "\">");
|
|
17383
17501
|
if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) {
|
|
17384
17502
|
} else {
|
|
17385
17503
|
result['$<<'](docinfo_content)
|
|
@@ -17387,7 +17505,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17387
17505
|
if ($truthy(node.$noheader())) {
|
|
17388
17506
|
} else {
|
|
17389
17507
|
|
|
17390
|
-
result['$<<']("<div id=\"header\">");
|
|
17508
|
+
result['$<<']("" + "<div id=\"header\"" + (max_width_attr) + ">");
|
|
17391
17509
|
if (node.$doctype()['$==']("manpage")) {
|
|
17392
17510
|
|
|
17393
17511
|
result['$<<']("" + "<h1>" + (node.$doctitle()) + " Manual Page</h1>");
|
|
@@ -17446,10 +17564,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17446
17564
|
};
|
|
17447
17565
|
result['$<<']("</div>");
|
|
17448
17566
|
};
|
|
17449
|
-
result['$<<']("" + "<div id=\"content\">\n" + (node.$content()) + "\n" + "</div>");
|
|
17567
|
+
result['$<<']("" + "<div id=\"content\"" + (max_width_attr) + ">\n" + (node.$content()) + "\n" + "</div>");
|
|
17450
17568
|
if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) {
|
|
17451
17569
|
|
|
17452
|
-
result['$<<']("" + "<div id=\"footnotes\">\n" + "<hr" + (slash) + ">");
|
|
17570
|
+
result['$<<']("" + "<div id=\"footnotes\"" + (max_width_attr) + ">\n" + "<hr" + (slash) + ">");
|
|
17453
17571
|
$send(node.$footnotes(), 'each', [], ($$5 = function(footnote){var self = $$5.$$s || this;
|
|
17454
17572
|
|
|
17455
17573
|
|
|
@@ -17462,7 +17580,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
17462
17580
|
if ($truthy(node.$nofooter())) {
|
|
17463
17581
|
} else {
|
|
17464
17582
|
|
|
17465
|
-
result['$<<']("<div id=\"footer\">");
|
|
17583
|
+
result['$<<']("" + "<div id=\"footer\"" + (max_width_attr) + ">");
|
|
17466
17584
|
result['$<<']("<div id=\"footer-text\">");
|
|
17467
17585
|
if ($truthy(node['$attr?']("revnumber"))) {
|
|
17468
17586
|
result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))};
|
|
@@ -18424,7 +18542,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
18424
18542
|
}, $Html5Converter_convert_sidebar$38.$$arity = 1);
|
|
18425
18543
|
|
|
18426
18544
|
Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) {
|
|
18427
|
-
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;
|
|
18545
|
+
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;
|
|
18428
18546
|
|
|
18429
18547
|
|
|
18430
18548
|
result = [];
|
|
@@ -18433,7 +18551,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
18433
18551
|
} else {
|
|
18434
18552
|
return ""
|
|
18435
18553
|
}; return nil; })();
|
|
18436
|
-
|
|
18554
|
+
if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) {
|
|
18555
|
+
frame = "ends"};
|
|
18556
|
+
classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))];
|
|
18437
18557
|
if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) {
|
|
18438
18558
|
classes['$<<']("" + "stripes-" + (stripes))};
|
|
18439
18559
|
styles = [];
|
|
@@ -18909,7 +19029,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
18909
19029
|
}, $Html5Converter_convert_video$48.$$arity = 1);
|
|
18910
19030
|
|
|
18911
19031
|
Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) {
|
|
18912
|
-
var $a, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil;
|
|
19032
|
+
var $a, $b, $c, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil, outer = nil;
|
|
18913
19033
|
|
|
18914
19034
|
return (function() {$case = node.$type();
|
|
18915
19035
|
if ("xref"['$===']($case)) {
|
|
@@ -18932,8 +19052,13 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
18932
19052
|
} else {
|
|
18933
19053
|
|
|
18934
19054
|
refid = node.$attributes()['$[]']("refid");
|
|
18935
|
-
if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = (self.refs = ($truthy($
|
|
18936
|
-
|
|
19055
|
+
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))) {
|
|
19056
|
+
|
|
19057
|
+
if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true)))['$!']())) {
|
|
19058
|
+
text = "" + "[" + (refid) + "]"
|
|
19059
|
+
} else if ($truthy(text['$include?']("<a"))) {
|
|
19060
|
+
text = text.$gsub($$($nesting, 'DropAnchorRx'), "")};
|
|
19061
|
+
self.resolving_xref = nil;
|
|
18937
19062
|
} else {
|
|
18938
19063
|
text = "" + "[" + (refid) + "]"
|
|
18939
19064
|
};
|
|
@@ -19160,17 +19285,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
19160
19285
|
}, $Html5Converter_convert_inline_quoted$60.$$arity = 1);
|
|
19161
19286
|
|
|
19162
19287
|
Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) {
|
|
19163
|
-
var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil;
|
|
19288
|
+
var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil;
|
|
19164
19289
|
|
|
19165
19290
|
|
|
19166
|
-
if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG"}))))) {
|
|
19291
|
+
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}))))) {
|
|
19167
19292
|
|
|
19293
|
+
if ($truthy(svg['$empty?']())) {
|
|
19294
|
+
return nil};
|
|
19168
19295
|
if ($truthy(svg['$start_with?']("<svg"))) {
|
|
19169
19296
|
} else {
|
|
19170
19297
|
svg = svg.$sub($$($nesting, 'SvgPreambleRx'), "")
|
|
19171
19298
|
};
|
|
19172
|
-
old_start_tag = (new_start_tag = nil);
|
|
19173
|
-
$send(["width", "height"], 'each', [], ($$62 = function(dim){var self = $$62.$$s || this,
|
|
19299
|
+
old_start_tag = (new_start_tag = (start_tag_match = nil));
|
|
19300
|
+
$send(["width", "height"], 'each', [], ($$62 = function(dim){var self = $$62.$$s || this, $a, $b;
|
|
19174
19301
|
|
|
19175
19302
|
|
|
19176
19303
|
|
|
@@ -19178,19 +19305,17 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
19178
19305
|
dim = nil;
|
|
19179
19306
|
};
|
|
19180
19307
|
if ($truthy(node['$attr?'](dim))) {
|
|
19181
|
-
|
|
19182
|
-
if ($truthy(new_start_tag)) {
|
|
19183
|
-
} else {
|
|
19184
|
-
new_start_tag = (old_start_tag = svg.$match($$($nesting, 'SvgStartTagRx'))['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "")
|
|
19185
|
-
};
|
|
19186
|
-
if ($truthy((dim_val = node.$attr(dim))['$end_with?']("%"))) {
|
|
19187
|
-
} else {
|
|
19188
|
-
dim_val = $rb_plus(dim_val, "px")
|
|
19189
|
-
};
|
|
19190
|
-
return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (dim_val) + "\">");
|
|
19191
19308
|
} else {
|
|
19192
|
-
return nil
|
|
19193
|
-
};
|
|
19309
|
+
return nil;
|
|
19310
|
+
};
|
|
19311
|
+
if ($truthy(new_start_tag)) {
|
|
19312
|
+
} else {
|
|
19313
|
+
|
|
19314
|
+
if ((start_tag_match = ($truthy($a = start_tag_match) ? $a : ($truthy($b = svg.$match($$($nesting, 'SvgStartTagRx'))) ? $b : "no_match")))['$==']("no_match")) {
|
|
19315
|
+
return nil;};
|
|
19316
|
+
new_start_tag = (old_start_tag = start_tag_match['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "");
|
|
19317
|
+
};
|
|
19318
|
+
return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (node.$attr(dim)) + "\">");}, $$62.$$s = self, $$62.$$arity = 1, $$62));
|
|
19194
19319
|
if ($truthy(new_start_tag)) {
|
|
19195
19320
|
svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};};
|
|
19196
19321
|
return svg;
|
|
@@ -21457,8 +21582,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
21457
21582
|
$send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer));
|
|
21458
21583
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
21459
21584
|
Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0");
|
|
21460
|
-
Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.
|
|
21461
|
-
Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.
|
|
21585
|
+
Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.18.3");
|
|
21586
|
+
Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9");
|
|
21462
21587
|
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"}));
|
|
21463
21588
|
Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]);
|
|
21464
21589
|
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": ">"}));
|
|
@@ -21560,10 +21685,23 @@ var toHash = function (object) {
|
|
|
21560
21685
|
var fromHash = function (hash) {
|
|
21561
21686
|
var object = {}
|
|
21562
21687
|
if (hash) {
|
|
21563
|
-
var
|
|
21564
|
-
for (var
|
|
21565
|
-
var
|
|
21566
|
-
object[
|
|
21688
|
+
var stringMap = hash.$$smap
|
|
21689
|
+
for (var stringMapKey in stringMap) {
|
|
21690
|
+
var stringMapValue = stringMap[stringMapKey]
|
|
21691
|
+
object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue
|
|
21692
|
+
}
|
|
21693
|
+
var numericMap = hash.$$map
|
|
21694
|
+
if (numericMap) {
|
|
21695
|
+
var positional = []
|
|
21696
|
+
for (var numericMapKey in numericMap) {
|
|
21697
|
+
var entry = numericMap[numericMapKey]
|
|
21698
|
+
var numericMapValue = entry.value
|
|
21699
|
+
var index = entry.key - 1
|
|
21700
|
+
positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue
|
|
21701
|
+
}
|
|
21702
|
+
if (positional.length > 0) {
|
|
21703
|
+
object.$positional = positional
|
|
21704
|
+
}
|
|
21567
21705
|
}
|
|
21568
21706
|
}
|
|
21569
21707
|
return object
|
|
@@ -21869,9 +22007,34 @@ AbstractBlock.prototype.getTitle = function () {
|
|
|
21869
22007
|
* @memberof AbstractBlock
|
|
21870
22008
|
*/
|
|
21871
22009
|
AbstractBlock.prototype.setTitle = function (title) {
|
|
22010
|
+
title = typeof title === 'undefined' ? Opal.nil : title
|
|
21872
22011
|
return this['$title='](title)
|
|
21873
22012
|
}
|
|
21874
22013
|
|
|
22014
|
+
/**
|
|
22015
|
+
* Generate and assign caption to block if not already assigned.
|
|
22016
|
+
*
|
|
22017
|
+
* If the block has a title and a caption prefix is available for this block,
|
|
22018
|
+
* then build a caption from this information, assign it a number and store it
|
|
22019
|
+
* to the caption attribute on the block.
|
|
22020
|
+
*
|
|
22021
|
+
* If a caption has already been assigned to this block, do nothing.
|
|
22022
|
+
*
|
|
22023
|
+
* The parts of a complete caption are: <prefix> <number>. <title>
|
|
22024
|
+
* This partial caption represents the part the precedes the title.
|
|
22025
|
+
*
|
|
22026
|
+
* @param {string} value - the String caption to assign to this block or nil to use document attribute.
|
|
22027
|
+
* @param {string} captionContext - the String context to use when resolving caption-related attributes.
|
|
22028
|
+
* If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up.
|
|
22029
|
+
*
|
|
22030
|
+
* @memberof AbstractBlock
|
|
22031
|
+
*/
|
|
22032
|
+
AbstractBlock.prototype.assignCaption = function (value, captionContext) {
|
|
22033
|
+
value = typeof value === 'undefined' ? Opal.nil : value
|
|
22034
|
+
captionContext = typeof captionContext === 'undefined' ? null : captionContext
|
|
22035
|
+
this.$assign_caption(value, captionContext)
|
|
22036
|
+
}
|
|
22037
|
+
|
|
21875
22038
|
/**
|
|
21876
22039
|
* Convenience method that returns the interpreted title of the Block
|
|
21877
22040
|
* with the caption prepended.
|
|
@@ -21956,7 +22119,7 @@ AbstractBlock.prototype.getCaption = function () {
|
|
|
21956
22119
|
* @memberof AbstractBlock
|
|
21957
22120
|
*/
|
|
21958
22121
|
AbstractBlock.prototype.setCaption = function (caption) {
|
|
21959
|
-
this.caption = caption
|
|
22122
|
+
this.caption = typeof caption === 'undefined' ? Opal.nil : caption
|
|
21960
22123
|
}
|
|
21961
22124
|
|
|
21962
22125
|
/**
|
|
@@ -23377,7 +23540,7 @@ Callouts.prototype.getListIndex = function () {
|
|
|
23377
23540
|
* @memberof Callouts
|
|
23378
23541
|
*/
|
|
23379
23542
|
Callouts.prototype.getCurrentList = function () {
|
|
23380
|
-
|
|
23543
|
+
var currentList = this.$current_list()
|
|
23381
23544
|
if (currentList && currentList.length > 0) {
|
|
23382
23545
|
for (var i = 0; i < currentList.length; i++) {
|
|
23383
23546
|
if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) {
|
|
@@ -25139,7 +25302,7 @@ Cell.prototype.getColumnPercentageWidth = function () {
|
|
|
25139
25302
|
* @memberof Cell
|
|
25140
25303
|
*/
|
|
25141
25304
|
Cell.prototype.getInnerDocument = function () {
|
|
25142
|
-
|
|
25305
|
+
var innerDocument = this.inner_document
|
|
25143
25306
|
return innerDocument === Opal.nil ? undefined : innerDocument
|
|
25144
25307
|
}
|
|
25145
25308
|
|
|
@@ -26780,7 +26943,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
|
|
|
26780
26943
|
}
|
|
26781
26944
|
|
|
26782
26945
|
|
|
26783
|
-
var ASCIIDOCTOR_JS_VERSION = '2.2.
|
|
26946
|
+
var ASCIIDOCTOR_JS_VERSION = '2.2.1';
|
|
26784
26947
|
|
|
26785
26948
|
/**
|
|
26786
26949
|
* Get Asciidoctor.js version number.
|