@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.
@@ -22627,7 +22627,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
22627
22627
  Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22628
22628
  Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
22629
22629
  Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22630
- Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
22630
+ Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
22631
22631
  Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22632
22632
  Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
22633
22633
  Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
@@ -22683,7 +22683,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
22683
22683
  (function($base, $parent_nesting) {
22684
22684
  var self = $module($base, 'Substitutors');
22685
22685
 
22686
- 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$50, $Substitutors_restore_passthroughs$54, $Substitutors_resolve_subs$56, $Substitutors_resolve_block_subs$58, $Substitutors_resolve_pass_subs$59, $Substitutors_expand_subs$60, $Substitutors_commit_subs$62, $Substitutors_parse_attributes$63, $Substitutors_extract_attributes_from_text$64, $Substitutors_extract_callouts$65, $Substitutors_restore_callouts$68, $Substitutors_extract_inner_passthrough$71, $Substitutors_convert_quoted_text$72, $Substitutors_do_replacement$73, $Substitutors_parse_quoted_text_attributes$74, $Substitutors_normalize_text$75, $Substitutors_split_simple_csv$76;
22686
+ 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;
22687
22687
 
22688
22688
 
22689
22689
  Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
@@ -23318,8 +23318,8 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23318
23318
  text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
23319
23319
  } else {
23320
23320
 
23321
- if (prefix['$==']("link:")) {
23322
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23321
+ $case = prefix;
23322
+ if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23323
23323
  text = "";
23324
23324
  $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
23325
23325
  if (")"['$===']($case)) {
@@ -23627,7 +23627,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23627
23627
  $writer[$rb_minus($writer["length"], 1)];;
23628
23628
  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))};
23629
23629
  if ($truthy(($truthy($a = found_macroish) ? text['$include?']("tnote") : $a))) {
23630
- text = $send(text, 'gsub', [$$($nesting, 'InlineFootnoteMacroRx')], ($$39 = function(){var self = $$39.$$s || this, $c, $d, $e, $$40, id = nil, index = nil, type = nil, target = nil, footnote = nil;
23630
+ 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;
23631
23631
 
23632
23632
 
23633
23633
  if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) {
@@ -23649,7 +23649,18 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23649
23649
  text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
23650
23650
  };
23651
23651
  if ($truthy(id)) {
23652
- if ($truthy(text)) {
23652
+ if ($truthy((footnote = $send(doc.$footnotes(), 'find', [], ($$40 = function(candidate){var self = $$40.$$s || this;
23653
+
23654
+
23655
+
23656
+ if (candidate == null) {
23657
+ candidate = nil;
23658
+ };
23659
+ return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) {
23660
+
23661
+ $c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c;
23662
+ $c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c;
23663
+ } else if ($truthy(text)) {
23653
23664
 
23654
23665
  text = self.$restore_passthroughs(self.$normalize_text(text, true, true));
23655
23666
  index = doc.$counter("footnote-number");
@@ -23657,21 +23668,8 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23657
23668
  $c = ["ref", nil], (type = $c[0]), (target = $c[1]), $c;
23658
23669
  } else {
23659
23670
 
23660
- if ($truthy((footnote = $send(doc.$footnotes(), 'find', [], ($$40 = function(candidate){var self = $$40.$$s || this;
23661
-
23662
-
23663
-
23664
- if (candidate == null) {
23665
- candidate = nil;
23666
- };
23667
- return candidate.$id()['$=='](id);}, $$40.$$s = self, $$40.$$arity = 1, $$40))))) {
23668
- $c = [footnote.$index(), footnote.$text()], (index = $c[0]), (text = $c[1]), $c
23669
- } else {
23670
-
23671
- self.$logger().$warn("" + "invalid footnote reference: " + (id));
23672
- $c = [nil, id], (index = $c[0]), (text = $c[1]), $c;
23673
- };
23674
- $c = ["xref", id, nil], (type = $c[0]), (target = $c[1]), (id = $c[2]), $c;
23671
+ self.$logger().$warn("" + "invalid footnote reference: " + (id));
23672
+ $c = ["xref", id, id, nil], (type = $c[0]), (target = $c[1]), (text = $c[2]), (id = $c[3]), $c;
23675
23673
  }
23676
23674
  } else if ($truthy(text)) {
23677
23675
 
@@ -23780,7 +23778,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23780
23778
  if ($truthy($rb_lt((start_line_number = self.$attr("start", 1).$to_i()), 1))) {
23781
23779
  start_line_number = 1}};
23782
23780
  if ($truthy(self['$attr?']("highlight"))) {
23783
- highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"))};
23781
+ highlight_lines = self.$resolve_lines_to_highlight(source, self.$attr("highlight"), start_line_number)};
23784
23782
  $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;
23785
23783
  if ($truthy(self.passthroughs['$empty?']())) {
23786
23784
  } else {
@@ -23794,10 +23792,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23794
23792
  };
23795
23793
  }, $Substitutors_highlight_source$47.$$arity = 2);
23796
23794
 
23797
- Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec) {
23798
- var $$49, self = this, lines = nil;
23795
+ Opal.def(self, '$resolve_lines_to_highlight', $Substitutors_resolve_lines_to_highlight$48 = function $$resolve_lines_to_highlight(source, spec, start) {
23796
+ var $$49, $$50, self = this, lines = nil, shift = nil;
23799
23797
 
23800
23798
 
23799
+
23800
+ if (start == null) {
23801
+ start = nil;
23802
+ };
23801
23803
  lines = [];
23802
23804
  if ($truthy(spec['$include?'](" "))) {
23803
23805
  spec = spec.$delete(" ")};
@@ -23844,11 +23846,26 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23844
23846
  } else {
23845
23847
  return nil
23846
23848
  };}, $$49.$$s = self, $$49.$$arity = 1, $$49));
23849
+ if ((shift = (function() {if ($truthy(start)) {
23850
+ return $rb_minus(start, 1)
23851
+ } else {
23852
+ return 0
23853
+ }; return nil; })())['$=='](0)) {
23854
+ } else {
23855
+ lines = $send(lines, 'map', [], ($$50 = function(it){var self = $$50.$$s || this;
23856
+
23857
+
23858
+
23859
+ if (it == null) {
23860
+ it = nil;
23861
+ };
23862
+ return $rb_minus(it, shift);}, $$50.$$s = self, $$50.$$arity = 1, $$50))
23863
+ };
23847
23864
  return lines.$sort();
23848
- }, $Substitutors_resolve_lines_to_highlight$48.$$arity = 2);
23865
+ }, $Substitutors_resolve_lines_to_highlight$48.$$arity = -3);
23849
23866
 
23850
- Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$50 = function $$extract_passthroughs(text) {
23851
- var $a, $b, $$51, $$52, $$53, self = this, compat_mode = nil, passthrus = nil, pass_inline_char1 = nil, pass_inline_char2 = nil, pass_inline_rx = nil;
23867
+ Opal.def(self, '$extract_passthroughs', $Substitutors_extract_passthroughs$51 = function $$extract_passthroughs(text) {
23868
+ 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;
23852
23869
  if (self.document == null) self.document = nil;
23853
23870
  if (self.passthroughs == null) self.passthroughs = nil;
23854
23871
 
@@ -23856,7 +23873,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23856
23873
  compat_mode = self.document.$compat_mode();
23857
23874
  passthrus = self.passthroughs;
23858
23875
  if ($truthy(($truthy($a = ($truthy($b = text['$include?']("++")) ? $b : text['$include?']("$$"))) ? $a : text['$include?']("ss:")))) {
23859
- text = $send(text, 'gsub', [$$($nesting, 'InlinePassMacroRx')], ($$51 = function(){var self = $$51.$$s || this, $c, boundary = nil, attrlist = nil, escape_count = nil, preceding = nil, old_behavior = nil, attributes = nil, subs = nil, $writer = nil, passthru_key = nil;
23876
+ 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;
23860
23877
 
23861
23878
 
23862
23879
  if ($truthy((boundary = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4))))) {
@@ -23921,10 +23938,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23921
23938
  $writer[$rb_minus($writer["length"], 1)];
23922
23939
  };
23923
23940
  };
23924
- return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$51.$$s = self, $$51.$$arity = 0, $$51))};
23941
+ return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$52.$$s = self, $$52.$$arity = 0, $$52))};
23925
23942
  $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;
23926
23943
  if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) {
23927
- text = $send(text, 'gsub', [pass_inline_rx], ($$52 = function(){var self = $$52.$$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;
23944
+ 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;
23928
23945
 
23929
23946
 
23930
23947
  preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
@@ -23980,9 +23997,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23980
23997
  $send(passthrus, '[]=', Opal.to_a($writer));
23981
23998
  $writer[$rb_minus($writer["length"], 1)];
23982
23999
  };
23983
- return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$52.$$s = self, $$52.$$arity = 0, $$52))};
24000
+ return "" + (preceding) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
23984
24001
  if ($truthy(($truthy($a = text['$include?'](":")) ? ($truthy($b = text['$include?']("stem:")) ? $b : text['$include?']("math:")) : $a))) {
23985
- text = $send(text, 'gsub', [$$($nesting, 'InlineStemMacroRx')], ($$53 = function(){var self = $$53.$$s || this, $c, $d, type = nil, subs = nil, content = nil, $writer = nil, passthru_key = nil;
24002
+ 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;
23986
24003
  if (self.document == null) self.document = nil;
23987
24004
 
23988
24005
 
@@ -24009,17 +24026,17 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24009
24026
  $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "type"], {"text": content, "subs": subs, "type": type})];
24010
24027
  $send(passthrus, '[]=', Opal.to_a($writer));
24011
24028
  $writer[$rb_minus($writer["length"], 1)];;
24012
- return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
24029
+ return "" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$54.$$s = self, $$54.$$arity = 0, $$54))};
24013
24030
  return text;
24014
- }, $Substitutors_extract_passthroughs$50.$$arity = 1);
24031
+ }, $Substitutors_extract_passthroughs$51.$$arity = 1);
24015
24032
 
24016
- Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$54 = function $$restore_passthroughs(text) {
24017
- var $$55, self = this, passthrus = nil;
24033
+ Opal.def(self, '$restore_passthroughs', $Substitutors_restore_passthroughs$55 = function $$restore_passthroughs(text) {
24034
+ var $$56, self = this, passthrus = nil;
24018
24035
  if (self.passthroughs == null) self.passthroughs = nil;
24019
24036
 
24020
24037
 
24021
24038
  passthrus = self.passthroughs;
24022
- return $send(text, 'gsub', [$$($nesting, 'PassSlotRx')], ($$55 = function(){var self = $$55.$$s || this, $a, pass = nil, subbed_text = nil, type = nil, attributes = nil, id = nil;
24039
+ 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;
24023
24040
 
24024
24041
  if ($truthy((pass = passthrus['$[]']((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$to_i())))) {
24025
24042
 
@@ -24038,11 +24055,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24038
24055
 
24039
24056
  self.$logger().$error("" + "unresolved passthrough detected: " + (text));
24040
24057
  return "??pass??";
24041
- }}, $$55.$$s = self, $$55.$$arity = 0, $$55));
24042
- }, $Substitutors_restore_passthroughs$54.$$arity = 1);
24058
+ }}, $$56.$$s = self, $$56.$$arity = 0, $$56));
24059
+ }, $Substitutors_restore_passthroughs$55.$$arity = 1);
24043
24060
 
24044
- Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$56 = function $$resolve_subs(subs, type, defaults, subject) {
24045
- var $$57, self = this, candidates = nil, modifiers_present = nil, resolved = nil, invalid = nil;
24061
+ Opal.def(self, '$resolve_subs', $Substitutors_resolve_subs$57 = function $$resolve_subs(subs, type, defaults, subject) {
24062
+ var $$58, self = this, candidates = nil, modifiers_present = nil, resolved = nil, invalid = nil;
24046
24063
 
24047
24064
 
24048
24065
 
@@ -24063,7 +24080,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24063
24080
  if ($truthy(subs['$include?'](" "))) {
24064
24081
  subs = subs.$delete(" ")};
24065
24082
  modifiers_present = $$($nesting, 'SubModifierSniffRx')['$match?'](subs);
24066
- $send(subs.$split(","), 'each', [], ($$57 = function(key){var self = $$57.$$s || this, $a, $b, modifier_operation = nil, first = nil, resolved_keys = nil, resolved_key = nil, candidate = nil, $case = nil;
24083
+ $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;
24067
24084
 
24068
24085
 
24069
24086
 
@@ -24117,7 +24134,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24117
24134
 
24118
24135
  candidates = ($truthy($a = candidates) ? $a : []);
24119
24136
  return (candidates = $rb_plus(candidates, resolved_keys));
24120
- };}, $$57.$$s = self, $$57.$$arity = 1, $$57));
24137
+ };}, $$58.$$s = self, $$58.$$arity = 1, $$58));
24121
24138
  if ($truthy(candidates)) {
24122
24139
  } else {
24123
24140
  return nil
@@ -24138,22 +24155,22 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24138
24155
  }; return nil; })()) + (subject) + ": " + (invalid.$join(", ")));
24139
24156
  };
24140
24157
  return resolved;
24141
- }, $Substitutors_resolve_subs$56.$$arity = -2);
24158
+ }, $Substitutors_resolve_subs$57.$$arity = -2);
24142
24159
 
24143
- Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$58 = function $$resolve_block_subs(subs, defaults, subject) {
24160
+ Opal.def(self, '$resolve_block_subs', $Substitutors_resolve_block_subs$59 = function $$resolve_block_subs(subs, defaults, subject) {
24144
24161
  var self = this;
24145
24162
 
24146
24163
  return self.$resolve_subs(subs, "block", defaults, subject)
24147
- }, $Substitutors_resolve_block_subs$58.$$arity = 3);
24164
+ }, $Substitutors_resolve_block_subs$59.$$arity = 3);
24148
24165
 
24149
- Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$59 = function $$resolve_pass_subs(subs) {
24166
+ Opal.def(self, '$resolve_pass_subs', $Substitutors_resolve_pass_subs$60 = function $$resolve_pass_subs(subs) {
24150
24167
  var self = this;
24151
24168
 
24152
24169
  return self.$resolve_subs(subs, "inline", nil, "passthrough macro")
24153
- }, $Substitutors_resolve_pass_subs$59.$$arity = 1);
24170
+ }, $Substitutors_resolve_pass_subs$60.$$arity = 1);
24154
24171
 
24155
- Opal.def(self, '$expand_subs', $Substitutors_expand_subs$60 = function $$expand_subs(subs) {
24156
- var $a, $$61, self = this, expanded_subs = nil;
24172
+ Opal.def(self, '$expand_subs', $Substitutors_expand_subs$61 = function $$expand_subs(subs) {
24173
+ var $a, $$62, self = this, expanded_subs = nil;
24157
24174
 
24158
24175
  if ($truthy($$$('::', 'Symbol')['$==='](subs))) {
24159
24176
  if (subs['$==']("none")) {
@@ -24164,7 +24181,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24164
24181
  } else {
24165
24182
 
24166
24183
  expanded_subs = [];
24167
- $send(subs, 'each', [], ($$61 = function(key){var self = $$61.$$s || this, sub_group = nil;
24184
+ $send(subs, 'each', [], ($$62 = function(key){var self = $$62.$$s || this, sub_group = nil;
24168
24185
 
24169
24186
 
24170
24187
 
@@ -24177,16 +24194,16 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24177
24194
  return (expanded_subs = $rb_plus(expanded_subs, sub_group))
24178
24195
  } else {
24179
24196
  return expanded_subs['$<<'](key)
24180
- };}, $$61.$$s = self, $$61.$$arity = 1, $$61));
24197
+ };}, $$62.$$s = self, $$62.$$arity = 1, $$62));
24181
24198
  if ($truthy(expanded_subs['$empty?']())) {
24182
24199
  return nil
24183
24200
  } else {
24184
24201
  return expanded_subs
24185
24202
  };
24186
24203
  }
24187
- }, $Substitutors_expand_subs$60.$$arity = 1);
24204
+ }, $Substitutors_expand_subs$61.$$arity = 1);
24188
24205
 
24189
- Opal.def(self, '$commit_subs', $Substitutors_commit_subs$62 = function $$commit_subs() {
24206
+ Opal.def(self, '$commit_subs', $Substitutors_commit_subs$63 = function $$commit_subs() {
24190
24207
  var $a, $b, $c, $d, self = this, default_subs = nil, $case = nil, custom_subs = nil, syntax_hl = nil, idx = nil, $writer = nil;
24191
24208
  if (self.default_subs == null) self.default_subs = nil;
24192
24209
  if (self.content_model == null) self.content_model = nil;
@@ -24224,9 +24241,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24224
24241
  $send(self.subs, '[]=', Opal.to_a($writer));
24225
24242
  $writer[$rb_minus($writer["length"], 1)];};
24226
24243
  return nil;
24227
- }, $Substitutors_commit_subs$62.$$arity = 0);
24244
+ }, $Substitutors_commit_subs$63.$$arity = 0);
24228
24245
 
24229
- Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$63 = function $$parse_attributes(attrlist, posattrs, opts) {
24246
+ Opal.def(self, '$parse_attributes', $Substitutors_parse_attributes$64 = function $$parse_attributes(attrlist, posattrs, opts) {
24230
24247
  var $a, self = this, block = nil, into = nil;
24231
24248
  if (self.document == null) self.document = nil;
24232
24249
 
@@ -24256,10 +24273,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24256
24273
  } else {
24257
24274
  return $$($nesting, 'AttributeList').$new(attrlist, block).$parse(posattrs)
24258
24275
  };
24259
- }, $Substitutors_parse_attributes$63.$$arity = -2);
24276
+ }, $Substitutors_parse_attributes$64.$$arity = -2);
24260
24277
  self.$private();
24261
24278
 
24262
- Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$64 = function $$extract_attributes_from_text(text, default_text) {
24279
+ Opal.def(self, '$extract_attributes_from_text', $Substitutors_extract_attributes_from_text$65 = function $$extract_attributes_from_text(text, default_text) {
24263
24280
  var self = this, attrlist = nil, resolved_text = nil, attrs = nil;
24264
24281
 
24265
24282
 
@@ -24282,10 +24299,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24282
24299
  } else {
24283
24300
  return [default_text, attrs]
24284
24301
  };
24285
- }, $Substitutors_extract_attributes_from_text$64.$$arity = -2);
24302
+ }, $Substitutors_extract_attributes_from_text$65.$$arity = -2);
24286
24303
 
24287
- Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$65 = function $$extract_callouts(source) {
24288
- var $$66, self = this, callout_marks = nil, autonum = nil, lineno = nil, last_lineno = nil, callout_rx = nil;
24304
+ Opal.def(self, '$extract_callouts', $Substitutors_extract_callouts$66 = function $$extract_callouts(source) {
24305
+ var $$67, self = this, callout_marks = nil, autonum = nil, lineno = nil, last_lineno = nil, callout_rx = nil;
24289
24306
 
24290
24307
 
24291
24308
  callout_marks = $hash2([], {});
@@ -24296,7 +24313,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24296
24313
  } else {
24297
24314
  return $$($nesting, 'CalloutExtractRx')
24298
24315
  }; return nil; })();
24299
- source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$66 = function(line){var self = $$66.$$s || this, $$67;
24316
+ source = $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$67 = function(line){var self = $$67.$$s || this, $$68;
24300
24317
 
24301
24318
 
24302
24319
 
@@ -24304,7 +24321,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24304
24321
  line = nil;
24305
24322
  };
24306
24323
  lineno = $rb_plus(lineno, 1);
24307
- return $send(line, 'gsub', [callout_rx], ($$67 = function(){var self = $$67.$$s || this, $a, $b, $writer = nil;
24324
+ return $send(line, 'gsub', [callout_rx], ($$68 = function(){var self = $$68.$$s || this, $a, $b, $writer = nil;
24308
24325
 
24309
24326
  if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))) {
24310
24327
  return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$sub($$($nesting, 'RS'), "")
@@ -24321,7 +24338,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24321
24338
  }; return nil; })()]);
24322
24339
  last_lineno = lineno;
24323
24340
  return "";
24324
- }}, $$67.$$s = self, $$67.$$arity = 0, $$67));}, $$66.$$s = self, $$66.$$arity = 1, $$66)).$join($$($nesting, 'LF'));
24341
+ }}, $$68.$$s = self, $$68.$$arity = 0, $$68));}, $$67.$$s = self, $$67.$$arity = 1, $$67)).$join($$($nesting, 'LF'));
24325
24342
  if ($truthy(last_lineno)) {
24326
24343
  if (last_lineno['$=='](lineno)) {
24327
24344
  source = "" + (source) + ($$($nesting, 'LF'))}
@@ -24329,10 +24346,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24329
24346
  callout_marks = nil
24330
24347
  };
24331
24348
  return [source, callout_marks];
24332
- }, $Substitutors_extract_callouts$65.$$arity = 1);
24349
+ }, $Substitutors_extract_callouts$66.$$arity = 1);
24333
24350
 
24334
- Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$68 = function $$restore_callouts(source, callout_marks, source_offset) {
24335
- var $$69, self = this, preamble = nil, lineno = nil;
24351
+ Opal.def(self, '$restore_callouts', $Substitutors_restore_callouts$69 = function $$restore_callouts(source, callout_marks, source_offset) {
24352
+ var $$70, self = this, preamble = nil, lineno = nil;
24336
24353
 
24337
24354
 
24338
24355
 
@@ -24347,7 +24364,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24347
24364
  preamble = ""
24348
24365
  };
24349
24366
  lineno = 0;
24350
- return $rb_plus(preamble, $send(source.$split($$($nesting, 'LF'), -1), 'map', [], ($$69 = function(line){var self = $$69.$$s || this, $a, $b, $$70, conums = nil, guard = nil, numeral = nil;
24367
+ 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;
24351
24368
  if (self.document == null) self.document = nil;
24352
24369
 
24353
24370
 
@@ -24361,7 +24378,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24361
24378
  $b = conums['$[]'](0), $a = Opal.to_ary($b), (guard = ($a[0] == null ? nil : $a[0])), (numeral = ($a[1] == null ? nil : $a[1])), $b;
24362
24379
  return "" + (line) + ($$($nesting, 'Inline').$new(self, "callout", numeral, $hash2(["id", "attributes"], {"id": self.document.$callouts().$read_next_id(), "attributes": $hash2(["guard"], {"guard": guard})})).$convert());
24363
24380
  } else {
24364
- return "" + (line) + ($send(conums, 'map', [], ($$70 = function(guard_it, numeral_it){var self = $$70.$$s || this;
24381
+ return "" + (line) + ($send(conums, 'map', [], ($$71 = function(guard_it, numeral_it){var self = $$71.$$s || this;
24365
24382
  if (self.document == null) self.document = nil;
24366
24383
 
24367
24384
 
@@ -24373,14 +24390,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24373
24390
  if (numeral_it == null) {
24374
24391
  numeral_it = nil;
24375
24392
  };
24376
- 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();}, $$70.$$s = self, $$70.$$arity = 2, $$70)).$join(" "))
24393
+ 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(" "))
24377
24394
  }
24378
24395
  } else {
24379
24396
  return line
24380
- };}, $$69.$$s = self, $$69.$$arity = 1, $$69)).$join($$($nesting, 'LF')));
24381
- }, $Substitutors_restore_callouts$68.$$arity = -3);
24397
+ };}, $$70.$$s = self, $$70.$$arity = 1, $$70)).$join($$($nesting, 'LF')));
24398
+ }, $Substitutors_restore_callouts$69.$$arity = -3);
24382
24399
 
24383
- Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$71 = function $$extract_inner_passthrough(text, pre) {
24400
+ Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$72 = function $$extract_inner_passthrough(text, pre) {
24384
24401
  var $a, $b, self = this, $writer = nil, passthru_key = nil;
24385
24402
  if (self.passthroughs == null) self.passthroughs = nil;
24386
24403
 
@@ -24398,9 +24415,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24398
24415
  } else {
24399
24416
  return "" + (pre) + "`" + (text) + "`"
24400
24417
  }
24401
- }, $Substitutors_extract_inner_passthrough$71.$$arity = 2);
24418
+ }, $Substitutors_extract_inner_passthrough$72.$$arity = 2);
24402
24419
 
24403
- Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$72 = function $$convert_quoted_text(match, type, scope) {
24420
+ Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
24404
24421
  var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
24405
24422
 
24406
24423
 
@@ -24431,9 +24448,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24431
24448
  type = "unquoted"};};
24432
24449
  return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
24433
24450
  };
24434
- }, $Substitutors_convert_quoted_text$72.$$arity = 3);
24451
+ }, $Substitutors_convert_quoted_text$73.$$arity = 3);
24435
24452
 
24436
- Opal.def(self, '$do_replacement', $Substitutors_do_replacement$73 = function $$do_replacement(m, replacement, restore) {
24453
+ Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
24437
24454
  var self = this, captured = nil, $case = nil;
24438
24455
 
24439
24456
  if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
@@ -24444,13 +24461,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24444
24461
  else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
24445
24462
  else {return $rb_plus(m['$[]'](1), replacement)}})()
24446
24463
  }
24447
- }, $Substitutors_do_replacement$73.$$arity = 3);
24464
+ }, $Substitutors_do_replacement$74.$$arity = 3);
24448
24465
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
24449
24466
  } else {
24450
24467
  nil
24451
24468
  };
24452
24469
 
24453
- Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$74 = function $$parse_quoted_text_attributes(str) {
24470
+ Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
24454
24471
  var $a, $b, self = this, segments = nil, id = nil, more_roles = nil, roles = nil, attrs = nil, $writer = nil;
24455
24472
 
24456
24473
 
@@ -24494,9 +24511,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24494
24511
  } else {
24495
24512
  return $hash2(["role"], {"role": str})
24496
24513
  };
24497
- }, $Substitutors_parse_quoted_text_attributes$74.$$arity = 1);
24514
+ }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
24498
24515
 
24499
- Opal.def(self, '$normalize_text', $Substitutors_normalize_text$75 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24516
+ Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24500
24517
  var $a, self = this;
24501
24518
 
24502
24519
 
@@ -24517,10 +24534,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24517
24534
  text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
24518
24535
  };
24519
24536
  return text;
24520
- }, $Substitutors_normalize_text$75.$$arity = -2);
24537
+ }, $Substitutors_normalize_text$76.$$arity = -2);
24521
24538
 
24522
- Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$76 = function $$split_simple_csv(str) {
24523
- var $$77, $$78, self = this, values = nil, accum = nil, quote_open = nil;
24539
+ Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
24540
+ var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
24524
24541
 
24525
24542
  if ($truthy(str['$empty?']())) {
24526
24543
  return []
@@ -24529,7 +24546,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24529
24546
  values = [];
24530
24547
  accum = "";
24531
24548
  quote_open = nil;
24532
- $send(str, 'each_char', [], ($$77 = function(c){var self = $$77.$$s || this, $case = nil;
24549
+ $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
24533
24550
 
24534
24551
 
24535
24552
 
@@ -24545,19 +24562,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24545
24562
  return (accum = "");
24546
24563
  }}
24547
24564
  else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
24548
- else {return (accum = $rb_plus(accum, c))}})();}, $$77.$$s = self, $$77.$$arity = 1, $$77));
24565
+ else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
24549
24566
  return values['$<<'](accum.$strip());
24550
24567
  } else {
24551
- return $send(str.$split(","), 'map', [], ($$78 = function(it){var self = $$78.$$s || this;
24568
+ return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
24552
24569
 
24553
24570
 
24554
24571
 
24555
24572
  if (it == null) {
24556
24573
  it = nil;
24557
24574
  };
24558
- return it.$strip();}, $$78.$$s = self, $$78.$$arity = 1, $$78))
24575
+ return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
24559
24576
  }
24560
- }, $Substitutors_split_simple_csv$76.$$arity = 1);
24577
+ }, $Substitutors_split_simple_csv$77.$$arity = 1);
24561
24578
  })($nesting[0], $nesting)
24562
24579
  })($nesting[0], $nesting)
24563
24580
  };
@@ -24571,7 +24588,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
24571
24588
 
24572
24589
  var $nesting = [self].concat($parent_nesting);
24573
24590
 
24574
- Opal.const_set($nesting[0], 'VERSION', "2.0.11.dev")
24591
+ Opal.const_set($nesting[0], 'VERSION', "2.0.12")
24575
24592
  })($nesting[0], $nesting)
24576
24593
  };
24577
24594
 
@@ -24585,7 +24602,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24585
24602
  }
24586
24603
  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;
24587
24604
 
24588
- 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?', '$empty?', '$join', '$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']);
24605
+ 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']);
24589
24606
  return (function($base, $parent_nesting) {
24590
24607
  var self = $module($base, 'Asciidoctor');
24591
24608
 
@@ -24594,7 +24611,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24594
24611
  (function($base, $super, $parent_nesting) {
24595
24612
  var self = $klass($base, $super, 'AbstractNode');
24596
24613
 
24597
- 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_add_role$20, $AbstractNode_remove_role$21, $AbstractNode_reftext$22, $AbstractNode_reftext$ques$23, $AbstractNode_icon_uri$24, $AbstractNode_image_uri$25, $AbstractNode_media_uri$26, $AbstractNode_generate_data_uri$27, $AbstractNode_generate_data_uri_from_uri$28, $AbstractNode_normalize_asset_path$30, $AbstractNode_normalize_system_path$31, $AbstractNode_normalize_web_path$32, $AbstractNode_read_asset$33, $AbstractNode_read_contents$34, $AbstractNode_is_uri$ques$37;
24614
+ 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;
24598
24615
 
24599
24616
  self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil;
24600
24617
 
@@ -24831,7 +24848,21 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24831
24848
  }
24832
24849
  }, $AbstractNode_has_role$ques$19.$$arity = 1);
24833
24850
 
24834
- Opal.def(self, '$add_role', $AbstractNode_add_role$20 = function $$add_role(name) {
24851
+ Opal.def(self, '$role=', $AbstractNode_role$eq$20 = function(names) {
24852
+ var self = this, $writer = nil;
24853
+
24854
+
24855
+ $writer = ["role", (function() {if ($truthy($$$('::', 'Array')['$==='](names))) {
24856
+
24857
+ return names.$join(" ");
24858
+ } else {
24859
+ return names
24860
+ }; return nil; })()];
24861
+ $send(self.attributes, '[]=', Opal.to_a($writer));
24862
+ return $writer[$rb_minus($writer["length"], 1)];
24863
+ }, $AbstractNode_role$eq$20.$$arity = 1);
24864
+
24865
+ Opal.def(self, '$add_role', $AbstractNode_add_role$21 = function $$add_role(name) {
24835
24866
  var self = this, val = nil, $writer = nil;
24836
24867
 
24837
24868
  if ($truthy((val = self.attributes['$[]']("role")))) {
@@ -24853,9 +24884,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24853
24884
  $writer[$rb_minus($writer["length"], 1)];;
24854
24885
  return true;
24855
24886
  }
24856
- }, $AbstractNode_add_role$20.$$arity = 1);
24887
+ }, $AbstractNode_add_role$21.$$arity = 1);
24857
24888
 
24858
- Opal.def(self, '$remove_role', $AbstractNode_remove_role$21 = function $$remove_role(name) {
24889
+ Opal.def(self, '$remove_role', $AbstractNode_remove_role$22 = function $$remove_role(name) {
24859
24890
  var $a, self = this, val = nil, $writer = nil;
24860
24891
 
24861
24892
  if ($truthy(($truthy($a = (val = self.attributes['$[]']("role"))) ? (val = val.$split()).$delete(name) : $a))) {
@@ -24872,9 +24903,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24872
24903
  } else {
24873
24904
  return false
24874
24905
  }
24875
- }, $AbstractNode_remove_role$21.$$arity = 1);
24906
+ }, $AbstractNode_remove_role$22.$$arity = 1);
24876
24907
 
24877
- Opal.def(self, '$reftext', $AbstractNode_reftext$22 = function $$reftext() {
24908
+ Opal.def(self, '$reftext', $AbstractNode_reftext$23 = function $$reftext() {
24878
24909
  var self = this, val = nil;
24879
24910
 
24880
24911
  if ($truthy((val = self.attributes['$[]']("reftext")))) {
@@ -24883,15 +24914,15 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24883
24914
  } else {
24884
24915
  return nil
24885
24916
  }
24886
- }, $AbstractNode_reftext$22.$$arity = 0);
24917
+ }, $AbstractNode_reftext$23.$$arity = 0);
24887
24918
 
24888
- Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$23 = function() {
24919
+ Opal.def(self, '$reftext?', $AbstractNode_reftext$ques$24 = function() {
24889
24920
  var self = this;
24890
24921
 
24891
24922
  return self.attributes['$key?']("reftext")
24892
- }, $AbstractNode_reftext$ques$23.$$arity = 0);
24923
+ }, $AbstractNode_reftext$ques$24.$$arity = 0);
24893
24924
 
24894
- Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$24 = function $$icon_uri(name) {
24925
+ Opal.def(self, '$icon_uri', $AbstractNode_icon_uri$25 = function $$icon_uri(name) {
24895
24926
  var self = this, icon = nil;
24896
24927
 
24897
24928
 
@@ -24906,9 +24937,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24906
24937
  icon = "" + (name) + "." + (self.document.$attr("icontype", "png"))
24907
24938
  };
24908
24939
  return self.$image_uri(icon, "iconsdir");
24909
- }, $AbstractNode_icon_uri$24.$$arity = 1);
24940
+ }, $AbstractNode_icon_uri$25.$$arity = 1);
24910
24941
 
24911
- Opal.def(self, '$image_uri', $AbstractNode_image_uri$25 = function $$image_uri(target_image, asset_dir_key) {
24942
+ Opal.def(self, '$image_uri', $AbstractNode_image_uri$26 = function $$image_uri(target_image, asset_dir_key) {
24912
24943
  var $a, $b, $c, $d, self = this, doc = nil, images_base = nil;
24913
24944
 
24914
24945
 
@@ -24935,9 +24966,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24935
24966
  return nil
24936
24967
  }; return nil; })())
24937
24968
  };
24938
- }, $AbstractNode_image_uri$25.$$arity = -2);
24969
+ }, $AbstractNode_image_uri$26.$$arity = -2);
24939
24970
 
24940
- Opal.def(self, '$media_uri', $AbstractNode_media_uri$26 = function $$media_uri(target, asset_dir_key) {
24971
+ Opal.def(self, '$media_uri', $AbstractNode_media_uri$27 = function $$media_uri(target, asset_dir_key) {
24941
24972
  var self = this;
24942
24973
 
24943
24974
 
@@ -24950,9 +24981,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24950
24981
  } else {
24951
24982
  return nil
24952
24983
  }; return nil; })());
24953
- }, $AbstractNode_media_uri$26.$$arity = -2);
24984
+ }, $AbstractNode_media_uri$27.$$arity = -2);
24954
24985
 
24955
- Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$27 = function $$generate_data_uri(target_image, asset_dir_key) {
24986
+ Opal.def(self, '$generate_data_uri', $AbstractNode_generate_data_uri$28 = function $$generate_data_uri(target_image, asset_dir_key) {
24956
24987
  var self = this, ext = nil, mimetype = nil, image_path = nil;
24957
24988
 
24958
24989
 
@@ -24981,10 +25012,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24981
25012
  self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
24982
25013
  return "" + "data:" + (mimetype) + ";base64,";
24983
25014
  };
24984
- }, $AbstractNode_generate_data_uri$27.$$arity = -2);
25015
+ }, $AbstractNode_generate_data_uri$28.$$arity = -2);
24985
25016
 
24986
- Opal.def(self, '$generate_data_uri_from_uri', $AbstractNode_generate_data_uri_from_uri$28 = function $$generate_data_uri_from_uri(image_uri, cache_uri) {
24987
- var $a, $b, $$29, self = this, mimetype = nil, bindata = nil;
25017
+ 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) {
25018
+ var $a, $b, $$30, self = this, mimetype = nil, bindata = nil;
24988
25019
 
24989
25020
 
24990
25021
 
@@ -24998,14 +25029,14 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24998
25029
 
24999
25030
  try {
25000
25031
 
25001
- $b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$29 = function(f){var self = $$29.$$s || this;
25032
+ $b = $send($$$('::', 'OpenURI'), 'open_uri', [image_uri, $$($nesting, 'URI_READ_MODE')], ($$30 = function(f){var self = $$30.$$s || this;
25002
25033
 
25003
25034
 
25004
25035
 
25005
25036
  if (f == null) {
25006
25037
  f = nil;
25007
25038
  };
25008
- return [f.$content_type(), f.$read()];}, $$29.$$s = self, $$29.$$arity = 1, $$29)), $a = Opal.to_ary($b), (mimetype = ($a[0] == null ? nil : $a[0])), (bindata = ($a[1] == null ? nil : $a[1])), $b;
25039
+ 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;
25009
25040
  return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata));
25010
25041
  } catch ($err) {
25011
25042
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
@@ -25016,9 +25047,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25016
25047
  } finally { Opal.pop_exception() }
25017
25048
  } else { throw $err; }
25018
25049
  };;
25019
- }, $AbstractNode_generate_data_uri_from_uri$28.$$arity = -2);
25050
+ }, $AbstractNode_generate_data_uri_from_uri$29.$$arity = -2);
25020
25051
 
25021
- Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$30 = function $$normalize_asset_path(asset_ref, asset_name, autocorrect) {
25052
+ Opal.def(self, '$normalize_asset_path', $AbstractNode_normalize_asset_path$31 = function $$normalize_asset_path(asset_ref, asset_name, autocorrect) {
25022
25053
  var self = this;
25023
25054
 
25024
25055
 
@@ -25031,9 +25062,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25031
25062
  autocorrect = true;
25032
25063
  };
25033
25064
  return self.$normalize_system_path(asset_ref, self.document.$base_dir(), nil, $hash2(["target_name", "recover"], {"target_name": asset_name, "recover": autocorrect}));
25034
- }, $AbstractNode_normalize_asset_path$30.$$arity = -2);
25065
+ }, $AbstractNode_normalize_asset_path$31.$$arity = -2);
25035
25066
 
25036
- Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$31 = function $$normalize_system_path(target, start, jail, opts) {
25067
+ Opal.def(self, '$normalize_system_path', $AbstractNode_normalize_system_path$32 = function $$normalize_system_path(target, start, jail, opts) {
25037
25068
  var self = this, doc = nil;
25038
25069
 
25039
25070
 
@@ -25070,9 +25101,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25070
25101
  };
25071
25102
  };
25072
25103
  return doc.$path_resolver().$system_path(target, start, jail, opts);
25073
- }, $AbstractNode_normalize_system_path$31.$$arity = -2);
25104
+ }, $AbstractNode_normalize_system_path$32.$$arity = -2);
25074
25105
 
25075
- Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$32 = function $$normalize_web_path(target, start, preserve_uri_target) {
25106
+ Opal.def(self, '$normalize_web_path', $AbstractNode_normalize_web_path$33 = function $$normalize_web_path(target, start, preserve_uri_target) {
25076
25107
  var $a, self = this;
25077
25108
 
25078
25109
 
@@ -25089,9 +25120,9 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25089
25120
  } else {
25090
25121
  return self.document.$path_resolver().$web_path(target, start)
25091
25122
  };
25092
- }, $AbstractNode_normalize_web_path$32.$$arity = -2);
25123
+ }, $AbstractNode_normalize_web_path$33.$$arity = -2);
25093
25124
 
25094
- Opal.def(self, '$read_asset', $AbstractNode_read_asset$33 = function $$read_asset(path, opts) {
25125
+ Opal.def(self, '$read_asset', $AbstractNode_read_asset$34 = function $$read_asset(path, opts) {
25095
25126
  var $a, self = this;
25096
25127
 
25097
25128
 
@@ -25118,10 +25149,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25118
25149
  } else {
25119
25150
  return nil
25120
25151
  };
25121
- }, $AbstractNode_read_asset$33.$$arity = -2);
25152
+ }, $AbstractNode_read_asset$34.$$arity = -2);
25122
25153
 
25123
- Opal.def(self, '$read_contents', $AbstractNode_read_contents$34 = function $$read_contents(target, opts) {
25124
- var $a, $b, $c, $$35, $$36, self = this, doc = nil, start = nil;
25154
+ Opal.def(self, '$read_contents', $AbstractNode_read_contents$35 = function $$read_contents(target, opts) {
25155
+ var $a, $b, $c, $$36, $$37, self = this, doc = nil, start = nil, contents = nil;
25125
25156
 
25126
25157
 
25127
25158
 
@@ -25137,51 +25168,48 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25137
25168
 
25138
25169
  try {
25139
25170
  if ($truthy(opts['$[]']("normalize"))) {
25140
- return $$($nesting, 'Helpers').$prepare_source_string($send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$35 = function(f){var self = $$35.$$s || this;
25171
+ contents = $$($nesting, 'Helpers').$prepare_source_string($send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$36 = function(f){var self = $$36.$$s || this;
25141
25172
 
25142
25173
 
25143
25174
 
25144
25175
  if (f == null) {
25145
25176
  f = nil;
25146
25177
  };
25147
- return f.$read();}, $$35.$$s = self, $$35.$$arity = 1, $$35))).$join($$($nesting, 'LF'))
25178
+ return f.$read();}, $$36.$$s = self, $$36.$$arity = 1, $$36))).$join($$($nesting, 'LF'))
25148
25179
  } else {
25149
- return $send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$36 = function(f){var self = $$36.$$s || this;
25180
+ contents = $send($$$('::', 'OpenURI'), 'open_uri', [target, $$($nesting, 'URI_READ_MODE')], ($$37 = function(f){var self = $$37.$$s || this;
25150
25181
 
25151
25182
 
25152
25183
 
25153
25184
  if (f == null) {
25154
25185
  f = nil;
25155
25186
  };
25156
- return f.$read();}, $$36.$$s = self, $$36.$$arity = 1, $$36))
25187
+ return f.$read();}, $$37.$$s = self, $$37.$$arity = 1, $$37))
25157
25188
  }
25158
25189
  } catch ($err) {
25159
25190
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
25160
25191
  try {
25161
-
25162
25192
  if ($truthy(opts.$fetch("warn_on_failure", true))) {
25163
- self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))};
25164
- return nil;
25193
+ self.$logger().$warn("" + "could not retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target))}
25165
25194
  } finally { Opal.pop_exception() }
25166
25195
  } else { throw $err; }
25167
25196
  };;
25168
- } else {
25169
-
25170
- if ($truthy(opts.$fetch("warn_on_failure", true))) {
25171
- self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")};
25172
- return nil;
25173
- }
25197
+ } else if ($truthy(opts.$fetch("warn_on_failure", true))) {
25198
+ self.$logger().$warn("" + "cannot retrieve contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " at URI: " + (target) + " (allow-uri-read attribute not enabled)")}
25174
25199
  } else {
25175
25200
 
25176
25201
  target = self.$normalize_system_path(target, opts['$[]']("start"), nil, $hash2(["target_name"], {"target_name": ($truthy($a = opts['$[]']("label")) ? $a : "asset")}));
25177
- return 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")}));
25202
+ 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")}));
25178
25203
  };
25179
- }, $AbstractNode_read_contents$34.$$arity = -2);
25180
- return (Opal.def(self, '$is_uri?', $AbstractNode_is_uri$ques$37 = function(str) {
25204
+ if ($truthy(($truthy($a = ($truthy($b = contents) ? opts['$[]']("warn_if_empty") : $b)) ? contents['$empty?']() : $a))) {
25205
+ self.$logger().$warn("" + "contents of " + (($truthy($a = opts['$[]']("label")) ? $a : "asset")) + " is empty: " + (target))};
25206
+ return contents;
25207
+ }, $AbstractNode_read_contents$35.$$arity = -2);
25208
+ return (Opal.def(self, '$is_uri?', $AbstractNode_is_uri$ques$38 = function(str) {
25181
25209
  var self = this;
25182
25210
 
25183
25211
  return $$($nesting, 'Helpers')['$uriish?'](str)
25184
- }, $AbstractNode_is_uri$ques$37.$$arity = 1), nil) && 'is_uri?';
25212
+ }, $AbstractNode_is_uri$ques$38.$$arity = 1), nil) && 'is_uri?';
25185
25213
  })($nesting[0], null, $nesting)
25186
25214
  })($nesting[0], $nesting)
25187
25215
  };
@@ -25199,7 +25227,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
25199
25227
  }
25200
25228
  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;
25201
25229
 
25202
- 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']);
25230
+ 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']);
25203
25231
  return (function($base, $parent_nesting) {
25204
25232
  var self = $module($base, 'Asciidoctor');
25205
25233
 
@@ -25516,7 +25544,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
25516
25544
  };
25517
25545
  if ($truthy(($truthy($a = (val = self.$reftext())) ? val['$empty?']()['$!']() : $a))) {
25518
25546
  return val
25519
- } else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption : $a))) {
25547
+ } else if ($truthy(($truthy($a = ($truthy($b = xrefstyle) ? self.title : $b)) ? self.caption['$nil_or_empty?']()['$!']() : $a))) {
25520
25548
  return (function() {$case = xrefstyle;
25521
25549
  if ("full"['$===']($case)) {
25522
25550
  quoted_title = self.$sub_placeholder(self.$sub_quotes((function() {if ($truthy(self.document.$compat_mode())) {
@@ -25782,7 +25810,7 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
25782
25810
  }
25783
25811
  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;
25784
25812
 
25785
- Opal.add_stubs(['$new', '$[]', '$update', '$parse', '$parse_attribute', '$eos?', '$skip_delimiter', '$+', '$rekey', '$each', '$[]=', '$-', '$private', '$skip_blank', '$==', '$peek', '$parse_attribute_value', '$get_byte', '$start_with?', '$scan_name', '$!', '$!=', '$*', '$scan_to_delimiter', '$===', '$include?', '$delete', '$split', '$empty?', '$apply_subs', '$scan_to_quote', '$gsub', '$skip', '$scan']);
25813
+ 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']);
25786
25814
  return (function($base, $parent_nesting) {
25787
25815
  var self = $module($base, 'Asciidoctor');
25788
25816
 
@@ -25795,10 +25823,11 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
25795
25823
 
25796
25824
  self.$$prototype.attributes = self.$$prototype.scanner = self.$$prototype.delimiter = self.$$prototype.block = self.$$prototype.delimiter_skip_pattern = self.$$prototype.delimiter_boundary_pattern = nil;
25797
25825
 
25798
- Opal.const_set($nesting[0], 'BACKSLASH', "\\");
25799
25826
  Opal.const_set($nesting[0], 'APOS', "'");
25800
- Opal.const_set($nesting[0], 'BoundaryRxs', $hash("\"", /.*?[^\\](?=")/, $$($nesting, 'APOS'), /.*?[^\\](?=')/, ",", /.*?(?=[ \t]*(,|$))/));
25801
- Opal.const_set($nesting[0], 'EscapedQuotes', $hash("\"", "\\\"", $$($nesting, 'APOS'), "\\'"));
25827
+ Opal.const_set($nesting[0], 'BACKSLASH', "\\");
25828
+ Opal.const_set($nesting[0], 'QUOT', "\"");
25829
+ Opal.const_set($nesting[0], 'BoundaryRxs', $hash($$($nesting, 'QUOT'), /.*?[^\\](?=")/, $$($nesting, 'APOS'), /.*?[^\\](?=')/, ",", /.*?(?=[ \t]*(,|$))/));
25830
+ Opal.const_set($nesting[0], 'EscapedQuotes', $hash($$($nesting, 'QUOT'), "\\\"", $$($nesting, 'APOS'), "\\'"));
25802
25831
  Opal.const_set($nesting[0], 'NameRx', new RegExp("" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-.]*"));
25803
25832
  Opal.const_set($nesting[0], 'BlankRx', /[ \t]+/);
25804
25833
  Opal.const_set($nesting[0], 'SkipRxs', $hash2([","], {",": /[ \t]*(,|$)/}));
@@ -25862,104 +25891,83 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
25862
25891
  return $$($nesting, 'AttributeList').$rekey(self.attributes, positional_attrs)
25863
25892
  }, $AttributeList_rekey$4.$$arity = 1);
25864
25893
  Opal.defs(self, '$rekey', $AttributeList_rekey$5 = function $$rekey(attributes, positional_attrs) {
25865
- var $$6, self = this, index = nil;
25894
+ var $$6, self = this;
25866
25895
 
25867
25896
 
25868
- index = 0;
25869
- $send(positional_attrs, 'each', [], ($$6 = function(key){var self = $$6.$$s || this, val = nil, $writer = nil;
25897
+ $send(positional_attrs, 'each_with_index', [], ($$6 = function(key, index){var self = $$6.$$s || this, $a, val = nil, $writer = nil;
25870
25898
 
25871
25899
 
25872
25900
 
25873
25901
  if (key == null) {
25874
25902
  key = nil;
25875
25903
  };
25876
- index = $rb_plus(index, 1);
25877
- if ($truthy(key)) {
25878
- if ($truthy((val = attributes['$[]'](index)))) {
25879
-
25880
- $writer = [key, val];
25881
- $send(attributes, '[]=', Opal.to_a($writer));
25882
- return $writer[$rb_minus($writer["length"], 1)];
25883
- } else {
25884
- return nil
25885
- }
25904
+
25905
+ if (index == null) {
25906
+ index = nil;
25907
+ };
25908
+ if ($truthy(($truthy($a = key) ? (val = attributes['$[]']($rb_plus(index, 1))) : $a))) {
25909
+
25910
+ $writer = [key, val];
25911
+ $send(attributes, '[]=', Opal.to_a($writer));
25912
+ return $writer[$rb_minus($writer["length"], 1)];
25886
25913
  } else {
25887
25914
  return nil
25888
- };}, $$6.$$s = self, $$6.$$arity = 1, $$6));
25915
+ };}, $$6.$$s = self, $$6.$$arity = 2, $$6));
25889
25916
  return attributes;
25890
25917
  }, $AttributeList_rekey$5.$$arity = 2);
25891
25918
  self.$private();
25892
25919
 
25893
25920
  Opal.def(self, '$parse_attribute', $AttributeList_parse_attribute$7 = function $$parse_attribute(index, positional_attrs) {
25894
- var $a, $$8, self = this, single_quoted_value = nil, first = nil, name = nil, value = nil, skipped = nil, c = nil, $case = nil, $writer = nil, resolved_name = nil, positional_attr_name = nil;
25921
+ 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;
25895
25922
 
25896
25923
 
25897
-
25898
- if (index == null) {
25899
- index = 0;
25900
- };
25901
-
25902
- if (positional_attrs == null) {
25903
- positional_attrs = [];
25904
- };
25905
- single_quoted_value = false;
25924
+ continue$ = true;
25906
25925
  self.$skip_blank();
25907
- if ((first = self.scanner.$peek(1))['$==']("\"")) {
25908
-
25909
- name = self.$parse_attribute_value(self.scanner.$get_byte());
25910
- value = nil;
25911
- } else if (first['$==']($$($nesting, 'APOS'))) {
25912
-
25913
- name = self.$parse_attribute_value(self.scanner.$get_byte());
25914
- value = nil;
25915
- if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) {
25916
- } else {
25917
- single_quoted_value = true
25918
- };
25926
+ $case = self.scanner.$peek(1);
25927
+ if ($$($nesting, 'QUOT')['$===']($case)) {name = self.$parse_attribute_value(self.scanner.$get_byte())}
25928
+ else if ($$($nesting, 'APOS')['$===']($case)) {
25929
+ name = self.$parse_attribute_value(self.scanner.$get_byte());
25930
+ if ($truthy(name['$start_with?']($$($nesting, 'APOS')))) {
25919
25931
  } else {
25932
+ single_quoted = true
25933
+ };}
25934
+ else {
25935
+ skipped = ($truthy($a = ($truthy($b = (name = self.$scan_name())) ? self.$skip_blank() : $b)) ? $a : 0);
25936
+ if ($truthy(self.scanner['$eos?']())) {
25920
25937
 
25921
- name = self.$scan_name();
25922
- skipped = 0;
25923
- c = nil;
25924
- if ($truthy(self.scanner['$eos?']())) {
25925
- if ($truthy(name)) {
25926
- } else {
25927
- return false
25928
- }
25938
+ if ($truthy(($truthy($a = name) ? $a : self.scanner.$string().$rstrip()['$end_with?'](self.delimiter)))) {
25929
25939
  } else {
25930
-
25931
- skipped = ($truthy($a = self.$skip_blank()) ? $a : 0);
25932
- c = self.scanner.$get_byte();
25940
+ return nil
25933
25941
  };
25934
- if ($truthy(($truthy($a = c['$!']()) ? $a : c['$=='](self.delimiter)))) {
25935
- value = nil
25936
- } else if ($truthy(($truthy($a = c['$!=']("=")) ? $a : name['$!']()))) {
25937
-
25938
- name = "" + (name) + ($rb_times(" ", skipped)) + (c) + (self.$scan_to_delimiter());
25939
- value = nil;
25940
- } else {
25942
+ continue$ = nil;
25943
+ } else if ((c = self.scanner.$get_byte())['$=='](self.delimiter)) {
25944
+ self.scanner.$unscan()
25945
+ } else if ($truthy(name)) {
25946
+ if (c['$==']("=")) {
25941
25947
 
25942
25948
  self.$skip_blank();
25943
- if ($truthy(self.scanner.$peek(1))) {
25944
- if ((c = self.scanner.$get_byte())['$==']("\"")) {
25945
- value = self.$parse_attribute_value(c)
25946
- } else if (c['$==']($$($nesting, 'APOS'))) {
25947
-
25948
- value = self.$parse_attribute_value(c);
25949
- if ($truthy(value['$start_with?']($$($nesting, 'APOS')))) {
25950
- } else {
25951
- single_quoted_value = true
25952
- };
25953
- } else if (c['$=='](self.delimiter)) {
25954
- value = ""
25955
- } else {
25956
-
25957
- value = "" + (c) + (self.$scan_to_delimiter());
25958
- if (value['$==']("None")) {
25959
- return true};
25960
- }};
25961
- };
25962
- };
25949
+ $case = (c = self.scanner.$get_byte());
25950
+ if ($$($nesting, 'QUOT')['$===']($case)) {value = self.$parse_attribute_value(c)}
25951
+ else if ($$($nesting, 'APOS')['$===']($case)) {
25952
+ value = self.$parse_attribute_value(c);
25953
+ if ($truthy(value['$start_with?']($$($nesting, 'APOS')))) {
25954
+ } else {
25955
+ single_quoted = true
25956
+ };}
25957
+ else if (self.delimiter['$===']($case)) {
25958
+ value = "";
25959
+ self.scanner.$unscan();}
25960
+ else if (nil['$===']($case)) {value = ""}
25961
+ else {
25962
+ value = "" + (c) + (self.$scan_to_delimiter());
25963
+ if (value['$==']("None")) {
25964
+ return true};};
25965
+ } else {
25966
+ name = "" + (name) + ($rb_times(" ", skipped)) + (c) + (self.$scan_to_delimiter())
25967
+ }
25968
+ } else {
25969
+ name = "" + (c) + (self.$scan_to_delimiter())
25970
+ };};
25963
25971
  if ($truthy(value)) {
25964
25972
  $case = name;
25965
25973
  if ("options"['$===']($case) || "opts"['$===']($case)) {if ($truthy(value['$include?'](","))) {
@@ -25989,7 +25997,7 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
25989
25997
  $send(self.attributes, '[]=', Opal.to_a($writer));
25990
25998
  $writer[$rb_minus($writer["length"], 1)];
25991
25999
  }}
25992
- else {if ($truthy(($truthy($a = single_quoted_value) ? self.block : $a))) {
26000
+ else {if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) {
25993
26001
  $case = name;
25994
26002
  if ("title"['$===']($case) || "reftext"['$===']($case)) {
25995
26003
  $writer = [name, value];
@@ -26007,44 +26015,40 @@ Opal.modules["asciidoctor/attribute_list"] = function(Opal) {
26007
26015
  }}
26008
26016
  } else {
26009
26017
 
26010
- resolved_name = (function() {if ($truthy(($truthy($a = single_quoted_value) ? self.block : $a))) {
26011
-
26012
- return self.block.$apply_subs(name);
26013
- } else {
26014
- return name
26015
- }; return nil; })();
26018
+ if ($truthy(($truthy($a = single_quoted) ? self.block : $a))) {
26019
+ name = self.block.$apply_subs(name)};
26016
26020
  if ($truthy((positional_attr_name = positional_attrs['$[]'](index)))) {
26017
26021
 
26018
- $writer = [positional_attr_name, resolved_name];
26022
+ $writer = [positional_attr_name, name];
26019
26023
  $send(self.attributes, '[]=', Opal.to_a($writer));
26020
26024
  $writer[$rb_minus($writer["length"], 1)];};
26021
26025
 
26022
- $writer = [$rb_plus(index, 1), resolved_name];
26026
+ $writer = [$rb_plus(index, 1), name];
26023
26027
  $send(self.attributes, '[]=', Opal.to_a($writer));
26024
26028
  $writer[$rb_minus($writer["length"], 1)];;
26025
26029
  };
26026
- return true;
26027
- }, $AttributeList_parse_attribute$7.$$arity = -1);
26030
+ return continue$;
26031
+ }, $AttributeList_parse_attribute$7.$$arity = 2);
26028
26032
 
26029
26033
  Opal.def(self, '$parse_attribute_value', $AttributeList_parse_attribute_value$9 = function $$parse_attribute_value(quote) {
26030
26034
  var self = this, value = nil;
26031
26035
 
26032
-
26033
26036
  if (self.scanner.$peek(1)['$=='](quote)) {
26034
26037
 
26035
26038
  self.scanner.$get_byte();
26036
- return "";};
26037
- if ($truthy((value = self.$scan_to_quote(quote)))) {
26039
+ return "";
26040
+ } else if ($truthy((value = self.$scan_to_quote(quote)))) {
26038
26041
 
26039
26042
  self.scanner.$get_byte();
26040
26043
  if ($truthy(value['$include?']($$($nesting, 'BACKSLASH')))) {
26041
- return value.$gsub($$($nesting, 'EscapedQuotes')['$[]'](quote), quote)
26044
+
26045
+ return value.$gsub($$($nesting, 'EscapedQuotes')['$[]'](quote), quote);
26042
26046
  } else {
26043
26047
  return value
26044
26048
  };
26045
26049
  } else {
26046
26050
  return "" + (quote) + (self.$scan_to_delimiter())
26047
- };
26051
+ }
26048
26052
  }, $AttributeList_parse_attribute_value$9.$$arity = 1);
26049
26053
 
26050
26054
  Opal.def(self, '$skip_blank', $AttributeList_skip_blank$10 = function $$skip_blank() {
@@ -26877,9 +26881,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
26877
26881
  function $rb_lt(lhs, rhs) {
26878
26882
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
26879
26883
  }
26880
- 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, $hash = Opal.hash;
26884
+ 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;
26881
26885
 
26882
- 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', '$&', '$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']);
26886
+ 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']);
26883
26887
  return (function($base, $parent_nesting) {
26884
26888
  var self = $module($base, 'Asciidoctor');
26885
26889
 
@@ -27167,10 +27171,22 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27167
27171
  $writer = ["embedded", ""];
27168
27172
  $send(attr_overrides, '[]=', Opal.to_a($writer));
27169
27173
  $writer[$rb_minus($writer["length"], 1)];;
27170
-
27171
- $writer = ["notitle", ""];
27172
- $send(attrs, '[]=', Opal.to_a($writer));
27173
- $writer[$rb_minus($writer["length"], 1)];;
27174
+ if ($truthy(($truthy($a = attr_overrides['$key?']("showtitle")) ? attr_overrides.$keys()['$&'](["notitle", "showtitle"])['$[]'](-1)['$==']("showtitle") : $a))) {
27175
+
27176
+ $writer = ["notitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("showtitle"))];
27177
+ $send(attr_overrides, '[]=', Opal.to_a($writer));
27178
+ $writer[$rb_minus($writer["length"], 1)];
27179
+ } else if ($truthy(attr_overrides['$key?']("notitle"))) {
27180
+
27181
+ $writer = ["showtitle", $hash(nil, "", false, "@", "@", false)['$[]'](attr_overrides['$[]']("notitle"))];
27182
+ $send(attr_overrides, '[]=', Opal.to_a($writer));
27183
+ $writer[$rb_minus($writer["length"], 1)];
27184
+ } else {
27185
+
27186
+ $writer = ["notitle", ""];
27187
+ $send(attrs, '[]=', Opal.to_a($writer));
27188
+ $writer[$rb_minus($writer["length"], 1)];
27189
+ };
27174
27190
  };
27175
27191
 
27176
27192
  $writer = ["asciidoctor", ""];
@@ -27694,9 +27710,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27694
27710
  }, $Document_revdate$38.$$arity = 0);
27695
27711
 
27696
27712
  Opal.def(self, '$notitle', $Document_notitle$39 = function $$notitle() {
27697
- var $a, self = this;
27713
+ var self = this;
27698
27714
 
27699
- return ($truthy($a = self.attributes['$key?']("showtitle")['$!']()) ? self.attributes['$key?']("notitle") : $a)
27715
+ return self.attributes['$key?']("notitle")
27700
27716
  }, $Document_notitle$39.$$arity = 0);
27701
27717
 
27702
27718
  Opal.def(self, '$noheader', $Document_noheader$40 = function $$noheader() {
@@ -28848,7 +28864,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
28848
28864
  }
28849
28865
  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;
28850
28866
 
28851
- 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', '$source_location', '$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', '$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', '$has_header_option=', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
28867
+ 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', '$%']);
28852
28868
  return (function($base, $parent_nesting) {
28853
28869
  var self = $module($base, 'Asciidoctor');
28854
28870
 
@@ -29321,6 +29337,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29321
29337
  } else if ($truthy(preamble)) {
29322
29338
  if ($truthy(preamble['$blocks?']())) {
29323
29339
  if ($truthy(($truthy($a = ($truthy($b = book) ? $b : document.$blocks()['$[]'](1))) ? $a : $$($nesting, 'Compliance').$unwrap_standalone_preamble()['$!']()))) {
29340
+ if ($truthy(document.$sourcemap())) {
29341
+
29342
+ $writer = [preamble.$blocks()['$[]'](0).$source_location()];
29343
+ $send(preamble, 'source_location=', Opal.to_a($writer));
29344
+ $writer[$rb_minus($writer["length"], 1)];}
29324
29345
  } else {
29325
29346
 
29326
29347
  document.$blocks().$shift();
@@ -29875,7 +29896,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29875
29896
  block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);}
29876
29897
  else if ("open"['$===']($case) || "abstract"['$===']($case) || "partintro"['$===']($case)) {block = self.$build_block("open", "compound", terminator, parent, reader, attributes)}
29877
29898
  else if ("literal"['$===']($case)) {block = self.$build_block(block_context, "verbatim", terminator, parent, reader, attributes)}
29878
- else if ("example"['$===']($case)) {block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes)}
29899
+ else if ("example"['$===']($case)) {
29900
+ if ($truthy(attributes['$[]']("collapsible-option"))) {
29901
+
29902
+ $writer = ["caption", ""];
29903
+ $send(attributes, '[]=', Opal.to_a($writer));
29904
+ $writer[$rb_minus($writer["length"], 1)];};
29905
+ block = self.$build_block(block_context, "compound", terminator, parent, reader, attributes);}
29879
29906
  else if ("quote"['$===']($case) || "verse"['$===']($case)) {
29880
29907
  $$($nesting, 'AttributeList').$rekey(attributes, [nil, "attribution", "citetitle"]);
29881
29908
  block = self.$build_block(block_context, (function() {if (block_context['$==']("verse")) {
@@ -30219,22 +30246,23 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30219
30246
 
30220
30247
 
30221
30248
  if ($truthy(($truthy($a = text['$include?']("[[")) ? $a : text['$include?']("or:")))) {
30222
- $send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, id = nil, reftext = nil, location = nil, offset = nil;
30249
+ $send(text, 'scan', [$$($nesting, 'InlineAnchorScanRx')], ($$23 = function(){var self = $$23.$$s || this, $b, $c, $d, id = nil, reftext = nil, location = nil, offset = nil;
30223
30250
 
30224
30251
 
30225
30252
  if ($truthy((id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](1))))) {
30226
- if ($truthy((reftext = (($b = $gvars['~']) === nil ? nil : $b['$[]'](2))))) {
30227
- if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
30228
- return nil;}}
30253
+ 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))) {
30254
+ return nil;}
30229
30255
  } else {
30230
30256
 
30231
30257
  id = (($b = $gvars['~']) === nil ? nil : $b['$[]'](3));
30232
30258
  if ($truthy((reftext = (($b = $gvars['~']) === nil ? nil : $b['$[]'](4))))) {
30233
-
30234
30259
  if ($truthy(reftext['$include?']("]"))) {
30235
- reftext = reftext.$gsub("\\]", "]")};
30236
- if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
30237
- return nil;};};
30260
+
30261
+ reftext = reftext.$gsub("\\]", "]");
30262
+ if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30263
+ reftext = document.$sub_attributes(reftext)};
30264
+ } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
30265
+ return nil;}};
30238
30266
  };
30239
30267
  if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
30240
30268
  return nil
@@ -31400,7 +31428,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31400
31428
  if ((name = self.$sanitize_attribute_name(name))['$==']("numbered")) {
31401
31429
  name = "sectnums"
31402
31430
  } else if (name['$==']("hardbreaks")) {
31403
- name = "hardbreaks-option"};
31431
+ name = "hardbreaks-option"
31432
+ } else if (name['$==']("showtitle")) {
31433
+ self.$store_attribute("notitle", (function() {if ($truthy(value)) {
31434
+ return nil
31435
+ } else {
31436
+ return ""
31437
+ }; return nil; })(), doc, attrs)};
31404
31438
  if ($truthy(doc)) {
31405
31439
  if ($truthy(value)) {
31406
31440
 
@@ -31514,7 +31548,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31514
31548
  }
31515
31549
  }, $Parser_is_sibling_list_item$ques$59.$$arity = 3);
31516
31550
  Opal.defs(self, '$parse_table', $Parser_parse_table$60 = function $$parse_table(table_reader, parent, attributes) {
31517
- var $a, $b, $c, $d, self = this, table = nil, colspecs = nil, explicit_colspecs = nil, skipped = nil, parser_ctx = nil, format = nil, loop_idx = nil, implicit_header_boundary = nil, implicit_header = nil, line = nil, beyond_first = nil, next_cellspec = nil, m = nil, pre_match = nil, post_match = nil, $case = nil, $writer = nil, cell_text = nil, $logical_op_recvr_tmp_2 = nil;
31551
+ 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;
31518
31552
 
31519
31553
 
31520
31554
  table = $$($nesting, 'Table').$new(parent, attributes);
@@ -31523,12 +31557,20 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31523
31557
  table.$create_columns(colspecs);
31524
31558
  explicit_colspecs = true;};
31525
31559
  skipped = ($truthy($a = table_reader.$skip_blank_lines()) ? $a : 0);
31560
+ if ($truthy(attributes['$[]']("header-option"))) {
31561
+
31562
+ $writer = [true];
31563
+ $send(table, 'has_header_option=', Opal.to_a($writer));
31564
+ $writer[$rb_minus($writer["length"], 1)];
31565
+ } else if ($truthy((($a = skipped['$=='](0)) ? attributes['$[]']("noheader-option")['$!']() : skipped['$=='](0)))) {
31566
+
31567
+
31568
+ $writer = ["implicit"];
31569
+ $send(table, 'has_header_option=', Opal.to_a($writer));
31570
+ $writer[$rb_minus($writer["length"], 1)];;
31571
+ implicit_header = true;};
31526
31572
  parser_ctx = $$$($$($nesting, 'Table'), 'ParserContext').$new(table_reader, table, attributes);
31527
31573
  $a = [parser_ctx.$format(), -1, nil], (format = $a[0]), (loop_idx = $a[1]), (implicit_header_boundary = $a[2]), $a;
31528
- if ($truthy(($truthy($a = ($truthy($b = $rb_gt(skipped, 0)) ? $b : attributes['$[]']("header-option"))) ? $a : attributes['$[]']("noheader-option")))) {
31529
- } else {
31530
- implicit_header = true
31531
- };
31532
31574
  $a = false; while ($a || $truthy((line = table_reader.$read_line()))) {$a = false;
31533
31575
 
31534
31576
  if ($truthy(($truthy($b = (beyond_first = $rb_gt((loop_idx = $rb_plus(loop_idx, 1)), 0))) ? line['$empty?']() : $b))) {
@@ -31552,7 +31594,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31552
31594
  if ($truthy(implicit_header_boundary)) {
31553
31595
  implicit_header_boundary = nil};
31554
31596
  } else if ($truthy(($truthy($b = implicit_header_boundary) ? implicit_header_boundary['$=='](loop_idx) : $b))) {
31555
- $b = [false, nil], (implicit_header = $b[0]), (implicit_header_boundary = $b[1]), $b};
31597
+
31598
+ $writer = [(implicit_header = (implicit_header_boundary = nil))];
31599
+ $send(table, 'has_header_option=', Opal.to_a($writer));
31600
+ $writer[$rb_minus($writer["length"], 1)];};
31556
31601
  }};
31557
31602
  if ($truthy(beyond_first)) {
31558
31603
  } else {
@@ -31562,7 +31607,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31562
31607
  if ($truthy(($truthy($b = table_reader['$has_more_lines?']()) ? table_reader.$peek_line()['$empty?']() : $b))) {
31563
31608
  implicit_header_boundary = 1
31564
31609
  } else {
31565
- implicit_header = false
31610
+
31611
+ $writer = [(implicit_header = nil)];
31612
+ $send(table, 'has_header_option=', Opal.to_a($writer));
31613
+ $writer[$rb_minus($writer["length"], 1)];
31566
31614
  }};
31567
31615
  };
31568
31616
  $b = false; while ($b || $truthy(true)) {$b = false;
@@ -31630,7 +31678,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31630
31678
  if ("csv"['$===']($case)) {if ($truthy(parser_ctx['$buffer_has_unclosed_quotes?']())) {
31631
31679
 
31632
31680
  if ($truthy(($truthy($c = implicit_header_boundary) ? loop_idx['$=='](0) : $c))) {
31633
- $c = [false, nil], (implicit_header = $c[0]), (implicit_header_boundary = $c[1]), $c};
31681
+
31682
+ $writer = [(implicit_header = (implicit_header_boundary = nil))];
31683
+ $send(table, 'has_header_option=', Opal.to_a($writer));
31684
+ $writer[$rb_minus($writer["length"], 1)];};
31634
31685
  parser_ctx.$keep_cell_open();
31635
31686
  } else {
31636
31687
  parser_ctx.$close_cell(true)
@@ -31659,14 +31710,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31659
31710
  };
31660
31711
  if ($truthy(implicit_header)) {
31661
31712
 
31662
-
31663
31713
  $writer = [true];
31664
31714
  $send(table, 'has_header_option=', Opal.to_a($writer));
31665
- $writer[$rb_minus($writer["length"], 1)];;
31666
-
31667
- $writer = ["header-option", ""];
31668
- $send(attributes, '[]=', Opal.to_a($writer));
31669
- $writer[$rb_minus($writer["length"], 1)];;};
31715
+ $writer[$rb_minus($writer["length"], 1)];};
31670
31716
  table.$partition_header_footer(attributes);
31671
31717
  return table;
31672
31718
  }, $Parser_parse_table$60.$$arity = 3);
@@ -34615,7 +34661,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34615
34661
  }
34616
34662
  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;
34617
34663
 
34618
- 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', '$style=', '$head=', '$pop', '$foot=', '$parent', '$sourcemap', '$dup', '$header_row?', '$table', '$delete', '$start_with?', '$rstrip', '$slice', '$length', '$advance', '$lstrip', '$strip', '$split', '$include?', '$readlines', '$unshift', '$nil?', '$=~', '$catalog_inline_anchor', '$apply_subs', '$convert', '$map', '$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']);
34664
+ 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']);
34619
34665
  return (function($base, $parent_nesting) {
34620
34666
  var self = $module($base, 'Asciidoctor');
34621
34667
 
@@ -34685,11 +34731,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34685
34731
  $send(self, Opal.find_super_dispatcher(self, 'initialize', $Table_initialize$4, false), [parent, "table"], null);
34686
34732
  self.rows = $$($nesting, 'Rows').$new();
34687
34733
  self.columns = [];
34688
- self.has_header_option = (function() {if ($truthy(attributes['$[]']("header-option"))) {
34689
- return true
34690
- } else {
34691
- return false
34692
- }; return nil; })();
34734
+ self.has_header_option = false;
34693
34735
  if ($truthy((pcwidth = attributes['$[]']("width")))) {
34694
34736
  if ($truthy(($truthy($a = $rb_gt((pcwidth_intval = pcwidth.$to_i()), 100)) ? $a : $rb_lt(pcwidth_intval, 1)))) {
34695
34737
  if ($truthy((($a = pcwidth_intval['$=='](0)) ? ($truthy($b = pcwidth['$==']("0")) ? $b : pcwidth['$==']("0%")) : pcwidth_intval['$=='](0)))) {
@@ -34723,9 +34765,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34723
34765
  }, $Table_initialize$4.$$arity = 2);
34724
34766
 
34725
34767
  Opal.def(self, '$header_row?', $Table_header_row$ques$5 = function() {
34726
- var $a, self = this;
34768
+ var $a, self = this, val = nil;
34727
34769
 
34728
- return ($truthy($a = self.has_header_option) ? self.rows.$body()['$empty?']() : $a)
34770
+ if ($truthy(($truthy($a = (val = self.has_header_option)) ? self.rows.$body()['$empty?']() : $a))) {
34771
+ return val
34772
+ } else {
34773
+ return nil
34774
+ }
34729
34775
  }, $Table_header_row$ques$5.$$arity = 0);
34730
34776
 
34731
34777
  Opal.def(self, '$create_columns', $Table_create_columns$6 = function $$create_columns(colspecs) {
@@ -34830,35 +34876,39 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34830
34876
  return nil;
34831
34877
  }, $Table_assign_column_widths$8.$$arity = -1);
34832
34878
  return (Opal.def(self, '$partition_header_footer', $Table_partition_header_footer$12 = function $$partition_header_footer(attrs) {
34833
- var $a, $$13, self = this, $writer = nil, num_body_rows = nil, head = nil;
34879
+ var $$13, $$14, $a, self = this, num_body_rows = nil, $writer = nil, body = nil;
34834
34880
 
34835
34881
 
34836
-
34837
- $writer = ["rowcount", self.rows.$body().$size()];
34838
- $send(self.attributes, '[]=', Opal.to_a($writer));
34839
- $writer[$rb_minus($writer["length"], 1)];;
34840
- num_body_rows = self.rows.$body().$size();
34841
- if ($truthy(($truthy($a = $rb_gt(num_body_rows, 0)) ? self.has_header_option : $a))) {
34842
-
34843
- head = self.rows.$body().$shift();
34844
- num_body_rows = $rb_minus(num_body_rows, 1);
34845
- $send(head, 'each', [], ($$13 = function(c){var self = $$13.$$s || this;
34882
+ num_body_rows = (($writer = ["rowcount", (body = self.rows.$body()).$size()]), $send(self.attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]);
34883
+ if ($truthy($rb_gt(num_body_rows, 0))) {
34884
+ if ($truthy(self.has_header_option)) {
34885
+
34886
+
34887
+ $writer = [[$send(body.$shift(), 'map', [], ($$13 = function(cell){var self = $$13.$$s || this;
34846
34888
 
34847
-
34848
34889
 
34849
- if (c == null) {
34850
- c = nil;
34851
- };
34852
- $writer = [nil];
34853
- $send(c, 'style=', Opal.to_a($writer));
34854
- return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13));
34855
-
34856
- $writer = [[head]];
34857
- $send(self.rows, 'head=', Opal.to_a($writer));
34858
- $writer[$rb_minus($writer["length"], 1)];;};
34890
+
34891
+ if (cell == null) {
34892
+ cell = nil;
34893
+ };
34894
+ return cell.$reinitialize(true);}, $$13.$$s = self, $$13.$$arity = 1, $$13))]];
34895
+ $send(self.rows, 'head=', Opal.to_a($writer));
34896
+ $writer[$rb_minus($writer["length"], 1)];;
34897
+ num_body_rows = $rb_minus(num_body_rows, 1);
34898
+ } else if ($truthy(self.has_header_option['$nil?']())) {
34899
+
34900
+ self.has_header_option = false;
34901
+ body.$unshift($send(body.$shift(), 'map', [], ($$14 = function(cell){var self = $$14.$$s || this;
34902
+
34903
+
34904
+
34905
+ if (cell == null) {
34906
+ cell = nil;
34907
+ };
34908
+ return cell.$reinitialize(false);}, $$14.$$s = self, $$14.$$arity = 1, $$14)));}};
34859
34909
  if ($truthy(($truthy($a = $rb_gt(num_body_rows, 0)) ? attrs['$[]']("footer-option") : $a))) {
34860
34910
 
34861
- $writer = [[self.rows.$body().$pop()]];
34911
+ $writer = [[body.$pop()]];
34862
34912
  $send(self.rows, 'foot=', Opal.to_a($writer));
34863
34913
  $writer[$rb_minus($writer["length"], 1)];};
34864
34914
  return nil;
@@ -34867,22 +34917,22 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34867
34917
  (function($base, $super, $parent_nesting) {
34868
34918
  var self = $klass($base, $super, 'Column');
34869
34919
 
34870
- var $nesting = [self].concat($parent_nesting), $Column_initialize$14, $Column_assign_width$15, $Column_block$ques$16, $Column_inline$ques$17;
34920
+ var $nesting = [self].concat($parent_nesting), $Column_initialize$15, $Column_assign_width$16, $Column_block$ques$17, $Column_inline$ques$18;
34871
34921
 
34872
34922
  self.$$prototype.attributes = nil;
34873
34923
 
34874
34924
  self.$attr_accessor("style");
34875
34925
 
34876
- Opal.def(self, '$initialize', $Column_initialize$14 = function $$initialize(table, index, attributes) {
34877
- var $a, $iter = $Column_initialize$14.$$p, $yield = $iter || nil, self = this, $writer = nil;
34926
+ Opal.def(self, '$initialize', $Column_initialize$15 = function $$initialize(table, index, attributes) {
34927
+ var $a, $iter = $Column_initialize$15.$$p, $yield = $iter || nil, self = this, $writer = nil;
34878
34928
 
34879
- if ($iter) $Column_initialize$14.$$p = null;
34929
+ if ($iter) $Column_initialize$15.$$p = null;
34880
34930
 
34881
34931
 
34882
34932
  if (attributes == null) {
34883
34933
  attributes = $hash2([], {});
34884
34934
  };
34885
- $send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$14, false), [table, "table_column"], null);
34935
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $Column_initialize$15, false), [table, "table_column"], null);
34886
34936
  self.style = attributes['$[]']("style");
34887
34937
 
34888
34938
  $writer = ["colnumber", $rb_plus(index, 1)];
@@ -34892,10 +34942,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34892
34942
  ($truthy($a = attributes['$[]']("halign")) ? $a : (($writer = ["halign", "left"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
34893
34943
  ($truthy($a = attributes['$[]']("valign")) ? $a : (($writer = ["valign", "top"]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
34894
34944
  return self.$update_attributes(attributes);
34895
- }, $Column_initialize$14.$$arity = -3);
34945
+ }, $Column_initialize$15.$$arity = -3);
34896
34946
  Opal.alias(self, "table", "parent");
34897
34947
 
34898
- Opal.def(self, '$assign_width', $Column_assign_width$15 = function $$assign_width(col_pcwidth, width_base, precision) {
34948
+ Opal.def(self, '$assign_width', $Column_assign_width$16 = function $$assign_width(col_pcwidth, width_base, precision) {
34899
34949
  var self = this, $writer = nil, col_abswidth = nil;
34900
34950
 
34901
34951
 
@@ -34917,25 +34967,25 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34917
34967
  $writer = ["colpcwidth", col_pcwidth];
34918
34968
  $send(self.attributes, '[]=', Opal.to_a($writer));
34919
34969
  return $writer[$rb_minus($writer["length"], 1)];;
34920
- }, $Column_assign_width$15.$$arity = 3);
34970
+ }, $Column_assign_width$16.$$arity = 3);
34921
34971
 
34922
- Opal.def(self, '$block?', $Column_block$ques$16 = function() {
34972
+ Opal.def(self, '$block?', $Column_block$ques$17 = function() {
34923
34973
  var self = this;
34924
34974
 
34925
34975
  return false
34926
- }, $Column_block$ques$16.$$arity = 0);
34927
- return (Opal.def(self, '$inline?', $Column_inline$ques$17 = function() {
34976
+ }, $Column_block$ques$17.$$arity = 0);
34977
+ return (Opal.def(self, '$inline?', $Column_inline$ques$18 = function() {
34928
34978
  var self = this;
34929
34979
 
34930
34980
  return false
34931
- }, $Column_inline$ques$17.$$arity = 0), nil) && 'inline?';
34981
+ }, $Column_inline$ques$18.$$arity = 0), nil) && 'inline?';
34932
34982
  })($$($nesting, 'Table'), $$($nesting, 'AbstractNode'), $nesting);
34933
34983
  (function($base, $super, $parent_nesting) {
34934
34984
  var self = $klass($base, $super, 'Cell');
34935
34985
 
34936
- var $nesting = [self].concat($parent_nesting), $Cell_initialize$18, $Cell_text$19, $Cell_text$eq$20, $Cell_content$21, $Cell_lines$23, $Cell_source$24, $Cell_file$25, $Cell_lineno$26, $Cell_to_s$27;
34986
+ 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;
34937
34987
 
34938
- 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 = self.$$prototype.attributes = nil;
34988
+ 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;
34939
34989
 
34940
34990
  Opal.const_set($nesting[0], 'DOUBLE_LF', $rb_times($$($nesting, 'LF'), 2));
34941
34991
  self.$attr_accessor("colspan");
@@ -34943,10 +34993,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34943
34993
  Opal.alias(self, "column", "parent");
34944
34994
  self.$attr_reader("inner_document");
34945
34995
 
34946
- Opal.def(self, '$initialize', $Cell_initialize$18 = function $$initialize(column, cell_text, attributes, opts) {
34947
- var $a, $b, $iter = $Cell_initialize$18.$$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;
34996
+ Opal.def(self, '$initialize', $Cell_initialize$19 = function $$initialize(column, cell_text, attributes, opts) {
34997
+ 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;
34948
34998
 
34949
- if ($iter) $Cell_initialize$18.$$p = null;
34999
+ if ($iter) $Cell_initialize$19.$$p = null;
34950
35000
 
34951
35001
 
34952
35002
  if (attributes == null) {
@@ -34956,14 +35006,20 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34956
35006
  if (opts == null) {
34957
35007
  opts = $hash2([], {});
34958
35008
  };
34959
- $send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$18, false), [column, "table_cell"], null);
35009
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $Cell_initialize$19, false), [column, "table_cell"], null);
35010
+ self.cursor = (self.reinitialize_args = nil);
34960
35011
  if ($truthy(self.document.$sourcemap())) {
34961
35012
  self.source_location = opts['$[]']("cursor").$dup()};
34962
35013
  if ($truthy(column)) {
34963
35014
 
34964
35015
  if ($truthy((in_header_row = column.$table()['$header_row?']()))) {
35016
+ if ($truthy((($a = in_header_row['$==']("implicit")) ? (cell_style = ($truthy($b = column.$style()) ? $b : ($truthy($c = attributes) ? attributes['$[]']("style") : $c))) : in_header_row['$==']("implicit")))) {
35017
+
35018
+ if ($truthy(($truthy($a = cell_style['$==']("asciidoc")) ? $a : cell_style['$==']("literal")))) {
35019
+ self.reinitialize_args = [column, cell_text, ($truthy($a = attributes) ? attributes.$merge() : $a), opts]};
35020
+ cell_style = nil;}
34965
35021
  } else {
34966
- cell_style = column.$attributes()['$[]']("style")
35022
+ cell_style = column.$style()
34967
35023
  };
34968
35024
  self.$update_attributes(column.$attributes());};
34969
35025
  if ($truthy(attributes)) {
@@ -35049,34 +35105,77 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35049
35105
  self.subs = $$($nesting, 'BASIC_SUBS');
35050
35106
  } else {
35051
35107
 
35052
- if ($truthy(($truthy($a = ($truthy($b = normal_psv) ? cell_text['$start_with?']("[[") : $b)) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](cell_text) : $a))) {
35053
- $$($nesting, 'Parser').$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), self, opts['$[]']("cursor"), self.document)};
35108
+ if ($truthy(normal_psv)) {
35109
+ if ($truthy(in_header_row)) {
35110
+ self.cursor = opts['$[]']("cursor")
35111
+ } else {
35112
+ self.$catalog_inline_anchor(cell_text, opts['$[]']("cursor"))
35113
+ }};
35054
35114
  self.content_model = "simple";
35055
35115
  self.subs = $$($nesting, 'NORMAL_SUBS');
35056
35116
  };
35057
35117
  self.text = cell_text;
35058
35118
  return (self.style = cell_style);
35059
- }, $Cell_initialize$18.$$arity = -3);
35119
+ }, $Cell_initialize$19.$$arity = -3);
35060
35120
 
35061
- Opal.def(self, '$text', $Cell_text$19 = function $$text() {
35121
+ Opal.def(self, '$reinitialize', $Cell_reinitialize$20 = function $$reinitialize(has_header) {
35122
+ var self = this;
35123
+
35124
+
35125
+ if ($truthy(has_header)) {
35126
+ self.reinitialize_args = nil
35127
+ } else if ($truthy(self.reinitialize_args)) {
35128
+ return $send($$$($$($nesting, 'Table'), 'Cell'), 'new', Opal.to_a(self.reinitialize_args))
35129
+ } else {
35130
+ self.style = self.attributes['$[]']("style")
35131
+ };
35132
+ if ($truthy(self.cursor)) {
35133
+ self.$catalog_inline_anchor()};
35134
+ return self;
35135
+ }, $Cell_reinitialize$20.$$arity = 1);
35136
+
35137
+ Opal.def(self, '$catalog_inline_anchor', $Cell_catalog_inline_anchor$21 = function $$catalog_inline_anchor(cell_text, cursor) {
35138
+ var $a, self = this;
35139
+
35140
+
35141
+
35142
+ if (cell_text == null) {
35143
+ cell_text = self.text;
35144
+ };
35145
+
35146
+ if (cursor == null) {
35147
+ cursor = nil;
35148
+ };
35149
+ if ($truthy(cursor)) {
35150
+ } else {
35151
+ $a = [self.cursor, nil], (cursor = $a[0]), (self.cursor = $a[1]), $a
35152
+ };
35153
+ if ($truthy(($truthy($a = cell_text['$start_with?']("[[")) ? $$($nesting, 'LeadingInlineAnchorRx')['$=~'](cell_text) : $a))) {
35154
+ return $$($nesting, 'Parser').$catalog_inline_anchor((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), self, cursor, self.document)
35155
+ } else {
35156
+ return nil
35157
+ };
35158
+ }, $Cell_catalog_inline_anchor$21.$$arity = -1);
35159
+
35160
+ Opal.def(self, '$text', $Cell_text$22 = function $$text() {
35062
35161
  var self = this;
35063
35162
 
35064
35163
  return self.$apply_subs(self.text, self.subs)
35065
- }, $Cell_text$19.$$arity = 0);
35164
+ }, $Cell_text$22.$$arity = 0);
35066
35165
 
35067
- Opal.def(self, '$text=', $Cell_text$eq$20 = function(val) {
35166
+ Opal.def(self, '$text=', $Cell_text$eq$23 = function(val) {
35068
35167
  var self = this;
35069
35168
 
35070
35169
  return (self.text = val)
35071
- }, $Cell_text$eq$20.$$arity = 1);
35170
+ }, $Cell_text$eq$23.$$arity = 1);
35072
35171
 
35073
- Opal.def(self, '$content', $Cell_content$21 = function $$content() {
35074
- var $$22, $a, self = this, cell_style = nil, subbed_text = nil;
35172
+ Opal.def(self, '$content', $Cell_content$24 = function $$content() {
35173
+ var $$25, $a, self = this, cell_style = nil, subbed_text = nil;
35075
35174
 
35076
35175
  if ((cell_style = self.style)['$==']("asciidoc")) {
35077
35176
  return self.inner_document.$convert()
35078
35177
  } else if ($truthy(self.text['$include?']($$($nesting, 'DOUBLE_LF')))) {
35079
- return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$22 = function(para){var self = $$22.$$s || this, $a;
35178
+ return $send(self.$text().$split($$($nesting, 'BlankLineRx')), 'map', [], ($$25 = function(para){var self = $$25.$$s || this, $a;
35080
35179
 
35081
35180
 
35082
35181
 
@@ -35087,7 +35186,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35087
35186
  return $$($nesting, 'Inline').$new(self.$parent(), "quoted", para, $hash2(["type"], {"type": cell_style})).$convert()
35088
35187
  } else {
35089
35188
  return para
35090
- };}, $$22.$$s = self, $$22.$$arity = 1, $$22))
35189
+ };}, $$25.$$s = self, $$25.$$arity = 1, $$25))
35091
35190
  } else if ($truthy((subbed_text = self.$text())['$empty?']())) {
35092
35191
  return []
35093
35192
  } else if ($truthy(($truthy($a = cell_style) ? cell_style['$!=']("header") : $a))) {
@@ -35095,46 +35194,46 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35095
35194
  } else {
35096
35195
  return [subbed_text]
35097
35196
  }
35098
- }, $Cell_content$21.$$arity = 0);
35197
+ }, $Cell_content$24.$$arity = 0);
35099
35198
 
35100
- Opal.def(self, '$lines', $Cell_lines$23 = function $$lines() {
35199
+ Opal.def(self, '$lines', $Cell_lines$26 = function $$lines() {
35101
35200
  var self = this;
35102
35201
 
35103
35202
  return self.text.$split($$($nesting, 'LF'))
35104
- }, $Cell_lines$23.$$arity = 0);
35203
+ }, $Cell_lines$26.$$arity = 0);
35105
35204
 
35106
- Opal.def(self, '$source', $Cell_source$24 = function $$source() {
35205
+ Opal.def(self, '$source', $Cell_source$27 = function $$source() {
35107
35206
  var self = this;
35108
35207
 
35109
35208
  return self.text
35110
- }, $Cell_source$24.$$arity = 0);
35209
+ }, $Cell_source$27.$$arity = 0);
35111
35210
 
35112
- Opal.def(self, '$file', $Cell_file$25 = function $$file() {
35211
+ Opal.def(self, '$file', $Cell_file$28 = function $$file() {
35113
35212
  var $a, self = this;
35114
35213
 
35115
35214
  return ($truthy($a = self.source_location) ? self.source_location.$file() : $a)
35116
- }, $Cell_file$25.$$arity = 0);
35215
+ }, $Cell_file$28.$$arity = 0);
35117
35216
 
35118
- Opal.def(self, '$lineno', $Cell_lineno$26 = function $$lineno() {
35217
+ Opal.def(self, '$lineno', $Cell_lineno$29 = function $$lineno() {
35119
35218
  var $a, self = this;
35120
35219
 
35121
35220
  return ($truthy($a = self.source_location) ? self.source_location.$lineno() : $a)
35122
- }, $Cell_lineno$26.$$arity = 0);
35123
- return (Opal.def(self, '$to_s', $Cell_to_s$27 = function $$to_s() {
35124
- var $a, $iter = $Cell_to_s$27.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
35221
+ }, $Cell_lineno$29.$$arity = 0);
35222
+ return (Opal.def(self, '$to_s', $Cell_to_s$30 = function $$to_s() {
35223
+ var $a, $iter = $Cell_to_s$30.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
35125
35224
 
35126
- if ($iter) $Cell_to_s$27.$$p = null;
35225
+ if ($iter) $Cell_to_s$30.$$p = null;
35127
35226
  // Prepare super implicit arguments
35128
35227
  for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
35129
35228
  $zuper[$zuper_i] = arguments[$zuper_i];
35130
35229
  }
35131
- return "" + ($send(self, Opal.find_super_dispatcher(self, 'to_s', $Cell_to_s$27, 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) + "]"
35132
- }, $Cell_to_s$27.$$arity = 0), nil) && 'to_s';
35230
+ 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) + "]"
35231
+ }, $Cell_to_s$30.$$arity = 0), nil) && 'to_s';
35133
35232
  })($$($nesting, 'Table'), $$($nesting, 'AbstractBlock'), $nesting);
35134
35233
  (function($base, $super, $parent_nesting) {
35135
35234
  var self = $klass($base, $super, 'ParserContext');
35136
35235
 
35137
- var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$28, $ParserContext_starts_with_delimiter$ques$29, $ParserContext_match_delimiter$30, $ParserContext_skip_past_delimiter$31, $ParserContext_skip_past_escaped_delimiter$32, $ParserContext_buffer_has_unclosed_quotes$ques$33, $ParserContext_take_cellspec$34, $ParserContext_push_cellspec$35, $ParserContext_keep_cell_open$36, $ParserContext_mark_cell_closed$37, $ParserContext_cell_open$ques$38, $ParserContext_cell_closed$ques$39, $ParserContext_close_open_cell$40, $ParserContext_close_cell$41, $ParserContext_close_row$44, $ParserContext_activate_rowspan$45, $ParserContext_end_of_row$ques$47, $ParserContext_effective_column_visits$48, $ParserContext_advance$49;
35236
+ 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;
35138
35237
 
35139
35238
  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;
35140
35239
 
@@ -35148,7 +35247,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35148
35247
  self.$attr_reader("delimiter");
35149
35248
  self.$attr_reader("delimiter_re");
35150
35249
 
35151
- Opal.def(self, '$initialize', $ParserContext_initialize$28 = function $$initialize(reader, table, attributes) {
35250
+ Opal.def(self, '$initialize', $ParserContext_initialize$31 = function $$initialize(reader, table, attributes) {
35152
35251
  var $a, $b, self = this, xsv = nil, sep = nil;
35153
35252
 
35154
35253
 
@@ -35203,37 +35302,37 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35203
35302
  self.column_visits = 0;
35204
35303
  self.current_row = [];
35205
35304
  return (self.linenum = -1);
35206
- }, $ParserContext_initialize$28.$$arity = -3);
35305
+ }, $ParserContext_initialize$31.$$arity = -3);
35207
35306
 
35208
- Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$29 = function(line) {
35307
+ Opal.def(self, '$starts_with_delimiter?', $ParserContext_starts_with_delimiter$ques$32 = function(line) {
35209
35308
  var self = this;
35210
35309
 
35211
35310
  return line['$start_with?'](self.delimiter)
35212
- }, $ParserContext_starts_with_delimiter$ques$29.$$arity = 1);
35311
+ }, $ParserContext_starts_with_delimiter$ques$32.$$arity = 1);
35213
35312
 
35214
- Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$30 = function $$match_delimiter(line) {
35313
+ Opal.def(self, '$match_delimiter', $ParserContext_match_delimiter$33 = function $$match_delimiter(line) {
35215
35314
  var self = this;
35216
35315
 
35217
35316
  return self.delimiter_rx.$match(line)
35218
- }, $ParserContext_match_delimiter$30.$$arity = 1);
35317
+ }, $ParserContext_match_delimiter$33.$$arity = 1);
35219
35318
 
35220
- Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$31 = function $$skip_past_delimiter(pre) {
35319
+ Opal.def(self, '$skip_past_delimiter', $ParserContext_skip_past_delimiter$34 = function $$skip_past_delimiter(pre) {
35221
35320
  var self = this;
35222
35321
 
35223
35322
 
35224
35323
  self.buffer = "" + (self.buffer) + (pre) + (self.delimiter);
35225
35324
  return nil;
35226
- }, $ParserContext_skip_past_delimiter$31.$$arity = 1);
35325
+ }, $ParserContext_skip_past_delimiter$34.$$arity = 1);
35227
35326
 
35228
- Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$32 = function $$skip_past_escaped_delimiter(pre) {
35327
+ Opal.def(self, '$skip_past_escaped_delimiter', $ParserContext_skip_past_escaped_delimiter$35 = function $$skip_past_escaped_delimiter(pre) {
35229
35328
  var self = this;
35230
35329
 
35231
35330
 
35232
35331
  self.buffer = "" + (self.buffer) + (pre.$chop()) + (self.delimiter);
35233
35332
  return nil;
35234
- }, $ParserContext_skip_past_escaped_delimiter$32.$$arity = 1);
35333
+ }, $ParserContext_skip_past_escaped_delimiter$35.$$arity = 1);
35235
35334
 
35236
- Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$33 = function(append) {
35335
+ Opal.def(self, '$buffer_has_unclosed_quotes?', $ParserContext_buffer_has_unclosed_quotes$ques$36 = function(append) {
35237
35336
  var $a, $b, self = this, record = nil, trailing_quote = nil;
35238
35337
 
35239
35338
 
@@ -35256,15 +35355,15 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35256
35355
  } else {
35257
35356
  return false
35258
35357
  };
35259
- }, $ParserContext_buffer_has_unclosed_quotes$ques$33.$$arity = -1);
35358
+ }, $ParserContext_buffer_has_unclosed_quotes$ques$36.$$arity = -1);
35260
35359
 
35261
- Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$34 = function $$take_cellspec() {
35360
+ Opal.def(self, '$take_cellspec', $ParserContext_take_cellspec$37 = function $$take_cellspec() {
35262
35361
  var self = this;
35263
35362
 
35264
35363
  return self.cellspecs.$shift()
35265
- }, $ParserContext_take_cellspec$34.$$arity = 0);
35364
+ }, $ParserContext_take_cellspec$37.$$arity = 0);
35266
35365
 
35267
- Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$35 = function $$push_cellspec(cellspec) {
35366
+ Opal.def(self, '$push_cellspec', $ParserContext_push_cellspec$38 = function $$push_cellspec(cellspec) {
35268
35367
  var $a, self = this;
35269
35368
 
35270
35369
 
@@ -35274,37 +35373,37 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35274
35373
  };
35275
35374
  self.cellspecs['$<<'](($truthy($a = cellspec) ? $a : $hash2([], {})));
35276
35375
  return nil;
35277
- }, $ParserContext_push_cellspec$35.$$arity = -1);
35376
+ }, $ParserContext_push_cellspec$38.$$arity = -1);
35278
35377
 
35279
- Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$36 = function $$keep_cell_open() {
35378
+ Opal.def(self, '$keep_cell_open', $ParserContext_keep_cell_open$39 = function $$keep_cell_open() {
35280
35379
  var self = this;
35281
35380
 
35282
35381
 
35283
35382
  self.cell_open = true;
35284
35383
  return nil;
35285
- }, $ParserContext_keep_cell_open$36.$$arity = 0);
35384
+ }, $ParserContext_keep_cell_open$39.$$arity = 0);
35286
35385
 
35287
- Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$37 = function $$mark_cell_closed() {
35386
+ Opal.def(self, '$mark_cell_closed', $ParserContext_mark_cell_closed$40 = function $$mark_cell_closed() {
35288
35387
  var self = this;
35289
35388
 
35290
35389
 
35291
35390
  self.cell_open = false;
35292
35391
  return nil;
35293
- }, $ParserContext_mark_cell_closed$37.$$arity = 0);
35392
+ }, $ParserContext_mark_cell_closed$40.$$arity = 0);
35294
35393
 
35295
- Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$38 = function() {
35394
+ Opal.def(self, '$cell_open?', $ParserContext_cell_open$ques$41 = function() {
35296
35395
  var self = this;
35297
35396
 
35298
35397
  return self.cell_open
35299
- }, $ParserContext_cell_open$ques$38.$$arity = 0);
35398
+ }, $ParserContext_cell_open$ques$41.$$arity = 0);
35300
35399
 
35301
- Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$39 = function() {
35400
+ Opal.def(self, '$cell_closed?', $ParserContext_cell_closed$ques$42 = function() {
35302
35401
  var self = this;
35303
35402
 
35304
35403
  return self.cell_open['$!']()
35305
- }, $ParserContext_cell_closed$ques$39.$$arity = 0);
35404
+ }, $ParserContext_cell_closed$ques$42.$$arity = 0);
35306
35405
 
35307
- Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$40 = function $$close_open_cell(next_cellspec) {
35406
+ Opal.def(self, '$close_open_cell', $ParserContext_close_open_cell$43 = function $$close_open_cell(next_cellspec) {
35308
35407
  var self = this;
35309
35408
 
35310
35409
 
@@ -35317,11 +35416,11 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35317
35416
  self.$close_cell(true)};
35318
35417
  self.$advance();
35319
35418
  return nil;
35320
- }, $ParserContext_close_open_cell$40.$$arity = -1);
35419
+ }, $ParserContext_close_open_cell$43.$$arity = -1);
35321
35420
 
35322
- Opal.def(self, '$close_cell', $ParserContext_close_cell$41 = function $$close_cell(eol) {try {
35421
+ Opal.def(self, '$close_cell', $ParserContext_close_cell$44 = function $$close_cell(eol) {try {
35323
35422
 
35324
- var $a, $b, $$42, self = this, cell_text = nil, cellspec = nil, repeat = nil;
35423
+ var $a, $b, $$45, self = this, cell_text = nil, cellspec = nil, repeat = nil;
35325
35424
 
35326
35425
 
35327
35426
 
@@ -35359,7 +35458,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35359
35458
  cell_text = cell_text.$squeeze("\"")
35360
35459
  }};
35361
35460
  };
35362
- $send((1), 'upto', [repeat], ($$42 = function(i){var self = $$42.$$s || this, $c, $d, $$43, $e, column = nil, extra_cols = nil, offset = nil, cell = nil;
35461
+ $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;
35363
35462
  if (self.colcount == null) self.colcount = nil;
35364
35463
  if (self.table == null) self.table = nil;
35365
35464
  if (self.current_row == null) self.current_row = nil;
@@ -35378,7 +35477,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35378
35477
  if ($truthy(($truthy($c = ($truthy($d = cellspec) ? cellspec['$key?']("colspan") : $d)) ? $rb_gt((extra_cols = $rb_minus(cellspec['$[]']("colspan").$to_i(), 1)), 0) : $c))) {
35379
35478
 
35380
35479
  offset = self.table.$columns().$size();
35381
- $send(extra_cols, 'times', [], ($$43 = function(j){var self = $$43.$$s || this;
35480
+ $send(extra_cols, 'times', [], ($$46 = function(j){var self = $$46.$$s || this;
35382
35481
  if (self.table == null) self.table = nil;
35383
35482
 
35384
35483
 
@@ -35386,7 +35485,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35386
35485
  if (j == null) {
35387
35486
  j = nil;
35388
35487
  };
35389
- return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$43.$$s = self, $$43.$$arity = 1, $$43));};
35488
+ return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$46.$$s = self, $$46.$$arity = 1, $$46));};
35390
35489
  } else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) {
35391
35490
  } else {
35392
35491
 
@@ -35405,14 +35504,14 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35405
35504
  return self.$close_row()
35406
35505
  } else {
35407
35506
  return nil
35408
- };}, $$42.$$s = self, $$42.$$arity = 1, $$42));
35507
+ };}, $$45.$$s = self, $$45.$$arity = 1, $$45));
35409
35508
  self.cell_open = false;
35410
35509
  return nil;
35411
35510
  } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
35412
- }, $ParserContext_close_cell$41.$$arity = -1);
35511
+ }, $ParserContext_close_cell$44.$$arity = -1);
35413
35512
  self.$private();
35414
35513
 
35415
- Opal.def(self, '$close_row', $ParserContext_close_row$44 = function $$close_row() {
35514
+ Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row() {
35416
35515
  var $a, self = this, $writer = nil;
35417
35516
 
35418
35517
 
@@ -35424,13 +35523,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35424
35523
  self.active_rowspans.$shift();
35425
35524
  ($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
35426
35525
  return nil;
35427
- }, $ParserContext_close_row$44.$$arity = 0);
35526
+ }, $ParserContext_close_row$47.$$arity = 0);
35428
35527
 
35429
- Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$45 = function $$activate_rowspan(rowspan, colspan) {
35430
- var $$46, self = this;
35528
+ Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) {
35529
+ var $$49, self = this;
35431
35530
 
35432
35531
 
35433
- $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$46 = function(i){var self = $$46.$$s || this, $a, $writer = nil;
35532
+ $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil;
35434
35533
  if (self.active_rowspans == null) self.active_rowspans = nil;
35435
35534
 
35436
35535
 
@@ -35440,26 +35539,26 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35440
35539
  };
35441
35540
  $writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)];
35442
35541
  $send(self.active_rowspans, '[]=', Opal.to_a($writer));
35443
- return $writer[$rb_minus($writer["length"], 1)];}, $$46.$$s = self, $$46.$$arity = 1, $$46));
35542
+ return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49));
35444
35543
  return nil;
35445
- }, $ParserContext_activate_rowspan$45.$$arity = 2);
35544
+ }, $ParserContext_activate_rowspan$48.$$arity = 2);
35446
35545
 
35447
- Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$47 = function() {
35546
+ Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() {
35448
35547
  var $a, self = this;
35449
35548
 
35450
35549
  return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount))
35451
- }, $ParserContext_end_of_row$ques$47.$$arity = 0);
35550
+ }, $ParserContext_end_of_row$ques$50.$$arity = 0);
35452
35551
 
35453
- Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$48 = function $$effective_column_visits() {
35552
+ Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() {
35454
35553
  var self = this;
35455
35554
 
35456
35555
  return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0))
35457
- }, $ParserContext_effective_column_visits$48.$$arity = 0);
35458
- return (Opal.def(self, '$advance', $ParserContext_advance$49 = function $$advance() {
35556
+ }, $ParserContext_effective_column_visits$51.$$arity = 0);
35557
+ return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() {
35459
35558
  var self = this;
35460
35559
 
35461
35560
  return (self.linenum = $rb_plus(self.linenum, 1))
35462
- }, $ParserContext_advance$49.$$arity = 0), nil) && 'advance';
35561
+ }, $ParserContext_advance$52.$$arity = 0), nil) && 'advance';
35463
35562
  })($$($nesting, 'Table'), null, $nesting);
35464
35563
  })($nesting[0], $nesting)
35465
35564
  };
@@ -35523,205 +35622,207 @@ Opal.modules["asciidoctor/load"] = function(Opal) {
35523
35622
  }
35524
35623
  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;
35525
35624
 
35526
- Opal.add_stubs(['$module_function', '$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']);
35625
+ 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']);
35527
35626
  return (function($base, $parent_nesting) {
35528
35627
  var self = $module($base, 'Asciidoctor');
35529
35628
 
35530
- var $nesting = [self].concat($parent_nesting), $Asciidoctor_load$1, $Asciidoctor_load_file$8;
35629
+ var $nesting = [self].concat($parent_nesting);
35531
35630
 
35532
-
35533
- self.$module_function();
35534
-
35535
- Opal.def(self, '$load', $Asciidoctor_load$1 = function $$load(input, options) {
35536
- 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;
35631
+ (function(self, $parent_nesting) {
35632
+ var $nesting = [self].concat($parent_nesting), $load$1, $load_file$8;
35537
35633
 
35538
35634
 
35539
35635
 
35540
- if (options == null) {
35541
- options = $hash2([], {});
35542
- };
35543
- try {
35544
-
35545
- options = options.$merge();
35546
- if ($truthy((timings = options['$[]']("timings")))) {
35547
- timings.$start("read")};
35548
- if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
35549
-
35550
- $writer = [logger];
35551
- $send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
35552
- $writer[$rb_minus($writer["length"], 1)];};
35553
- if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
35554
- attrs = $hash2([], {})
35555
- } else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
35556
- attrs = attrs.$merge()
35557
- } 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))) {
35558
- attrs = attrs.$dup()
35559
- } else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
35560
- attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
35636
+ Opal.def(self, '$load', $load$1 = function $$load(input, options) {
35637
+ 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;
35561
35638
 
35639
+
35640
+
35641
+ if (options == null) {
35642
+ options = $hash2([], {});
35643
+ };
35644
+ try {
35562
35645
 
35646
+ options = options.$merge();
35647
+ if ($truthy((timings = options['$[]']("timings")))) {
35648
+ timings.$start("read")};
35649
+ if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
35563
35650
 
35564
- if (accum == null) {
35565
- accum = nil;
35566
- };
35567
- return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
35651
+ $writer = [logger];
35652
+ $send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
35653
+ $writer[$rb_minus($writer["length"], 1)];};
35654
+ if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
35655
+ attrs = $hash2([], {})
35656
+ } else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
35657
+ attrs = attrs.$merge()
35658
+ } 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))) {
35659
+ attrs = attrs.$dup()
35660
+ } else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
35661
+ attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
35568
35662
 
35569
35663
 
35570
35664
 
35571
- if (entry == null) {
35572
- entry = nil;
35665
+ if (accum == null) {
35666
+ accum = nil;
35573
35667
  };
35574
- $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;
35575
-
35576
- $writer = [k, v];
35577
- $send(accum, '[]=', Opal.to_a($writer));
35578
- return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
35579
- } else if ($truthy($$$('::', 'String')['$==='](attrs))) {
35580
- attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
35668
+ return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
35581
35669
 
35582
-
35583
-
35584
- if (accum == null) {
35585
- accum = nil;
35586
- };
35587
- 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;
35670
+
35671
+
35672
+ if (entry == null) {
35673
+ entry = nil;
35674
+ };
35675
+ $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;
35676
+
35677
+ $writer = [k, v];
35678
+ $send(accum, '[]=', Opal.to_a($writer));
35679
+ return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
35680
+ } else if ($truthy($$$('::', 'String')['$==='](attrs))) {
35681
+ attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
35588
35682
 
35589
35683
 
35590
35684
 
35591
- if (entry == null) {
35592
- entry = nil;
35685
+ if (accum == null) {
35686
+ accum = nil;
35593
35687
  };
35594
- $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;
35688
+ 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;
35689
+
35595
35690
 
35596
- $writer = [k, v];
35597
- $send(accum, '[]=', Opal.to_a($writer));
35598
- return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
35599
- } else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
35600
- attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
35601
-
35602
-
35603
-
35604
- if (accum == null) {
35605
- accum = nil;
35606
- };
35607
- return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this;
35691
+
35692
+ if (entry == null) {
35693
+ entry = nil;
35694
+ };
35695
+ $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;
35696
+
35697
+ $writer = [k, v];
35698
+ $send(accum, '[]=', Opal.to_a($writer));
35699
+ return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
35700
+ } else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
35701
+ attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
35608
35702
 
35609
35703
 
35610
35704
 
35611
- if (k == null) {
35612
- k = nil;
35705
+ if (accum == null) {
35706
+ accum = nil;
35613
35707
  };
35614
- $writer = [k, attrs['$[]'](k)];
35615
- $send(accum, '[]=', Opal.to_a($writer));
35616
- return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6))
35617
- } else {
35618
- self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
35619
- };
35620
- if ($truthy($$$('::', 'File')['$==='](input))) {
35621
-
35622
-
35623
- $writer = ["input_mtime", input.$mtime()];
35624
- $send(options, '[]=', Opal.to_a($writer));
35625
- $writer[$rb_minus($writer["length"], 1)];;
35626
-
35627
- $writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
35628
- $send(attrs, '[]=', Opal.to_a($writer));
35629
- $writer[$rb_minus($writer["length"], 1)];;
35630
-
35631
- $writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
35632
- $send(attrs, '[]=', Opal.to_a($writer));
35633
- $writer[$rb_minus($writer["length"], 1)];;
35634
-
35635
- $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)]))];
35636
- $send(attrs, '[]=', Opal.to_a($writer));
35637
- $writer[$rb_minus($writer["length"], 1)];;
35638
- source = input.$read();
35639
- } else if ($truthy(input['$respond_to?']("read"))) {
35640
-
35641
- try {
35642
- input.$rewind()
35643
- } catch ($err) {
35644
- if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
35645
- try {
35646
- nil
35647
- } finally { Opal.pop_exception() }
35648
- } else { throw $err; }
35708
+ return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this;
35709
+
35710
+
35711
+
35712
+ if (k == null) {
35713
+ k = nil;
35714
+ };
35715
+ $writer = [k, attrs['$[]'](k)];
35716
+ $send(accum, '[]=', Opal.to_a($writer));
35717
+ return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6))
35718
+ } else {
35719
+ self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
35649
35720
  };
35650
- source = input.$read();
35651
- } else if ($truthy($$$('::', 'String')['$==='](input))) {
35652
- source = input
35653
- } else if ($truthy($$$('::', 'Array')['$==='](input))) {
35654
- source = input.$drop(0)
35655
- } else if ($truthy(input)) {
35656
- self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
35657
- if ($truthy(timings)) {
35658
-
35659
- timings.$record("read");
35660
- timings.$start("parse");};
35661
-
35662
- $writer = ["attributes", attrs];
35663
- $send(options, '[]=', Opal.to_a($writer));
35664
- $writer[$rb_minus($writer["length"], 1)];;
35665
- doc = (function() {if (options['$[]']("parse")['$=='](false)) {
35666
-
35667
- return $$($nesting, 'Document').$new(source, options);
35668
- } else {
35669
- return $$($nesting, 'Document').$new(source, options).$parse()
35670
- }; return nil; })();
35671
- if ($truthy(timings)) {
35672
- timings.$record("parse")};
35673
- return doc;
35674
- } catch ($err) {
35675
- if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
35676
- try {
35721
+ if ($truthy($$$('::', 'File')['$==='](input))) {
35722
+
35677
35723
 
35724
+ $writer = ["input_mtime", input.$mtime()];
35725
+ $send(options, '[]=', Opal.to_a($writer));
35726
+ $writer[$rb_minus($writer["length"], 1)];;
35727
+
35728
+ $writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
35729
+ $send(attrs, '[]=', Opal.to_a($writer));
35730
+ $writer[$rb_minus($writer["length"], 1)];;
35731
+
35732
+ $writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
35733
+ $send(attrs, '[]=', Opal.to_a($writer));
35734
+ $writer[$rb_minus($writer["length"], 1)];;
35735
+
35736
+ $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)]))];
35737
+ $send(attrs, '[]=', Opal.to_a($writer));
35738
+ $writer[$rb_minus($writer["length"], 1)];;
35739
+ source = input.$read();
35740
+ } else if ($truthy(input['$respond_to?']("read"))) {
35678
35741
 
35679
35742
  try {
35680
-
35681
- context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
35682
- if ($truthy(ex['$respond_to?']("exception"))) {
35683
-
35684
- wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
35685
- wrapped_ex.$set_backtrace(ex.$backtrace());
35686
- wrapped_ex.stack = ex.stack;
35687
- } else {
35688
-
35689
- wrapped_ex = ex.$class().$new(context, ex);
35690
-
35691
- $writer = [ex.$stack_trace()];
35692
- $send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
35693
- $writer[$rb_minus($writer["length"], 1)];;
35694
- };
35743
+ input.$rewind()
35695
35744
  } catch ($err) {
35696
35745
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
35697
35746
  try {
35698
- wrapped_ex = ex
35747
+ nil
35699
35748
  } finally { Opal.pop_exception() }
35700
35749
  } else { throw $err; }
35701
- };;
35702
- return self.$raise(wrapped_ex);
35703
- } finally { Opal.pop_exception() }
35704
- } else { throw $err; }
35705
- };
35706
- }, $Asciidoctor_load$1.$$arity = -2);
35707
-
35708
- Opal.def(self, '$load_file', $Asciidoctor_load_file$8 = function $$load_file(filename, options) {
35709
- var $$9, self = this;
35710
-
35711
-
35712
-
35713
- if (options == null) {
35714
- options = $hash2([], {});
35715
- };
35716
- return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this;
35750
+ };
35751
+ source = input.$read();
35752
+ } else if ($truthy($$$('::', 'String')['$==='](input))) {
35753
+ source = input
35754
+ } else if ($truthy($$$('::', 'Array')['$==='](input))) {
35755
+ source = input.$drop(0)
35756
+ } else if ($truthy(input)) {
35757
+ self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
35758
+ if ($truthy(timings)) {
35759
+
35760
+ timings.$record("read");
35761
+ timings.$start("parse");};
35762
+
35763
+ $writer = ["attributes", attrs];
35764
+ $send(options, '[]=', Opal.to_a($writer));
35765
+ $writer[$rb_minus($writer["length"], 1)];;
35766
+ doc = (function() {if (options['$[]']("parse")['$=='](false)) {
35767
+
35768
+ return $$($nesting, 'Document').$new(source, options);
35769
+ } else {
35770
+ return $$($nesting, 'Document').$new(source, options).$parse()
35771
+ }; return nil; })();
35772
+ if ($truthy(timings)) {
35773
+ timings.$record("parse")};
35774
+ return doc;
35775
+ } catch ($err) {
35776
+ if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
35777
+ try {
35778
+
35779
+
35780
+ try {
35781
+
35782
+ context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
35783
+ if ($truthy(ex['$respond_to?']("exception"))) {
35784
+
35785
+ wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
35786
+ wrapped_ex.$set_backtrace(ex.$backtrace());
35787
+ wrapped_ex.stack = ex.stack;
35788
+ } else {
35789
+
35790
+ wrapped_ex = ex.$class().$new(context, ex);
35791
+
35792
+ $writer = [ex.$stack_trace()];
35793
+ $send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
35794
+ $writer[$rb_minus($writer["length"], 1)];;
35795
+ };
35796
+ } catch ($err) {
35797
+ if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
35798
+ try {
35799
+ wrapped_ex = ex
35800
+ } finally { Opal.pop_exception() }
35801
+ } else { throw $err; }
35802
+ };;
35803
+ return self.$raise(wrapped_ex);
35804
+ } finally { Opal.pop_exception() }
35805
+ } else { throw $err; }
35806
+ };
35807
+ }, $load$1.$$arity = -2);
35808
+ return (Opal.def(self, '$load_file', $load_file$8 = function $$load_file(filename, options) {
35809
+ var $$9, self = this;
35717
35810
 
35718
-
35719
35811
 
35720
- if (file == null) {
35721
- file = nil;
35812
+
35813
+ if (options == null) {
35814
+ options = $hash2([], {});
35722
35815
  };
35723
- return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9));
35724
- }, $Asciidoctor_load_file$8.$$arity = -2);
35816
+ return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this;
35817
+
35818
+
35819
+
35820
+ if (file == null) {
35821
+ file = nil;
35822
+ };
35823
+ return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9));
35824
+ }, $load_file$8.$$arity = -2), nil) && 'load_file';
35825
+ })(Opal.get_singleton_class(self), $nesting)
35725
35826
  })($nesting[0], $nesting)
35726
35827
  };
35727
35828
 
@@ -35738,195 +35839,203 @@ Opal.modules["asciidoctor/convert"] = function(Opal) {
35738
35839
  }
35739
35840
  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;
35740
35841
 
35741
- Opal.add_stubs(['$module_function', '$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', '$empty?', '$!=', '$read_asset', '$file?', '$write_stylesheet', '$open']);
35842
+ 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']);
35742
35843
  return (function($base, $parent_nesting) {
35743
35844
  var self = $module($base, 'Asciidoctor');
35744
35845
 
35745
- var $nesting = [self].concat($parent_nesting), $Asciidoctor_convert$1, $Asciidoctor_convert_file$2;
35846
+ var $nesting = [self].concat($parent_nesting);
35746
35847
 
35747
-
35748
- self.$module_function();
35749
-
35750
- Opal.def(self, '$convert', $Asciidoctor_convert$1 = function $$convert(input, options) {
35751
- 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;
35848
+ (function(self, $parent_nesting) {
35849
+ var $nesting = [self].concat($parent_nesting), $convert$1, $convert_file$2;
35752
35850
 
35753
35851
 
35754
35852
 
35755
- if (options == null) {
35756
- options = $hash2([], {});
35757
- };
35758
- (options = options.$merge()).$delete("parse");
35759
- to_dir = options.$delete("to_dir");
35760
- mkdirs = options.$delete("mkdirs");
35761
- $case = (to_file = options.$delete("to_file"));
35762
- if (true['$===']($case) || nil['$===']($case)) {
35763
- if ($truthy((write_to_target = to_dir))) {
35764
- } else if ($truthy($$$('::', 'File')['$==='](input))) {
35765
- sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
35766
- to_file = nil;}
35767
- else if (false['$===']($case)) {to_file = nil}
35768
- else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
35769
- else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
35770
- } else {
35771
-
35772
- $writer = ["to_file", (write_to_target = to_file)];
35773
- $send(options, '[]=', Opal.to_a($writer));
35774
- $writer[$rb_minus($writer["length"], 1)];
35775
- }};
35776
- if ($truthy(options['$key?']("standalone"))) {
35777
- } else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
35778
-
35779
- $writer = ["standalone", options.$fetch("header_footer", true)];
35780
- $send(options, '[]=', Opal.to_a($writer));
35781
- $writer[$rb_minus($writer["length"], 1)];
35782
- } else if ($truthy(options['$key?']("header_footer"))) {
35853
+ Opal.def(self, '$convert', $convert$1 = function $$convert(input, options) {
35854
+ 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;
35855
+
35783
35856
 
35784
- $writer = ["standalone", options['$[]']("header_footer")];
35785
- $send(options, '[]=', Opal.to_a($writer));
35786
- $writer[$rb_minus($writer["length"], 1)];};
35787
- if ($truthy(sibling_path)) {
35788
35857
 
35789
- $writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
35790
- $send(options, '[]=', Opal.to_a($writer));
35791
- $writer[$rb_minus($writer["length"], 1)];
35792
- } else if ($truthy(write_to_target)) {
35793
- if ($truthy(to_dir)) {
35794
- if ($truthy(to_file)) {
35795
-
35796
- $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path($$$('::', 'File').$join(to_dir, to_file)))];
35797
- $send(options, '[]=', Opal.to_a($writer));
35798
- $writer[$rb_minus($writer["length"], 1)];
35799
- } else {
35800
-
35801
- $writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
35802
- $send(options, '[]=', Opal.to_a($writer));
35803
- $writer[$rb_minus($writer["length"], 1)];
35804
- }
35805
- } else if ($truthy(to_file)) {
35858
+ if (options == null) {
35859
+ options = $hash2([], {});
35860
+ };
35861
+ (options = options.$merge()).$delete("parse");
35862
+ to_dir = options.$delete("to_dir");
35863
+ mkdirs = options.$delete("mkdirs");
35864
+ $case = (to_file = options.$delete("to_file"));
35865
+ if (true['$===']($case) || nil['$===']($case)) {
35866
+ if ($truthy((write_to_target = to_dir))) {
35867
+ } else if ($truthy($$$('::', 'File')['$==='](input))) {
35868
+ sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
35869
+ to_file = nil;}
35870
+ else if (false['$===']($case)) {to_file = nil}
35871
+ else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
35872
+ else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
35873
+ } else {
35874
+
35875
+ $writer = ["to_file", (write_to_target = to_file)];
35876
+ $send(options, '[]=', Opal.to_a($writer));
35877
+ $writer[$rb_minus($writer["length"], 1)];
35878
+ }};
35879
+ if ($truthy(options['$key?']("standalone"))) {
35880
+ } else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
35806
35881
 
35807
- $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
35882
+ $writer = ["standalone", options.$fetch("header_footer", true)];
35808
35883
  $send(options, '[]=', Opal.to_a($writer));
35809
- $writer[$rb_minus($writer["length"], 1)];}};
35810
- doc = self.$load(input, options);
35811
- if ($truthy(sibling_path)) {
35812
-
35813
- outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
35814
- if (outfile['$=='](sibling_path)) {
35815
- self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
35816
- } else if ($truthy(write_to_target)) {
35817
-
35818
- working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
35884
+ $writer[$rb_minus($writer["length"], 1)];
35885
+ } else if ($truthy(options['$key?']("header_footer"))) {
35819
35886
 
35820
- return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
35821
- } else {
35822
- return $$$('::', 'Dir').$pwd()
35823
- }; return nil; })();
35824
- jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35825
- return working_dir
35826
- } else {
35827
- return nil
35828
- }; return nil; })();
35829
- if ($truthy(to_dir)) {
35887
+ $writer = ["standalone", options['$[]']("header_footer")];
35888
+ $send(options, '[]=', Opal.to_a($writer));
35889
+ $writer[$rb_minus($writer["length"], 1)];};
35890
+ if ($truthy(sibling_path)) {
35830
35891
 
35831
- outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35832
- if ($truthy(to_file)) {
35892
+ $writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
35893
+ $send(options, '[]=', Opal.to_a($writer));
35894
+ $writer[$rb_minus($writer["length"], 1)];
35895
+ } else if ($truthy(write_to_target)) {
35896
+ if ($truthy(to_dir)) {
35897
+ if ($truthy(to_file)) {
35898
+
35899
+ $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file, to_dir))];
35900
+ $send(options, '[]=', Opal.to_a($writer));
35901
+ $writer[$rb_minus($writer["length"], 1)];
35902
+ } else {
35903
+
35904
+ $writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
35905
+ $send(options, '[]=', Opal.to_a($writer));
35906
+ $writer[$rb_minus($writer["length"], 1)];
35907
+ }
35908
+ } else if ($truthy(to_file)) {
35909
+
35910
+ $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
35911
+ $send(options, '[]=', Opal.to_a($writer));
35912
+ $writer[$rb_minus($writer["length"], 1)];}};
35913
+ doc = self.$load(input, options);
35914
+ if ($truthy(sibling_path)) {
35915
+
35916
+ outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
35917
+ if (outfile['$=='](sibling_path)) {
35918
+ self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
35919
+ } else if ($truthy(write_to_target)) {
35920
+
35921
+ working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
35833
35922
 
35834
- outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35835
- outdir = $$$('::', 'File').$dirname(outfile);
35923
+ return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
35924
+ } else {
35925
+ return $$$('::', 'Dir').$pwd()
35926
+ }; return nil; })();
35927
+ jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35928
+ return working_dir
35836
35929
  } else {
35837
- outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
35930
+ return nil
35931
+ }; return nil; })();
35932
+ if ($truthy(to_dir)) {
35933
+
35934
+ outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35935
+ if ($truthy(to_file)) {
35936
+
35937
+ outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35938
+ outdir = $$$('::', 'File').$dirname(outfile);
35939
+ } else {
35940
+ outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
35941
+ };
35942
+ } else if ($truthy(to_file)) {
35943
+
35944
+ outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35945
+ outdir = $$$('::', 'File').$dirname(outfile);};
35946
+ if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
35947
+ self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
35948
+ if ($truthy(mkdirs)) {
35949
+ $$($nesting, 'Helpers').$mkdir_p(outdir)
35950
+ } else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
35951
+ } else {
35952
+ self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
35838
35953
  };
35839
- } else if ($truthy(to_file)) {
35954
+ } else {
35840
35955
 
35841
- outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35842
- outdir = $$$('::', 'File').$dirname(outfile);};
35843
- if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
35844
- self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
35845
- if ($truthy(mkdirs)) {
35846
- $$($nesting, 'Helpers').$mkdir_p(outdir)
35847
- } else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
35956
+ outfile = to_file;
35957
+ outdir = nil;
35958
+ };
35959
+ if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
35960
+ output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
35848
35961
  } else {
35849
- self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
35962
+ output = doc.$convert()
35850
35963
  };
35851
- } else {
35852
-
35853
- outfile = to_file;
35854
- outdir = nil;
35855
- };
35856
- if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
35857
- output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
35858
- } else {
35859
- output = doc.$convert()
35860
- };
35861
- if ($truthy(outfile)) {
35862
-
35863
- doc.$write(output, outfile);
35864
- 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))) {
35964
+ if ($truthy(outfile)) {
35865
35965
 
35866
- if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
35867
- if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
35868
- copy_asciidoctor_stylesheet = true
35869
- } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
35870
- copy_user_stylesheet = true}};
35871
- copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
35872
- if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
35966
+ doc.$write(output, outfile);
35967
+ 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))) {
35873
35968
 
35874
- stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35875
- return outdir
35876
- } else {
35877
- return nil
35878
- }; return nil; })());
35879
- if ($truthy(mkdirs)) {
35880
- $$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
35881
- } else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
35882
- } else {
35883
- self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
35884
- };
35885
- if ($truthy(copy_asciidoctor_stylesheet)) {
35886
- $$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
35887
- } else if ($truthy(copy_user_stylesheet)) {
35969
+ if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
35970
+ if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
35971
+ copy_asciidoctor_stylesheet = true
35972
+ } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
35973
+ copy_user_stylesheet = true}};
35974
+ copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
35975
+ if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
35888
35976
 
35889
- if ($truthy((stylesheet_src = doc.$attr("copycss"))['$empty?']())) {
35890
- stylesheet_src = doc.$normalize_system_path(stylesheet)
35891
- } else {
35892
- stylesheet_src = doc.$normalize_system_path(stylesheet_src)
35893
- };
35894
- stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35977
+ stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35895
35978
  return outdir
35896
35979
  } else {
35897
35980
  return nil
35898
35981
  }; return nil; })());
35899
- 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))) {
35900
- $$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))};};
35901
- if ($truthy(copy_syntax_hl_stylesheet)) {
35902
- syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
35903
- return doc;
35904
- } else {
35905
- return output
35906
- };
35907
- }, $Asciidoctor_convert$1.$$arity = -2);
35908
-
35909
- Opal.def(self, '$convert_file', $Asciidoctor_convert_file$2 = function $$convert_file(filename, options) {
35910
- var $$3, self = this;
35911
-
35912
-
35982
+ if ($truthy(mkdirs)) {
35983
+ $$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
35984
+ } else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
35985
+ } else {
35986
+ self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
35987
+ };
35988
+ if ($truthy(copy_asciidoctor_stylesheet)) {
35989
+ $$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
35990
+ } else if ($truthy(copy_user_stylesheet)) {
35991
+
35992
+ if ($truthy(($truthy($a = (stylesheet_src = doc.$attr("copycss"))['$==']("")) ? $a : stylesheet_src['$=='](true)))) {
35993
+ stylesheet_src = doc.$normalize_system_path(stylesheet)
35994
+ } else {
35995
+ stylesheet_src = doc.$normalize_system_path(stylesheet_src.$to_s())
35996
+ };
35997
+ stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35998
+ return outdir
35999
+ } else {
36000
+ return nil
36001
+ }; return nil; })());
36002
+ 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))) {
36003
+
36004
+ if ($truthy(($truthy($a = (stylesheet_outdir = $$$('::', 'File').$dirname(stylesheet_dest))['$!='](stylesoutdir)) ? $$$('::', 'File')['$directory?'](stylesheet_outdir)['$!']() : $a))) {
36005
+ if ($truthy(mkdirs)) {
36006
+ $$($nesting, 'Helpers').$mkdir_p(stylesheet_outdir)
36007
+ } else {
36008
+ self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesheet_outdir) + " (hint: set :mkdirs option)")
36009
+ }};
36010
+ $$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}));};};
36011
+ if ($truthy(copy_syntax_hl_stylesheet)) {
36012
+ syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
36013
+ return doc;
36014
+ } else {
36015
+ return output
36016
+ };
36017
+ }, $convert$1.$$arity = -2);
35913
36018
 
35914
- if (options == null) {
35915
- options = $hash2([], {});
35916
- };
35917
- return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
36019
+ Opal.def(self, '$convert_file', $convert_file$2 = function $$convert_file(filename, options) {
36020
+ var $$3, self = this;
35918
36021
 
35919
-
35920
36022
 
35921
- if (file == null) {
35922
- file = nil;
36023
+
36024
+ if (options == null) {
36025
+ options = $hash2([], {});
35923
36026
  };
35924
- return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3));
35925
- }, $Asciidoctor_convert_file$2.$$arity = -2);
35926
- Opal.alias(self, "render", "convert");
35927
- self.$module_function("render");
35928
- Opal.alias(self, "render_file", "convert_file");
35929
- self.$module_function("render_file");
36027
+ return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
36028
+
36029
+
36030
+
36031
+ if (file == null) {
36032
+ file = nil;
36033
+ };
36034
+ return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3));
36035
+ }, $convert_file$2.$$arity = -2);
36036
+ Opal.alias(self, "render", "convert");
36037
+ return Opal.alias(self, "render_file", "convert_file");
36038
+ })(Opal.get_singleton_class(self), $nesting)
35930
36039
  })($nesting[0], $nesting)
35931
36040
  };
35932
36041
 
@@ -35937,7 +36046,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
35937
36046
  }
35938
36047
  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;
35939
36048
 
35940
- Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '$==', '$attr', '$[]', '$attr?', '$join', '$map', '$split', '$lstrip']);
36049
+ Opal.add_stubs(['$register_for', '$merge', '$proc', '$[]=', '$-', '$attr', '$[]', '$==', '$attr?', '$join', '$map', '$split', '$lstrip']);
35941
36050
  return (function($base, $parent_nesting) {
35942
36051
  var self = $module($base, 'Asciidoctor');
35943
36052
 
@@ -35991,25 +36100,29 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
35991
36100
  Opal.def(self, '$docinfo?', $HighlightJsAdapter_docinfo$ques$4 = function(location) {
35992
36101
  var self = this;
35993
36102
 
35994
- return location['$==']("footer")
36103
+ return true
35995
36104
  }, $HighlightJsAdapter_docinfo$ques$4.$$arity = 1);
35996
36105
  return (Opal.def(self, '$docinfo', $HighlightJsAdapter_docinfo$5 = function $$docinfo(location, doc, opts) {
35997
36106
  var $$6, self = this, base_url = nil;
35998
36107
 
35999
36108
 
36000
36109
  base_url = doc.$attr("highlightjsdir", "" + (opts['$[]']("cdn_base_url")) + "/highlight.js/" + ($$($nesting, 'HIGHLIGHT_JS_VERSION')));
36001
- return "" + "<link rel=\"stylesheet\" href=\"" + (base_url) + "/styles/" + (doc.$attr("highlightjs-theme", "github")) + ".min.css\"" + (opts['$[]']("self_closing_tag_slash")) + ">\n" + "<script src=\"" + (base_url) + "/highlight.min.js\"></script>\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) {
36002
- return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this;
36110
+ if (location['$==']("head")) {
36111
+ return "" + "<link rel=\"stylesheet\" href=\"" + (base_url) + "/styles/" + (doc.$attr("highlightjs-theme", "github")) + ".min.css\"" + (opts['$[]']("self_closing_tag_slash")) + ">"
36112
+ } else {
36113
+ return "" + "<script src=\"" + (base_url) + "/highlight.min.js\"></script>\n" + ((function() {if ($truthy(doc['$attr?']("highlightjs-languages"))) {
36114
+ return $send(doc.$attr("highlightjs-languages").$split(","), 'map', [], ($$6 = function(lang){var self = $$6.$$s || this;
36003
36115
 
36004
-
36005
36116
 
36006
- if (lang == null) {
36007
- lang = nil;
36008
- };
36009
- return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
36010
- } else {
36011
- return ""
36012
- }; return nil; })()) + "<script>hljs.initHighlighting()</script>";
36117
+
36118
+ if (lang == null) {
36119
+ lang = nil;
36120
+ };
36121
+ return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
36122
+ } else {
36123
+ return ""
36124
+ }; 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>"
36125
+ };
36013
36126
  }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
36014
36127
  })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
36015
36128
  })($nesting[0], $nesting)
@@ -36022,7 +36135,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
36022
36135
  }
36023
36136
  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;
36024
36137
 
36025
- Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$join', '$content']);
36138
+ 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']);
36026
36139
 
36027
36140
  (function($base, $parent_nesting) {
36028
36141
  var self = $module($base, 'Asciidoctor');
@@ -36256,7 +36369,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
36256
36369
 
36257
36370
  self.$include($$($nesting, 'SyntaxHighlighter'));
36258
36371
  return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) {
36259
- var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil;
36372
+ var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil, $writer = nil;
36260
36373
 
36261
36374
 
36262
36375
  class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) {
@@ -36266,13 +36379,16 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
36266
36379
  }; return nil; })();
36267
36380
  if ($truthy((transform = opts['$[]']("transform")))) {
36268
36381
 
36269
- pre = $hash2(["class"], {"class": class_attr_val});
36270
- code = (function() {if ($truthy(lang)) {
36382
+ transform['$[]']((pre = $hash2(["class"], {"class": class_attr_val})), (code = (function() {if ($truthy(lang)) {
36271
36383
  return $hash2(["data-lang"], {"data-lang": lang})
36272
36384
  } else {
36273
36385
  return $hash2([], {})
36274
- }; return nil; })();
36275
- transform['$[]'](pre, code);
36386
+ }; return nil; })()));
36387
+ if ($truthy((lang = code.$delete("data-lang")))) {
36388
+
36389
+ $writer = ["data-lang", lang];
36390
+ $send(code, '[]=', Opal.to_a($writer));
36391
+ $writer[$rb_minus($writer["length"], 1)];};
36276
36392
  return "" + "<pre" + ($send(pre, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this;
36277
36393
 
36278
36394
 
@@ -36618,7 +36734,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36618
36734
  }
36619
36735
  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;
36620
36736
 
36621
- 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_asset', '$normalize_system_path', '$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', '$read_contents', '$sub', '$match', '$private', '$upcase', '$to_s', '$handles?', '$send']);
36737
+ 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']);
36622
36738
  return (function($base, $parent_nesting) {
36623
36739
  var self = $module($base, 'Asciidoctor');
36624
36740
 
@@ -36629,19 +36745,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36629
36745
 
36630
36746
  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;
36631
36747
 
36632
- self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = nil;
36748
+ self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil;
36633
36749
 
36634
36750
  self.$register_for("html5");
36635
36751
 
36636
36752
  $writer = [["", ""]];
36637
36753
  $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": ["&#8220;", "&#8221;"], "single": ["&#8216;", "&#8217;"], "mark": ["<mark>", "</mark>", true], "superscript": ["<sup>", "</sup>", true], "subscript": ["<sub>", "</sub>", true], "asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]})), 'default=', Opal.to_a($writer));
36638
36754
  $writer[$rb_minus($writer["length"], 1)];;
36639
- Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a[^>+]+|\/a)>/);
36755
+ Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a\b[^>]*|\/a)>/);
36640
36756
  Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/);
36641
36757
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
36642
36758
 
36643
- Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg\\b)"));
36644
- Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg[^>]*>/);
36759
+ Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg[\\s>])"));
36760
+ Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg(?:\s[^>]*)?>/);
36645
36761
  } else {
36646
36762
  nil
36647
36763
  };
@@ -36767,7 +36883,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36767
36883
  }, $Html5Converter_convert$2.$$arity = -2);
36768
36884
 
36769
36885
  Opal.def(self, '$convert_document', $Html5Converter_convert_document$3 = function $$convert_document(node) {
36770
- 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, body_attrs = nil, sectioned = nil, classes = nil, details = nil, idx = nil, $writer = nil, eqnums_val = nil, eqnums_opt = nil;
36886
+ 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;
36771
36887
 
36772
36888
 
36773
36889
  br = "" + "<br" + ((slash = self.void_element_slash)) + ">";
@@ -36777,6 +36893,11 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36777
36893
  };
36778
36894
  cdn_base_url = "" + (asset_uri_scheme) + "//cdnjs.cloudflare.com/ajax/libs";
36779
36895
  linkcss = node['$attr?']("linkcss");
36896
+ max_width_attr = (function() {if ($truthy(node['$attr?']("max-width"))) {
36897
+ return "" + " style=\"max-width: " + (node.$attr("max-width")) + ";\""
36898
+ } else {
36899
+ return ""
36900
+ }; return nil; })();
36780
36901
  result = ["<!DOCTYPE html>"];
36781
36902
  lang_attribute = (function() {if ($truthy(node['$attr?']("nolang"))) {
36782
36903
  return ""
@@ -36838,7 +36959,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36838
36959
  if ($truthy(linkcss)) {
36839
36960
  result['$<<']("" + "<link rel=\"stylesheet\" href=\"" + (node.$normalize_web_path(node.$attr("stylesheet"), node.$attr("stylesdir", ""))) + "\"" + (slash) + ">")
36840
36961
  } else {
36841
- result['$<<']("" + "<style>\n" + (node.$read_asset(node.$normalize_system_path(node.$attr("stylesheet"), node.$attr("stylesdir", "")), $hash2(["warn_on_failure", "label"], {"warn_on_failure": true, "label": "stylesheet"}))) + "\n" + "</style>")
36962
+ 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>")
36842
36963
  }};
36843
36964
  if ($truthy(node['$attr?']("icons", "font"))) {
36844
36965
  if ($truthy(node['$attr?']("iconfont-remote"))) {
@@ -36855,10 +36976,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36855
36976
  result['$<<'](docinfo_content)
36856
36977
  };
36857
36978
  result['$<<']("</head>");
36858
- body_attrs = (function() {if ($truthy(node.$id())) {
36859
- return ["" + "id=\"" + (node.$id()) + "\""]
36979
+ id_attr = (function() {if ($truthy(node.$id())) {
36980
+ return "" + " id=\"" + (node.$id()) + "\""
36860
36981
  } else {
36861
- return []
36982
+ return ""
36862
36983
  }; return nil; })();
36863
36984
  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))) {
36864
36985
  classes = [node.$doctype(), node.$attr("toc-class"), "" + "toc-" + (node.$attr("toc-position", "header"))]
@@ -36867,10 +36988,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36867
36988
  };
36868
36989
  if ($truthy(node['$role?']())) {
36869
36990
  classes['$<<'](node.$role())};
36870
- body_attrs['$<<']("" + "class=\"" + (classes.$join(" ")) + "\"");
36871
- if ($truthy(node['$attr?']("max-width"))) {
36872
- body_attrs['$<<']("" + "style=\"max-width: " + (node.$attr("max-width")) + ";\"")};
36873
- result['$<<']("" + "<body " + (body_attrs.$join(" ")) + ">");
36991
+ result['$<<']("" + "<body" + (id_attr) + " class=\"" + (classes.$join(" ")) + "\">");
36874
36992
  if ($truthy((docinfo_content = node.$docinfo("header"))['$empty?']())) {
36875
36993
  } else {
36876
36994
  result['$<<'](docinfo_content)
@@ -36878,7 +36996,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36878
36996
  if ($truthy(node.$noheader())) {
36879
36997
  } else {
36880
36998
 
36881
- result['$<<']("<div id=\"header\">");
36999
+ result['$<<']("" + "<div id=\"header\"" + (max_width_attr) + ">");
36882
37000
  if (node.$doctype()['$==']("manpage")) {
36883
37001
 
36884
37002
  result['$<<']("" + "<h1>" + (node.$doctitle()) + " Manual Page</h1>");
@@ -36937,10 +37055,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36937
37055
  };
36938
37056
  result['$<<']("</div>");
36939
37057
  };
36940
- result['$<<']("" + "<div id=\"content\">\n" + (node.$content()) + "\n" + "</div>");
37058
+ result['$<<']("" + "<div id=\"content\"" + (max_width_attr) + ">\n" + (node.$content()) + "\n" + "</div>");
36941
37059
  if ($truthy(($truthy($a = node['$footnotes?']()) ? node['$attr?']("nofootnotes")['$!']() : $a))) {
36942
37060
 
36943
- result['$<<']("" + "<div id=\"footnotes\">\n" + "<hr" + (slash) + ">");
37061
+ result['$<<']("" + "<div id=\"footnotes\"" + (max_width_attr) + ">\n" + "<hr" + (slash) + ">");
36944
37062
  $send(node.$footnotes(), 'each', [], ($$5 = function(footnote){var self = $$5.$$s || this;
36945
37063
 
36946
37064
 
@@ -36953,7 +37071,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36953
37071
  if ($truthy(node.$nofooter())) {
36954
37072
  } else {
36955
37073
 
36956
- result['$<<']("<div id=\"footer\">");
37074
+ result['$<<']("" + "<div id=\"footer\"" + (max_width_attr) + ">");
36957
37075
  result['$<<']("<div id=\"footer-text\">");
36958
37076
  if ($truthy(node['$attr?']("revnumber"))) {
36959
37077
  result['$<<']("" + (node.$attr("version-label")) + " " + (node.$attr("revnumber")) + (br))};
@@ -37915,7 +38033,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
37915
38033
  }, $Html5Converter_convert_sidebar$38.$$arity = 1);
37916
38034
 
37917
38035
  Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) {
37918
- 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;
38036
+ 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;
37919
38037
 
37920
38038
 
37921
38039
  result = [];
@@ -37924,7 +38042,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
37924
38042
  } else {
37925
38043
  return ""
37926
38044
  }; return nil; })();
37927
- classes = ["tableblock", "" + "frame-" + (node.$attr("frame", "all", "table-frame")), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))];
38045
+ if ((frame = node.$attr("frame", "all", "table-frame"))['$==']("topbot")) {
38046
+ frame = "ends"};
38047
+ classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))];
37928
38048
  if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) {
37929
38049
  classes['$<<']("" + "stripes-" + (stripes))};
37930
38050
  styles = [];
@@ -38400,7 +38520,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38400
38520
  }, $Html5Converter_convert_video$48.$$arity = 1);
38401
38521
 
38402
38522
  Opal.def(self, '$convert_inline_anchor', $Html5Converter_convert_inline_anchor$49 = function $$convert_inline_anchor(node) {
38403
- var $a, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil;
38523
+ var $a, $b, $c, self = this, $case = nil, path = nil, attrs = nil, text = nil, refid = nil, ref = nil, outer = nil;
38404
38524
 
38405
38525
  return (function() {$case = node.$type();
38406
38526
  if ("xref"['$===']($case)) {
@@ -38423,8 +38543,13 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38423
38543
  } else {
38424
38544
 
38425
38545
  refid = node.$attributes()['$[]']("refid");
38426
- if ($truthy($$($nesting, 'AbstractNode')['$===']((ref = (self.refs = ($truthy($a = self.refs) ? $a : node.$document().$catalog()['$[]']("refs")))['$[]'](refid))))) {
38427
- text = ($truthy($a = ref.$xreftext(node.$attr("xrefstyle", nil, true))) ? $a : "" + "[" + (refid) + "]")
38546
+ 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))) {
38547
+
38548
+ if ($truthy((text = ref.$xreftext(node.$attr("xrefstyle", nil, true)))['$!']())) {
38549
+ text = "" + "[" + (refid) + "]"
38550
+ } else if ($truthy(text['$include?']("<a"))) {
38551
+ text = text.$gsub($$($nesting, 'DropAnchorRx'), "")};
38552
+ self.resolving_xref = nil;
38428
38553
  } else {
38429
38554
  text = "" + "[" + (refid) + "]"
38430
38555
  };
@@ -38651,17 +38776,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38651
38776
  }, $Html5Converter_convert_inline_quoted$60.$$arity = 1);
38652
38777
 
38653
38778
  Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$61 = function $$read_svg_contents(node, target) {
38654
- var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil;
38779
+ var $$62, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil;
38655
38780
 
38656
38781
 
38657
- if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG"}))))) {
38782
+ 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}))))) {
38658
38783
 
38784
+ if ($truthy(svg['$empty?']())) {
38785
+ return nil};
38659
38786
  if ($truthy(svg['$start_with?']("<svg"))) {
38660
38787
  } else {
38661
38788
  svg = svg.$sub($$($nesting, 'SvgPreambleRx'), "")
38662
38789
  };
38663
- old_start_tag = (new_start_tag = nil);
38664
- $send(["width", "height"], 'each', [], ($$62 = function(dim){var self = $$62.$$s || this, dim_val = nil;
38790
+ old_start_tag = (new_start_tag = (start_tag_match = nil));
38791
+ $send(["width", "height"], 'each', [], ($$62 = function(dim){var self = $$62.$$s || this, $a, $b;
38665
38792
 
38666
38793
 
38667
38794
 
@@ -38669,19 +38796,17 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38669
38796
  dim = nil;
38670
38797
  };
38671
38798
  if ($truthy(node['$attr?'](dim))) {
38672
-
38673
- if ($truthy(new_start_tag)) {
38674
- } else {
38675
- new_start_tag = (old_start_tag = svg.$match($$($nesting, 'SvgStartTagRx'))['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "")
38676
- };
38677
- if ($truthy((dim_val = node.$attr(dim))['$end_with?']("%"))) {
38678
- } else {
38679
- dim_val = $rb_plus(dim_val, "px")
38680
- };
38681
- return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (dim_val) + "\">");
38682
38799
  } else {
38683
- return nil
38684
- };}, $$62.$$s = self, $$62.$$arity = 1, $$62));
38800
+ return nil;
38801
+ };
38802
+ if ($truthy(new_start_tag)) {
38803
+ } else {
38804
+
38805
+ if ((start_tag_match = ($truthy($a = start_tag_match) ? $a : ($truthy($b = svg.$match($$($nesting, 'SvgStartTagRx'))) ? $b : "no_match")))['$==']("no_match")) {
38806
+ return nil;};
38807
+ new_start_tag = (old_start_tag = start_tag_match['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "");
38808
+ };
38809
+ return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (node.$attr(dim)) + "\">");}, $$62.$$s = self, $$62.$$arity = 1, $$62));
38685
38810
  if ($truthy(new_start_tag)) {
38686
38811
  svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};};
38687
38812
  return svg;
@@ -40948,8 +41073,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40948
41073
  $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer));
40949
41074
  $writer[$rb_minus($writer["length"], 1)];;
40950
41075
  Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0");
40951
- Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.15.6");
40952
- Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.6");
41076
+ Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.18.3");
41077
+ Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.9");
40953
41078
  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"}));
40954
41079
  Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]);
40955
41080
  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": "&#43;", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": "&#160;", "deg": "&#176;", "zwsp": "&#8203;", "quot": "&#34;", "apos": "&#39;", "lsquo": "&#8216;", "rsquo": "&#8217;", "ldquo": "&#8220;", "rdquo": "&#8221;", "wj": "&#8288;", "brvbar": "&#166;", "pp": "&#43;&#43;", "cpp": "C&#43;&#43;", "amp": "&", "lt": "<", "gt": ">"}));
@@ -41051,10 +41176,23 @@ var toHash = function (object) {
41051
41176
  var fromHash = function (hash) {
41052
41177
  var object = {}
41053
41178
  if (hash) {
41054
- var data = hash.$$smap
41055
- for (var key in data) {
41056
- var value = data[key]
41057
- object[key] = value === Opal.nil ? undefined : value
41179
+ var stringMap = hash.$$smap
41180
+ for (var stringMapKey in stringMap) {
41181
+ var stringMapValue = stringMap[stringMapKey]
41182
+ object[stringMapKey] = stringMapValue === Opal.nil ? undefined : stringMapValue
41183
+ }
41184
+ var numericMap = hash.$$map
41185
+ if (numericMap) {
41186
+ var positional = []
41187
+ for (var numericMapKey in numericMap) {
41188
+ var entry = numericMap[numericMapKey]
41189
+ var numericMapValue = entry.value
41190
+ var index = entry.key - 1
41191
+ positional[index] = numericMapValue === Opal.nil ? undefined : numericMapValue
41192
+ }
41193
+ if (positional.length > 0) {
41194
+ object.$positional = positional
41195
+ }
41058
41196
  }
41059
41197
  }
41060
41198
  return object
@@ -41360,9 +41498,34 @@ AbstractBlock.prototype.getTitle = function () {
41360
41498
  * @memberof AbstractBlock
41361
41499
  */
41362
41500
  AbstractBlock.prototype.setTitle = function (title) {
41501
+ title = typeof title === 'undefined' ? Opal.nil : title
41363
41502
  return this['$title='](title)
41364
41503
  }
41365
41504
 
41505
+ /**
41506
+ * Generate and assign caption to block if not already assigned.
41507
+ *
41508
+ * If the block has a title and a caption prefix is available for this block,
41509
+ * then build a caption from this information, assign it a number and store it
41510
+ * to the caption attribute on the block.
41511
+ *
41512
+ * If a caption has already been assigned to this block, do nothing.
41513
+ *
41514
+ * The parts of a complete caption are: <prefix> <number>. <title>
41515
+ * This partial caption represents the part the precedes the title.
41516
+ *
41517
+ * @param {string} value - the String caption to assign to this block or nil to use document attribute.
41518
+ * @param {string} captionContext - the String context to use when resolving caption-related attributes.
41519
+ * If not provided, the name of the context for this block is used. Only certain contexts allow the caption to be looked up.
41520
+ *
41521
+ * @memberof AbstractBlock
41522
+ */
41523
+ AbstractBlock.prototype.assignCaption = function (value, captionContext) {
41524
+ value = typeof value === 'undefined' ? Opal.nil : value
41525
+ captionContext = typeof captionContext === 'undefined' ? null : captionContext
41526
+ this.$assign_caption(value, captionContext)
41527
+ }
41528
+
41366
41529
  /**
41367
41530
  * Convenience method that returns the interpreted title of the Block
41368
41531
  * with the caption prepended.
@@ -41447,7 +41610,7 @@ AbstractBlock.prototype.getCaption = function () {
41447
41610
  * @memberof AbstractBlock
41448
41611
  */
41449
41612
  AbstractBlock.prototype.setCaption = function (caption) {
41450
- this.caption = caption
41613
+ this.caption = typeof caption === 'undefined' ? Opal.nil : caption
41451
41614
  }
41452
41615
 
41453
41616
  /**
@@ -42868,7 +43031,7 @@ Callouts.prototype.getListIndex = function () {
42868
43031
  * @memberof Callouts
42869
43032
  */
42870
43033
  Callouts.prototype.getCurrentList = function () {
42871
- const currentList = this.$current_list()
43034
+ var currentList = this.$current_list()
42872
43035
  if (currentList && currentList.length > 0) {
42873
43036
  for (var i = 0; i < currentList.length; i++) {
42874
43037
  if (typeof currentList[i] === 'object' && '$$smap' in currentList[i]) {
@@ -44630,7 +44793,7 @@ Cell.prototype.getColumnPercentageWidth = function () {
44630
44793
  * @memberof Cell
44631
44794
  */
44632
44795
  Cell.prototype.getInnerDocument = function () {
44633
- const innerDocument = this.inner_document
44796
+ var innerDocument = this.inner_document
44634
44797
  return innerDocument === Opal.nil ? undefined : innerDocument
44635
44798
  }
44636
44799
 
@@ -46271,7 +46434,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
46271
46434
  }
46272
46435
 
46273
46436
 
46274
- var ASCIIDOCTOR_JS_VERSION = '2.2.0-rc.3';
46437
+ var ASCIIDOCTOR_JS_VERSION = '2.2.1';
46275
46438
 
46276
46439
  /**
46277
46440
  * Get Asciidoctor.js version number.