@asciidoctor/core 2.2.6 → 2.2.8

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.
@@ -20909,6 +20909,30 @@ Opal.modules["asciidoctor/js/opal_ext/string"] = function(Opal) {
20909
20909
  })($nesting[0], null, $nesting)
20910
20910
  };
20911
20911
 
20912
+ /* Generated by Opal 0.11.99.dev */
20913
+ Opal.modules["asciidoctor/js/opal_ext/array"] = function(Opal) {
20914
+ var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $klass = Opal.klass;
20915
+
20916
+ Opal.add_stubs(['$==', '$strict_encode64', '$_original_pack']);
20917
+ return (function($base, $super, $parent_nesting) {
20918
+ var self = $klass($base, $super, 'Array');
20919
+
20920
+ var $nesting = [self].concat($parent_nesting), $Array_pack$1;
20921
+
20922
+
20923
+ Opal.alias(self, "_original_pack", "pack");
20924
+ return (Opal.def(self, '$pack', $Array_pack$1 = function $$pack(format) {
20925
+ var self = this;
20926
+
20927
+ if (format['$==']("m0")) {
20928
+ return $$$('::', 'Base64').$strict_encode64(self)
20929
+ } else {
20930
+ return self.$_original_pack(self)
20931
+ }
20932
+ }, $Array_pack$1.$$arity = 1), nil) && 'pack';
20933
+ })($nesting[0], null, $nesting)
20934
+ };
20935
+
20912
20936
  /* Generated by Opal 0.11.99.dev */
20913
20937
  Opal.modules["asciidoctor/js/opal_ext/uri"] = function(Opal) {
20914
20938
  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;
@@ -21048,6 +21072,7 @@ Opal.modules["asciidoctor/js/opal_ext"] = function(Opal) {
21048
21072
  self.$require("asciidoctor/js/opal_ext/file");
21049
21073
  self.$require("asciidoctor/js/opal_ext/match_data");
21050
21074
  self.$require("asciidoctor/js/opal_ext/string");
21075
+ self.$require("asciidoctor/js/opal_ext/array");
21051
21076
  self.$require("asciidoctor/js/opal_ext/uri");
21052
21077
  self.$require("asciidoctor/js/opal_ext/base64");
21053
21078
  self.$require("asciidoctor/js/opal_ext/number");
@@ -21657,7 +21682,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21657
21682
  }
21658
21683
  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, $truthy = Opal.truthy, $gvars = Opal.gvars, $send = Opal.send, $hash2 = Opal.hash2;
21659
21684
 
21660
- Opal.add_stubs(['$module_function', '$require', '$include?', '$include', '$==', '$===', '$path', '$message', '$raise', '$warn', '$logger', '$chomp', '$empty?', '$slice', '$unpack', '$[]', '$byteslice', '$bytesize', '$[]=', '$-', '$map', '$rstrip', '$encode', '$encoding', '$nil_or_empty?', '$!=', '$tap', '$each_line', '$<<', '$match?', '$gsub', '$rindex', '$index', '$basename', '$extname', '$!', '$length', '$directory?', '$dirname', '$mkdir_p', '$mkdir', '$private_constant', '$join', '$divmod', '$*', '$+', '$to_s', '$to_i', '$succ', '$class_for_name', '$const_get']);
21685
+ Opal.add_stubs(['$module_function', '$require', '$include?', '$include', '$==', '$===', '$path', '$message', '$raise', '$warn', '$logger', '$chomp', '$empty?', '$slice', '$unpack', '$[]', '$byteslice', '$bytesize', '$[]=', '$-', '$map', '$rstrip', '$encode', '$encoding', '$nil_or_empty?', '$!=', '$tap', '$each_line', '$<<', '$!', '$start_with?', '$match?', '$gsub', '$rindex', '$index', '$basename', '$extname', '$length', '$directory?', '$dirname', '$mkdir_p', '$mkdir', '$private_constant', '$join', '$divmod', '$*', '$+', '$to_s', '$to_i', '$succ', '$class_for_name', '$const_get']);
21661
21686
  return (function($base, $parent_nesting) {
21662
21687
  var self = $module($base, 'Asciidoctor');
21663
21688
 
@@ -21666,7 +21691,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21666
21691
  (function($base, $parent_nesting) {
21667
21692
  var self = $module($base, 'Helpers');
21668
21693
 
21669
- var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$11, $Helpers_uriish$ques$16, $Helpers_encode_uri_component$17, $Helpers_encode_spaces_in_uri$18, $Helpers_rootname$19, $Helpers_basename$20, $Helpers_extname$ques$21, $Helpers_extname$22, $Helpers_extname$23, $Helpers_mkdir_p$24, $Helpers_int_to_roman$25, $Helpers_nextval$27, $Helpers_resolve_class$28, $Helpers_class_for_name$29;
21694
+ var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$11, $Helpers_uriish$ques$16, $Helpers_uriish$ques$17, $Helpers_encode_uri_component$18, $Helpers_encode_spaces_in_uri$19, $Helpers_rootname$20, $Helpers_basename$21, $Helpers_extname$ques$22, $Helpers_extname$23, $Helpers_extname$24, $Helpers_mkdir_p$25, $Helpers_int_to_roman$26, $Helpers_nextval$28, $Helpers_resolve_class$29, $Helpers_class_for_name$30;
21670
21695
 
21671
21696
 
21672
21697
  self.$module_function();
@@ -21895,15 +21920,24 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21895
21920
  return lines['$<<'](line.$chomp());}, $$15.$$s = self, $$15.$$arity = 1, $$15));}, $$14.$$s = self, $$14.$$arity = 1, $$14))
21896
21921
  };
21897
21922
  }, $Helpers_prepare_source_string$11.$$arity = -2);
21898
-
21899
- Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) {
21900
- var $a, self = this;
21923
+ if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
21924
+
21925
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) {
21926
+ var $a, $b, self = this;
21901
21927
 
21902
- return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
21903
- }, $Helpers_uriish$ques$16.$$arity = 1);
21928
+ return ($truthy($a = ($truthy($b = str['$include?'](":")) ? str['$start_with?']("uri:classloader:")['$!']() : $b)) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
21929
+ }, $Helpers_uriish$ques$16.$$arity = 1)
21930
+ } else {
21931
+
21932
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$17 = function(str) {
21933
+ var $a, self = this;
21934
+
21935
+ return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
21936
+ }, $Helpers_uriish$ques$17.$$arity = 1)
21937
+ };
21904
21938
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
21905
21939
 
21906
- Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$17 = function $$encode_uri_component(str) {
21940
+ Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$18 = function $$encode_uri_component(str) {
21907
21941
  var self = this;
21908
21942
 
21909
21943
 
@@ -21911,12 +21945,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21911
21945
  return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16)
21912
21946
  })
21913
21947
 
21914
- }, $Helpers_encode_uri_component$17.$$arity = 1)
21948
+ }, $Helpers_encode_uri_component$18.$$arity = 1)
21915
21949
  } else {
21916
21950
  nil
21917
21951
  };
21918
21952
 
21919
- Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$18 = function $$encode_spaces_in_uri(str) {
21953
+ Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$19 = function $$encode_spaces_in_uri(str) {
21920
21954
  var self = this;
21921
21955
 
21922
21956
  if ($truthy(str['$include?'](" "))) {
@@ -21925,9 +21959,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21925
21959
  } else {
21926
21960
  return str
21927
21961
  }
21928
- }, $Helpers_encode_spaces_in_uri$18.$$arity = 1);
21962
+ }, $Helpers_encode_spaces_in_uri$19.$$arity = 1);
21929
21963
 
21930
- Opal.def(self, '$rootname', $Helpers_rootname$19 = function $$rootname(filename) {
21964
+ Opal.def(self, '$rootname', $Helpers_rootname$20 = function $$rootname(filename) {
21931
21965
  var self = this, last_dot_idx = nil;
21932
21966
 
21933
21967
  if ($truthy((last_dot_idx = filename.$rindex(".")))) {
@@ -21940,9 +21974,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21940
21974
  } else {
21941
21975
  return filename
21942
21976
  }
21943
- }, $Helpers_rootname$19.$$arity = 1);
21977
+ }, $Helpers_rootname$20.$$arity = 1);
21944
21978
 
21945
- Opal.def(self, '$basename', $Helpers_basename$20 = function $$basename(filename, drop_ext) {
21979
+ Opal.def(self, '$basename', $Helpers_basename$21 = function $$basename(filename, drop_ext) {
21946
21980
  var self = this;
21947
21981
 
21948
21982
 
@@ -21960,16 +21994,16 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21960
21994
  } else {
21961
21995
  return $$$('::', 'File').$basename(filename)
21962
21996
  };
21963
- }, $Helpers_basename$20.$$arity = -2);
21997
+ }, $Helpers_basename$21.$$arity = -2);
21964
21998
 
21965
- Opal.def(self, '$extname?', $Helpers_extname$ques$21 = function(path) {
21999
+ Opal.def(self, '$extname?', $Helpers_extname$ques$22 = function(path) {
21966
22000
  var $a, self = this, last_dot_idx = nil;
21967
22001
 
21968
22002
  return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a)
21969
- }, $Helpers_extname$ques$21.$$arity = 1);
22003
+ }, $Helpers_extname$ques$22.$$arity = 1);
21970
22004
  if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) {
21971
22005
 
21972
- Opal.def(self, '$extname', $Helpers_extname$22 = function $$extname(path, fallback) {
22006
+ Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) {
21973
22007
  var $a, self = this, last_dot_idx = nil;
21974
22008
 
21975
22009
 
@@ -21987,10 +22021,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21987
22021
  } else {
21988
22022
  return fallback
21989
22023
  };
21990
- }, $Helpers_extname$22.$$arity = -2)
22024
+ }, $Helpers_extname$23.$$arity = -2)
21991
22025
  } else {
21992
22026
 
21993
- Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) {
22027
+ Opal.def(self, '$extname', $Helpers_extname$24 = function $$extname(path, fallback) {
21994
22028
  var self = this, last_dot_idx = nil;
21995
22029
 
21996
22030
 
@@ -22008,10 +22042,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22008
22042
  } else {
22009
22043
  return fallback
22010
22044
  };
22011
- }, $Helpers_extname$23.$$arity = -2)
22045
+ }, $Helpers_extname$24.$$arity = -2)
22012
22046
  };
22013
22047
 
22014
- Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$24 = function $$mkdir_p(dir) {
22048
+ Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$25 = function $$mkdir_p(dir) {
22015
22049
  var self = this, parent_dir = nil;
22016
22050
 
22017
22051
  if ($truthy($$$('::', 'File')['$directory?'](dir))) {
@@ -22037,14 +22071,14 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22037
22071
  } else { throw $err; }
22038
22072
  };;
22039
22073
  }
22040
- }, $Helpers_mkdir_p$24.$$arity = 1);
22074
+ }, $Helpers_mkdir_p$25.$$arity = 1);
22041
22075
  Opal.const_set($nesting[0], 'ROMAN_NUMERALS', $hash2(["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"], {"M": 1000, "CM": 900, "D": 500, "CD": 400, "C": 100, "XC": 90, "L": 50, "XL": 40, "X": 10, "IX": 9, "V": 5, "IV": 4, "I": 1}));
22042
22076
  self.$private_constant("ROMAN_NUMERALS");
22043
22077
 
22044
- Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$25 = function $$int_to_roman(val) {
22045
- var $$26, self = this;
22078
+ Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$26 = function $$int_to_roman(val) {
22079
+ var $$27, self = this;
22046
22080
 
22047
- return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$26 = function(l, i){var self = $$26.$$s || this, $a, $b, repeat = nil;
22081
+ return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$27 = function(l, i){var self = $$27.$$s || this, $a, $b, repeat = nil;
22048
22082
 
22049
22083
 
22050
22084
 
@@ -22056,10 +22090,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22056
22090
  i = nil;
22057
22091
  };
22058
22092
  $b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b;
22059
- return $rb_times(l, repeat);}, $$26.$$s = self, $$26.$$arity = 2, $$26)).$join()
22060
- }, $Helpers_int_to_roman$25.$$arity = 1);
22093
+ return $rb_times(l, repeat);}, $$27.$$s = self, $$27.$$arity = 2, $$27)).$join()
22094
+ }, $Helpers_int_to_roman$26.$$arity = 1);
22061
22095
 
22062
- Opal.def(self, '$nextval', $Helpers_nextval$27 = function $$nextval(current) {
22096
+ Opal.def(self, '$nextval', $Helpers_nextval$28 = function $$nextval(current) {
22063
22097
  var self = this, intval = nil;
22064
22098
 
22065
22099
  if ($truthy($$$('::', 'Integer')['$==='](current))) {
@@ -22069,9 +22103,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22069
22103
  } else {
22070
22104
  return current.$succ()
22071
22105
  }
22072
- }, $Helpers_nextval$27.$$arity = 1);
22106
+ }, $Helpers_nextval$28.$$arity = 1);
22073
22107
 
22074
- Opal.def(self, '$resolve_class', $Helpers_resolve_class$28 = function $$resolve_class(object) {
22108
+ Opal.def(self, '$resolve_class', $Helpers_resolve_class$29 = function $$resolve_class(object) {
22075
22109
  var self = this;
22076
22110
 
22077
22111
  if ($truthy($$$('::', 'Class')['$==='](object))) {
@@ -22085,9 +22119,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22085
22119
  return nil
22086
22120
  };
22087
22121
  }
22088
- }, $Helpers_resolve_class$28.$$arity = 1);
22122
+ }, $Helpers_resolve_class$29.$$arity = 1);
22089
22123
 
22090
- Opal.def(self, '$class_for_name', $Helpers_class_for_name$29 = function $$class_for_name(qualified_name) {
22124
+ Opal.def(self, '$class_for_name', $Helpers_class_for_name$30 = function $$class_for_name(qualified_name) {
22091
22125
  var self = this, resolved = nil;
22092
22126
 
22093
22127
  try {
@@ -22104,7 +22138,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22104
22138
  } finally { Opal.pop_exception() }
22105
22139
  } else { throw $err; }
22106
22140
  }
22107
- }, $Helpers_class_for_name$29.$$arity = 1);
22141
+ }, $Helpers_class_for_name$30.$$arity = 1);
22108
22142
  })($nesting[0], $nesting)
22109
22143
  })($nesting[0], $nesting)
22110
22144
  };
@@ -22474,9 +22508,11 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
22474
22508
  self.$attr_reader("messages");
22475
22509
 
22476
22510
  Opal.def(self, '$initialize', $MemoryLogger_initialize$6 = function $$initialize() {
22477
- var self = this, $writer = nil;
22511
+ var $iter = $MemoryLogger_initialize$6.$$p, $yield = $iter || nil, self = this, $writer = nil;
22478
22512
 
22513
+ if ($iter) $MemoryLogger_initialize$6.$$p = null;
22479
22514
 
22515
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $MemoryLogger_initialize$6, false), [nil], null);
22480
22516
 
22481
22517
  $writer = [$$($nesting, 'WARN')];
22482
22518
  $send(self, 'level=', Opal.to_a($writer));
@@ -22544,12 +22580,15 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
22544
22580
  self.$attr_reader("max_severity");
22545
22581
 
22546
22582
  Opal.def(self, '$initialize', $NullLogger_initialize$12 = function $$initialize() {
22547
- var self = this, $writer = nil;
22583
+ var $iter = $NullLogger_initialize$12.$$p, $yield = $iter || nil, self = this, $writer = nil;
22548
22584
 
22585
+ if ($iter) $NullLogger_initialize$12.$$p = null;
22586
+
22587
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $NullLogger_initialize$12, false), [nil], null);
22549
22588
 
22550
22589
  $writer = [$$($nesting, 'WARN')];
22551
22590
  $send(self, 'level=', Opal.to_a($writer));
22552
- return $writer[$rb_minus($writer["length"], 1)];
22591
+ return $writer[$rb_minus($writer["length"], 1)];;
22553
22592
  }, $NullLogger_initialize$12.$$arity = 0);
22554
22593
  return (Opal.def(self, '$add', $NullLogger_add$13 = function $$add(severity, message, progname) {
22555
22594
  var $a, self = this;
@@ -22678,7 +22717,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
22678
22717
  Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
22679
22718
  Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22680
22719
  Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
22681
- Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22720
+ Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\s\\[](?:[^\\[]*[^\\s\\[])?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22682
22721
  Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
22683
22722
  Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
22684
22723
  Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]"));
@@ -22764,14 +22803,17 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
22764
22803
  Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22765
22804
  Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
22766
22805
  Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22767
- Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
22806
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
22807
+ Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|\\\\?&lt;(?=\\\\?(?:https?|file|ftp|irc)(:))|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|(?!\\2)([^\\s]+?)&gt;|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))"))
22808
+ } else {
22809
+ nil
22810
+ };
22768
22811
  Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22769
22812
  Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
22770
22813
  Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22771
22814
  Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
22772
22815
  Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""));
22773
- Opal.const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "`", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:])(?:\\[([^\\]]+)\\])?(\\\\?(\\+|`)(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\4)(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], true, ["`", nil, new RegExp("" + "(^|[^`" + ($$($nesting, 'CC_WORD')) + "])(?:\\[([^\\]]+)\\])?(\\\\?(`)([^`\\s]|[^`\\s]" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\4)(?![`" + ($$($nesting, 'CC_WORD')) + "])", 'm')]));
22774
- Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
22816
+ Opal.const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "-]", new RegExp("" + "((?:^|[^" + ($$($nesting, 'CC_WORD')) + ";:\\\\])(?=(\\[)|\\+)|\\\\(?=\\[)|(?=\\\\\\+))(?:\\2(x-|[^\\]]+ x-)\\]|(?:\\[([^\\]]+)\\])?(?=(\\\\)?\\+))(\\5?(\\+|`)(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\7)(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')], true, ["`", nil, new RegExp("" + "(^|[^`" + ($$($nesting, 'CC_WORD')) + "])(?:(\\Z)()|\\[([^\\]]+)\\](?=(\\\\))?)?(\\5?(`)([^`\\s]|[^`\\s]" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\7)(?![`" + ($$($nesting, 'CC_WORD')) + "])", 'm')]));
22775
22817
  Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
22776
22818
  Opal.const_set($nesting[0], 'InlineXrefMacroRx', new RegExp("" + "\\\\?(?:&lt;&lt;([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)&gt;&gt;|xref:([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)\\[(?:\\]|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]))", 'm'));
22777
22819
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
@@ -22787,7 +22829,11 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
22787
22829
  Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
22788
22830
  Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
22789
22831
  Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
22790
- Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
22832
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
22833
+ Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"))
22834
+ } else {
22835
+ nil
22836
+ };
22791
22837
  Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
22792
22838
  })($nesting[0], $nesting)
22793
22839
  };
@@ -22811,7 +22857,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
22811
22857
  }
22812
22858
  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, $hash = Opal.hash, $truthy = Opal.truthy, $send = Opal.send, $gvars = Opal.gvars;
22813
22859
 
22814
- Opal.add_stubs(['$freeze', '$+', '$keys', '$empty?', '$!', '$===', '$[]', '$join', '$include?', '$extract_passthroughs', '$each', '$sub_specialchars', '$sub_quotes', '$sub_attributes', '$sub_replacements', '$sub_macros', '$highlight_source', '$sub_callouts', '$sub_post_replacements', '$warn', '$logger', '$restore_passthroughs', '$clear', '$split', '$apply_subs', '$==', '$gsub', '$match?', '$compat_mode', '$convert_quoted_text', '$attributes', '$shift', '$store_attribute', '$!=', '$attribute_undefined', '$counter', '$key?', '$downcase', '$attribute_missing', '$info', '$squeeze', '$delete', '$reject', '$start_with?', '$do_replacement', '$extensions', '$inline_macros?', '$inline_macros', '$regexp', '$instance', '$slice', '$length', '$names', '$config', '$merge', '$[]=', '$-', '$normalize_text', '$parse_attributes', '$process_method', '$expand_subs', '$text', '$text=', '$convert', '$class', '$strip', '$>', '$index', '$min', '$compact', '$end_with?', '$map', '$chop', '$new', '$pop', '$rstrip', '$register', '$tr', '$basename', '$parse', '$lstrip', '$split_simple_csv', '$partition', '$extract_attributes_from_text', '$sub', '$encode_uri_component', '$style', '$extname?', '$rindex', '$info?', '$catalog', '$fetch', '$outfilesuffix', '$natural_xrefs', '$resolve_id', '$find', '$footnotes', '$id', '$<', '$size', '$<<', '$attr?', '$attr', '$to_s', '$read_next_id', '$callouts', '$syntax_highlighter', '$highlight?', '$sub_source', '$extract_callouts', '$name', '$to_sym', '$to_i', '$resolve_lines_to_highlight', '$highlight', '$nil_or_empty?', '$restore_callouts', '$count', '$to_a', '$|', '$sort', '$*', '$parse_quoted_text_attributes', '$resolve_pass_subs', '$extract_inner_passthrough', '$basebackend?', '$error', '$chr', '$drop', '$&', '$resolve_subs', '$resolve_block_subs', '$parse_into', '$private', '$=~', '$shorthand_property_syntax', '$each_char']);
22860
+ Opal.add_stubs(['$freeze', '$+', '$keys', '$empty?', '$!', '$===', '$[]', '$join', '$include?', '$extract_passthroughs', '$each', '$sub_specialchars', '$sub_quotes', '$sub_attributes', '$sub_replacements', '$sub_macros', '$highlight_source', '$sub_callouts', '$sub_post_replacements', '$warn', '$logger', '$restore_passthroughs', '$clear', '$split', '$apply_subs', '$==', '$gsub', '$match?', '$compat_mode', '$convert_quoted_text', '$attributes', '$shift', '$store_attribute', '$!=', '$attribute_undefined', '$counter', '$key?', '$downcase', '$attribute_missing', '$info', '$squeeze', '$delete', '$reject', '$start_with?', '$do_replacement', '$extensions', '$inline_macros?', '$inline_macros', '$regexp', '$instance', '$slice', '$length', '$names', '$config', '$merge', '$[]=', '$-', '$normalize_text', '$parse_attributes', '$process_method', '$expand_subs', '$text', '$text=', '$convert', '$class', '$strip', '$>', '$index', '$min', '$compact', '$end_with?', '$map', '$chop', '$new', '$pop', '$rstrip', '$register', '$tr', '$basename', '$parse', '$<<', '$lstrip', '$split_simple_csv', '$partition', '$sub', '$extract_attributes_from_text', '$encode_uri_component', '$style', '$extname?', '$rindex', '$info?', '$catalog', '$fetch', '$outfilesuffix', '$natural_xrefs', '$resolve_id', '$find', '$footnotes', '$id', '$<', '$size', '$attr?', '$attr', '$to_s', '$read_next_id', '$callouts', '$syntax_highlighter', '$highlight?', '$sub_source', '$extract_callouts', '$name', '$to_sym', '$to_i', '$resolve_lines_to_highlight', '$highlight', '$nil_or_empty?', '$restore_callouts', '$count', '$to_a', '$|', '$sort', '$*', '$parse_quoted_text_attributes', '$resolve_pass_subs', '$basebackend?', '$error', '$chr', '$drop', '$&', '$resolve_subs', '$resolve_block_subs', '$parse_into', '$private', '$shorthand_property_syntax', '$each_char']);
22815
22861
  return (function($base, $parent_nesting) {
22816
22862
  var self = $module($base, 'Asciidoctor');
22817
22863
 
@@ -22820,7 +22866,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
22820
22866
  (function($base, $parent_nesting) {
22821
22867
  var self = $module($base, 'Substitutors');
22822
22868
 
22823
- 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$42, $Substitutors_sub_source$45, $Substitutors_sub_callouts$46, $Substitutors_highlight_source$48, $Substitutors_resolve_lines_to_highlight$49, $Substitutors_extract_passthroughs$52, $Substitutors_restore_passthroughs$56, $Substitutors_resolve_subs$58, $Substitutors_resolve_block_subs$60, $Substitutors_resolve_pass_subs$61, $Substitutors_expand_subs$62, $Substitutors_commit_subs$64, $Substitutors_parse_attributes$65, $Substitutors_extract_attributes_from_text$66, $Substitutors_extract_callouts$67, $Substitutors_restore_callouts$70, $Substitutors_extract_inner_passthrough$73, $Substitutors_convert_quoted_text$74, $Substitutors_do_replacement$75, $Substitutors_parse_quoted_text_attributes$76, $Substitutors_normalize_text$77, $Substitutors_split_simple_csv$78;
22869
+ 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$42, $Substitutors_sub_source$45, $Substitutors_sub_callouts$46, $Substitutors_highlight_source$48, $Substitutors_resolve_lines_to_highlight$49, $Substitutors_extract_passthroughs$52, $Substitutors_restore_passthroughs$56, $Substitutors_resolve_subs$58, $Substitutors_resolve_block_subs$60, $Substitutors_resolve_pass_subs$61, $Substitutors_expand_subs$62, $Substitutors_commit_subs$64, $Substitutors_parse_attributes$65, $Substitutors_extract_attributes_from_text$66, $Substitutors_extract_callouts$67, $Substitutors_restore_callouts$70, $Substitutors_convert_quoted_text$73, $Substitutors_do_replacement$74, $Substitutors_parse_quoted_text_attributes$75, $Substitutors_normalize_text$76, $Substitutors_split_simple_csv$77;
22824
22870
 
22825
22871
 
22826
22872
  Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
@@ -23316,7 +23362,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23316
23362
  ($truthy($c = attrs['$[]']("alt")) ? $c : (($writer = ["alt", (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
23317
23363
  return $$($nesting, 'Inline').$new(self, "image", nil, $hash2(["type", "target", "attributes"], {"type": type, "target": target, "attributes": attrs})).$convert();}, $$30.$$s = self, $$30.$$arity = 0, $$30))};
23318
23364
  if ($truthy(($truthy($a = ($truthy($b = text['$include?']("((")) ? text['$include?']("))") : $b)) ? $a : ($truthy($b = found_macroish_short) ? text['$include?']("dexterm") : $b)))) {
23319
- text = $send(text, 'gsub', [$$($nesting, 'InlineIndextermMacroRx')], ($$31 = function(){var self = $$31.$$s || this, $c, $$32, $d, $$33, $case = nil, attrlist = nil, primary = nil, attrs = nil, $writer = nil, see_also = nil, term = nil, encl_text = nil, visible = nil, before = nil, after = nil, _ = nil, see = nil, subbed_term = nil, terms = nil;
23365
+ text = $send(text, 'gsub', [$$($nesting, 'InlineIndextermMacroRx')], ($$31 = function(){var self = $$31.$$s || this, $c, $$32, $d, $$33, $case = nil, attrlist = nil, primary = nil, attrs = nil, terms = nil, secondary = nil, tertiary = nil, $writer = nil, see_also = nil, term = nil, encl_text = nil, visible = nil, before = nil, after = nil, _ = nil, see = nil, subbed_term = nil;
23320
23366
 
23321
23367
  return (function() {$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
23322
23368
  if ("indexterm"['$===']($case)) {
@@ -23325,8 +23371,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23325
23371
  if ($truthy((attrlist = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) {
23326
23372
  if ($truthy((primary = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) {
23327
23373
 
23374
+ terms = [primary];
23375
+ if ($truthy((secondary = attrs['$[]'](2)))) {
23376
+
23377
+ terms['$<<'](secondary);
23378
+ if ($truthy((tertiary = attrs['$[]'](3)))) {
23379
+ terms['$<<'](tertiary)};};
23328
23380
 
23329
- $writer = ["terms", [primary]];
23381
+ $writer = ["terms", terms];
23330
23382
  $send(attrs, '[]=', Opal.to_a($writer));
23331
23383
  $writer[$rb_minus($writer["length"], 1)];;
23332
23384
  if ($truthy((see_also = attrs['$[]']("see-also")))) {
@@ -23439,78 +23491,94 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23439
23491
  return subbed_term
23440
23492
  };}})()}, $$31.$$s = self, $$31.$$arity = 0, $$31))};
23441
23493
  if ($truthy(($truthy($a = found_colon) ? text['$include?']("://") : $a))) {
23442
- text = $send(text, 'gsub', [$$($nesting, 'InlineLinkRx')], ($$34 = function(){var self = $$34.$$s || this, $c, $d, target = nil, prefix = nil, suffix = nil, link_text = nil, $case = nil, attrs = nil, link_opts = nil, new_link_text = nil, $writer = nil, bare = nil;
23494
+ text = $send(text, 'gsub', [$$($nesting, 'InlineLinkRx')], ($$34 = function(){var self = $$34.$$s || this, $c, $d, $e, target = nil, link_text = nil, prefix = nil, suffix = nil, $case = nil, link_opts = nil, new_link_text = nil, attrs = nil, $writer = nil, bare = nil;
23443
23495
 
23444
-
23445
- if ($truthy((target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))['$start_with?']($$($nesting, 'RS')))) {
23446
- return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + (target.$slice(1, target.$length())) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)));};
23447
- $c = [(($d = $gvars['~']) === nil ? nil : $d['$[]'](1)), ""], (prefix = $c[0]), (suffix = $c[1]), $c;
23448
- if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) {
23496
+ if ($truthy(($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2))) ? (($d = $gvars['~']) === nil ? nil : $d['$[]'](5))['$!']() : $c))) {
23449
23497
 
23450
- if (prefix['$==']("link:")) {
23451
- prefix = ""};
23452
- if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))['$empty?']())) {
23453
- link_text = nil};
23454
- } else {
23455
-
23456
- $case = prefix;
23457
- if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23458
- $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
23459
- if (")"['$===']($case) || "?"['$===']($case) || "!"['$===']($case)) {
23460
- target = target.$chop();
23461
- if ($truthy((($c = (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")) ? target['$end_with?'](".", "?", "!") : (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")))) {
23462
-
23463
- suffix = $rb_plus(target['$[]'](-1), suffix);
23464
- target = target.$chop();};
23465
- if ($truthy(target['$end_with?']("://"))) {
23466
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23467
- else if (";"['$===']($case)) {
23468
- if ($truthy(($truthy($c = prefix['$start_with?']("&lt;")) ? target['$end_with?']("&gt;") : $c))) {
23469
-
23470
- prefix = prefix.$slice(4, prefix.$length());
23471
- target = target.$slice(0, $rb_minus(target.$length(), 4));
23472
- } else if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23473
-
23474
- target = target.$chop();
23475
- suffix = ");";
23498
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$start_with?']($$($nesting, 'RS')))) {
23499
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());};
23500
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
23501
+ return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice($rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$length(), 1), (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()));};
23502
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](6)))) {
23476
23503
  } else {
23477
- suffix = ";"
23504
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));
23478
23505
  };
23479
- if ($truthy(target['$end_with?']("://"))) {
23480
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23481
- else if (":"['$===']($case)) {
23482
- if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23506
+ doc.$register("links", (target = $rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](6)))));
23507
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23483
23508
 
23484
- target = target.$chop();
23485
- suffix = "):";
23509
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
23486
23510
  } else {
23487
- suffix = ":"
23488
- };
23489
- if ($truthy(target['$end_with?']("://"))) {
23490
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
23491
- };
23492
- $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c;
23493
- if ($truthy(link_text)) {
23511
+ return target
23512
+ }; return nil; })();
23513
+ return $$($nesting, 'Inline').$new(self, "anchor", link_text, $hash2(["type", "target", "attributes"], {"type": "link", "target": target, "attributes": $hash2(["role"], {"role": "bare"})})).$convert();
23514
+ } else {
23494
23515
 
23495
- if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
23496
- new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
23497
- if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
23498
-
23499
- $d = self.$extract_attributes_from_text(link_text, ""), $c = Opal.to_ary($d), (link_text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d;
23500
- new_link_text = link_text;
23516
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
23517
+ return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice($rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$length(), 1), (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()));};
23518
+ $c = [(($d = $gvars['~']) === nil ? nil : $d['$[]'](1)), $rb_plus((($d = $gvars['~']) === nil ? nil : $d['$[]'](3)), ($truthy($d = (($e = $gvars['~']) === nil ? nil : $e['$[]'](4))) ? $d : (($e = $gvars['~']) === nil ? nil : $e['$[]'](7)))), ""], (prefix = $c[0]), (target = $c[1]), (suffix = $c[2]), $c;
23519
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
23501
23520
 
23502
- $writer = ["id", attrs['$[]']("id")];
23503
- $send(link_opts, '[]=', Opal.to_a($writer));
23504
- $writer[$rb_minus($writer["length"], 1)];;};
23505
- if ($truthy(link_text['$end_with?']("^"))) {
23521
+ if (prefix['$==']("link:")) {
23522
+ prefix = ""};
23523
+ if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))['$empty?']())) {
23524
+ link_text = nil};
23525
+ } else {
23506
23526
 
23507
- new_link_text = (link_text = link_text.$chop());
23508
- if ($truthy(attrs)) {
23509
- ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
23527
+ $case = prefix;
23528
+ if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23529
+ $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
23530
+ if (";"['$===']($case)) {
23531
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23532
+
23533
+ target = target.$chop();
23534
+ suffix = ");";
23510
23535
  } else {
23511
- attrs = $hash2(["window"], {"window": "_blank"})
23512
- };};
23513
- if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
23536
+ suffix = ";"
23537
+ };
23538
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23539
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23540
+ else if (":"['$===']($case)) {
23541
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23542
+
23543
+ target = target.$chop();
23544
+ suffix = "):";
23545
+ } else {
23546
+ suffix = ":"
23547
+ };
23548
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23549
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
23550
+ };
23551
+ link_opts = $hash2(["type"], {"type": "link"});
23552
+ if ($truthy(link_text)) {
23553
+
23554
+ if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
23555
+ new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
23556
+ if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
23557
+
23558
+ $d = self.$extract_attributes_from_text(link_text, ""), $c = Opal.to_ary($d), (link_text = ($c[0] == null ? nil : $c[0])), (attrs = ($c[1] == null ? nil : $c[1])), $d;
23559
+ new_link_text = link_text;
23560
+
23561
+ $writer = ["id", attrs['$[]']("id")];
23562
+ $send(link_opts, '[]=', Opal.to_a($writer));
23563
+ $writer[$rb_minus($writer["length"], 1)];;};
23564
+ if ($truthy(link_text['$end_with?']("^"))) {
23565
+
23566
+ new_link_text = (link_text = link_text.$chop());
23567
+ if ($truthy(attrs)) {
23568
+ ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
23569
+ } else {
23570
+ attrs = $hash2(["window"], {"window": "_blank"})
23571
+ };};
23572
+ if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
23573
+
23574
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23575
+
23576
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
23577
+ } else {
23578
+ return target
23579
+ }; return nil; })();
23580
+ bare = true;};
23581
+ } else {
23514
23582
 
23515
23583
  link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23516
23584
 
@@ -23518,37 +23586,29 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23518
23586
  } else {
23519
23587
  return target
23520
23588
  }; return nil; })();
23521
- bare = true;};
23522
- } else {
23523
-
23524
- link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23525
-
23526
- return target.$sub($$($nesting, 'UriSniffRx'), "");
23527
- } else {
23528
- return target
23529
- }; return nil; })();
23530
- bare = true;
23531
- };
23532
- if ($truthy(bare)) {
23589
+ bare = true;
23590
+ };
23591
+ if ($truthy(bare)) {
23592
+ if ($truthy(attrs)) {
23593
+
23594
+ $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
23595
+ return "" + "bare " + (attrs['$[]']("role"))
23596
+ } else {
23597
+ return "bare"
23598
+ }; return nil; })()];
23599
+ $send(attrs, '[]=', Opal.to_a($writer));
23600
+ $writer[$rb_minus($writer["length"], 1)];
23601
+ } else {
23602
+ attrs = $hash2(["role"], {"role": "bare"})
23603
+ }};
23604
+ doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
23533
23605
  if ($truthy(attrs)) {
23534
23606
 
23535
- $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
23536
- return "" + "bare " + (attrs['$[]']("role"))
23537
- } else {
23538
- return "bare"
23539
- }; return nil; })()];
23540
- $send(attrs, '[]=', Opal.to_a($writer));
23541
- $writer[$rb_minus($writer["length"], 1)];
23542
- } else {
23543
- attrs = $hash2(["role"], {"role": "bare"})
23544
- }};
23545
- doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
23546
- if ($truthy(attrs)) {
23547
-
23548
- $writer = ["attributes", attrs];
23549
- $send(link_opts, '[]=', Opal.to_a($writer));
23550
- $writer[$rb_minus($writer["length"], 1)];};
23551
- return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
23607
+ $writer = ["attributes", attrs];
23608
+ $send(link_opts, '[]=', Opal.to_a($writer));
23609
+ $writer[$rb_minus($writer["length"], 1)];};
23610
+ return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);
23611
+ }}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
23552
23612
  if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("link:")) ? $b : text['$include?']("ilto:")) : $a))) {
23553
23613
  text = $send(text, 'gsub', [$$($nesting, 'InlineLinkMacroRx')], ($$35 = function(){var self = $$35.$$s || this, $c, $d, mailto = nil, target = nil, mailto_text = nil, attrs = nil, link_opts = nil, link_text = nil, $writer = nil;
23554
23614
 
@@ -23686,7 +23746,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23686
23746
  };
23687
23747
  if ($truthy(doc.$compat_mode())) {
23688
23748
  fragment = refid
23689
- } else if ($truthy((hash_idx = refid.$index("#")))) {
23749
+ } else if ($truthy(($truthy($c = (hash_idx = refid.$index("#"))) ? refid['$[]']($rb_minus(hash_idx, 1))['$!=']("&") : $c))) {
23690
23750
  if ($truthy($rb_gt(hash_idx, 0))) {
23691
23751
 
23692
23752
  if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
@@ -24037,13 +24097,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24037
24097
  return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + "[" + (attrlist) + "]" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);
24038
24098
  } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) {
24039
24099
  preceding = "" + "[" + (attrlist) + "]"
24040
- } else {
24041
-
24042
- if ($truthy((($c = boundary['$==']("++")) ? attrlist['$end_with?']("x-") : boundary['$==']("++")))) {
24100
+ } else if (boundary['$==']("++")) {
24101
+ if (attrlist['$==']("x-")) {
24043
24102
 
24044
24103
  old_behavior = true;
24045
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));};
24046
- attributes = self.$parse_quoted_text_attributes(attrlist);
24104
+ attributes = $hash2([], {});
24105
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
24106
+
24107
+ old_behavior = true;
24108
+ attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
24109
+ } else {
24110
+ attributes = self.$parse_quoted_text_attributes(attrlist)
24111
+ }
24112
+ } else {
24113
+ attributes = self.$parse_quoted_text_attributes(attrlist)
24047
24114
  }
24048
24115
  } else if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) {
24049
24116
  return "" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);};
@@ -24089,33 +24156,42 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24089
24156
  return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
24090
24157
  $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;
24091
24158
  if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) {
24092
- text = $send(text, 'gsub', [pass_inline_rx], ($$54 = function(){var self = $$54.$$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;
24159
+ text = $send(text, 'gsub', [pass_inline_rx], ($$54 = function(){var self = $$54.$$s || this, $c, $d, preceding = nil, attrlist = nil, escaped = nil, quoted_text = nil, format_mark = nil, content = nil, old_behavior = nil, old_behavior_forced = nil, attributes = nil, $writer = nil, passthru_key = nil, subs = nil;
24093
24160
 
24094
24161
 
24095
24162
  preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
24096
- attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2));
24097
- if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$($nesting, 'RS')))) {
24098
- escape_mark = $$($nesting, 'RS')};
24099
- format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
24100
- content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5));
24163
+ attrlist = ($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](4))) ? $c : (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)));
24164
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
24165
+ escaped = true};
24166
+ quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
24167
+ format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
24168
+ content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
24101
24169
  if ($truthy(compat_mode)) {
24102
24170
  old_behavior = true
24103
- } else if ($truthy((old_behavior = ($truthy($c = attrlist) ? attrlist['$end_with?']("x-") : $c)))) {
24104
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))};
24171
+ } else if ($truthy(($truthy($c = attrlist) ? ($truthy($d = attrlist['$==']("x-")) ? $d : attrlist['$end_with?'](" x-")) : $c))) {
24172
+ old_behavior = (old_behavior_forced = true)};
24105
24173
  if ($truthy(attrlist)) {
24106
- if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) {
24107
- return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark));
24108
- } else if ($truthy(escape_mark)) {
24174
+ if ($truthy(escaped)) {
24109
24175
  return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()));
24110
24176
  } else if (preceding['$==']($$($nesting, 'RS'))) {
24111
- preceding = "" + "[" + (attrlist) + "]"
24177
+
24178
+ if ($truthy(($truthy($c = old_behavior_forced) ? format_mark['$==']("`") : $c))) {
24179
+ return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text);};
24180
+ preceding = "" + "[" + (attrlist) + "]";
24181
+ } else if ($truthy(old_behavior_forced)) {
24182
+ attributes = (function() {if (attrlist['$==']("x-")) {
24183
+ return $hash2([], {})
24184
+ } else {
24185
+
24186
+ return self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
24187
+ }; return nil; })()
24112
24188
  } else {
24113
24189
  attributes = self.$parse_quoted_text_attributes(attrlist)
24114
24190
  }
24115
- } else if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) {
24116
- return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark));
24117
- } else if ($truthy(escape_mark)) {
24118
- return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));};
24191
+ } else if ($truthy(escaped)) {
24192
+ return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));
24193
+ } else if ($truthy(($truthy($c = compat_mode) ? preceding['$==']($$($nesting, 'RS')) : $c))) {
24194
+ return quoted_text;};
24119
24195
  if ($truthy(compat_mode)) {
24120
24196
 
24121
24197
  $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "monospaced"})];
@@ -24549,27 +24625,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24549
24625
  };}, $$71.$$s = self, $$71.$$arity = 1, $$71)).$join($$($nesting, 'LF')));
24550
24626
  }, $Substitutors_restore_callouts$70.$$arity = -3);
24551
24627
 
24552
- Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$73 = function $$extract_inner_passthrough(text, pre) {
24553
- var $a, $b, self = this, $writer = nil, passthru_key = nil;
24554
- if (self.passthroughs == null) self.passthroughs = nil;
24555
-
24556
- if ($truthy(($truthy($a = ($truthy($b = text['$end_with?']("+")) ? text['$start_with?']("+", "\\+") : $b)) ? $$($nesting, 'SinglePlusInlinePassRx')['$=~'](text) : $a))) {
24557
- if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) {
24558
- return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`"
24559
- } else {
24560
-
24561
-
24562
- $writer = [(passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$($nesting, 'BASIC_SUBS')})];
24563
- $send(self.passthroughs, '[]=', Opal.to_a($writer));
24564
- $writer[$rb_minus($writer["length"], 1)];;
24565
- return "" + (pre) + "`" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END')) + "`";
24566
- }
24567
- } else {
24568
- return "" + (pre) + "`" + (text) + "`"
24569
- }
24570
- }, $Substitutors_extract_inner_passthrough$73.$$arity = 2);
24571
-
24572
- Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$74 = function $$convert_quoted_text(match, type, scope) {
24628
+ Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
24573
24629
  var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
24574
24630
 
24575
24631
 
@@ -24600,9 +24656,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24600
24656
  type = "unquoted"};};
24601
24657
  return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
24602
24658
  };
24603
- }, $Substitutors_convert_quoted_text$74.$$arity = 3);
24659
+ }, $Substitutors_convert_quoted_text$73.$$arity = 3);
24604
24660
 
24605
- Opal.def(self, '$do_replacement', $Substitutors_do_replacement$75 = function $$do_replacement(m, replacement, restore) {
24661
+ Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
24606
24662
  var self = this, captured = nil, $case = nil;
24607
24663
 
24608
24664
  if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
@@ -24613,13 +24669,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24613
24669
  else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
24614
24670
  else {return $rb_plus(m['$[]'](1), replacement)}})()
24615
24671
  }
24616
- }, $Substitutors_do_replacement$75.$$arity = 3);
24672
+ }, $Substitutors_do_replacement$74.$$arity = 3);
24617
24673
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
24618
24674
  } else {
24619
24675
  nil
24620
24676
  };
24621
24677
 
24622
- Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$76 = function $$parse_quoted_text_attributes(str) {
24678
+ Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
24623
24679
  var $a, $b, self = this, before = nil, _ = nil, after = nil, attrs = nil, $writer = nil, id = nil, roles = nil;
24624
24680
 
24625
24681
 
@@ -24671,9 +24727,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24671
24727
  } else {
24672
24728
  return $hash2(["role"], {"role": str})
24673
24729
  };
24674
- }, $Substitutors_parse_quoted_text_attributes$76.$$arity = 1);
24730
+ }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
24675
24731
 
24676
- Opal.def(self, '$normalize_text', $Substitutors_normalize_text$77 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24732
+ Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24677
24733
  var $a, self = this;
24678
24734
 
24679
24735
 
@@ -24694,10 +24750,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24694
24750
  text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
24695
24751
  };
24696
24752
  return text;
24697
- }, $Substitutors_normalize_text$77.$$arity = -2);
24753
+ }, $Substitutors_normalize_text$76.$$arity = -2);
24698
24754
 
24699
- Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$78 = function $$split_simple_csv(str) {
24700
- var $$79, $$80, self = this, values = nil, accum = nil, quote_open = nil;
24755
+ Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
24756
+ var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
24701
24757
 
24702
24758
  if ($truthy(str['$empty?']())) {
24703
24759
  return []
@@ -24706,7 +24762,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24706
24762
  values = [];
24707
24763
  accum = "";
24708
24764
  quote_open = nil;
24709
- $send(str, 'each_char', [], ($$79 = function(c){var self = $$79.$$s || this, $case = nil;
24765
+ $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
24710
24766
 
24711
24767
 
24712
24768
 
@@ -24722,19 +24778,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24722
24778
  return (accum = "");
24723
24779
  }}
24724
24780
  else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
24725
- else {return (accum = $rb_plus(accum, c))}})();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
24781
+ else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
24726
24782
  return values['$<<'](accum.$strip());
24727
24783
  } else {
24728
- return $send(str.$split(","), 'map', [], ($$80 = function(it){var self = $$80.$$s || this;
24784
+ return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
24729
24785
 
24730
24786
 
24731
24787
 
24732
24788
  if (it == null) {
24733
24789
  it = nil;
24734
24790
  };
24735
- return it.$strip();}, $$80.$$s = self, $$80.$$arity = 1, $$80))
24791
+ return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
24736
24792
  }
24737
- }, $Substitutors_split_simple_csv$78.$$arity = 1);
24793
+ }, $Substitutors_split_simple_csv$77.$$arity = 1);
24738
24794
  })($nesting[0], $nesting)
24739
24795
  })($nesting[0], $nesting)
24740
24796
  };
@@ -24748,7 +24804,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
24748
24804
 
24749
24805
  var $nesting = [self].concat($parent_nesting);
24750
24806
 
24751
- Opal.const_set($nesting[0], 'VERSION', "2.0.17")
24807
+ Opal.const_set($nesting[0], 'VERSION', "2.0.23")
24752
24808
  })($nesting[0], $nesting)
24753
24809
  };
24754
24810
 
@@ -24762,7 +24818,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24762
24818
  }
24763
24819
  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;
24764
24820
 
24765
- 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']);
24821
+ 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?', '$pack', '$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']);
24766
24822
  return (function($base, $parent_nesting) {
24767
24823
  var self = $module($base, 'Asciidoctor');
24768
24824
 
@@ -25167,7 +25223,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25167
25223
  image_path = self.$normalize_system_path(target_image)
25168
25224
  };
25169
25225
  if ($truthy($$$('::', 'File')['$readable?'](image_path))) {
25170
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64($$$('::', 'File').$binread(image_path)))
25226
+ return "" + "data:" + (mimetype) + ";base64," + ([$$$('::', 'File').$binread(image_path)].$pack("m0"))
25171
25227
  } else {
25172
25228
 
25173
25229
  self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
@@ -25198,7 +25254,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25198
25254
  f = nil;
25199
25255
  };
25200
25256
  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;
25201
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata));
25257
+ return "" + "data:" + (mimetype) + ";base64," + ([bindata].$pack("m0"));
25202
25258
  } catch ($err) {
25203
25259
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
25204
25260
  try {
@@ -26326,7 +26382,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
26326
26382
  else if ("verbatim"['$===']($case) || "raw"['$===']($case)) {
26327
26383
  result = self.$apply_subs(self.lines, self.subs);
26328
26384
  if ($truthy($rb_lt(result.$size(), 2))) {
26329
- return result['$[]'](0)
26385
+ return ($truthy($a = result['$[]'](0)) ? $a : "")
26330
26386
  } else {
26331
26387
 
26332
26388
  while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) {
@@ -26340,7 +26396,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
26340
26396
  else {
26341
26397
  if (self.content_model['$==']("empty")) {
26342
26398
  } else {
26343
- self.$logger().$warn("" + "Unknown content model '" + (self.content_model) + "' for block: " + (self))
26399
+ self.$logger().$warn("" + "unknown content model '" + (self.content_model) + "' for block: " + (self))
26344
26400
  };
26345
26401
  return nil;}})()
26346
26402
  }, $Block_content$2.$$arity = 0);
@@ -27182,6 +27238,11 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27182
27238
  $writer = ["catalog_assets", true];
27183
27239
  $send(options, '[]=', Opal.to_a($writer));
27184
27240
  $writer[$rb_minus($writer["length"], 1)];};
27241
+ if ($truthy(parent_doc.$options()['$[]']("to_dir"))) {
27242
+
27243
+ $writer = ["to_dir", parent_doc.$options()['$[]']("to_dir")];
27244
+ $send(options, '[]=', Opal.to_a($writer));
27245
+ $writer[$rb_minus($writer["length"], 1)];};
27185
27246
  self.catalog = parent_doc.$catalog().$merge($hash2(["footnotes"], {"footnotes": []}));
27186
27247
  self.attribute_overrides = (attr_overrides = parent_doc.$instance_variable_get("@attribute_overrides").$merge(parent_doc.$attributes()));
27187
27248
  attr_overrides.$delete("compat-mode");
@@ -29001,7 +29062,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29001
29062
  }
29002
29063
  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;
29003
29064
 
29004
- 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', '$skip_blank_lines', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$[]=', '$-', '$finalize_header', '$nil_or_empty?', '$title=', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$include?', '$sub_specialchars', '$sub_attributes', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$==', '$!', '$register', '$process_authors', '$update', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$save', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$split', '$title', '$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?', '$apply_header_subs', '$rstrip', '$each_with_index', '$compact', '$to_h', '$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', '$%']);
29065
+ Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$extend', '$private_class_method', '$parse_document_header', '$[]', '$has_more_lines?', '$next_section', '$assign_numeral', '$<<', '$blocks', '$skip_blank_lines', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$[]=', '$-', '$finalize_header', '$nil_or_empty?', '$title=', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$include?', '$sub_specialchars', '$sub_attributes', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$==', '$!', '$register', '$process_authors', '$update', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$save', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$split', '$title', '$restore_save', '$discard_save', '$context', '$empty?', '$header?', '$!=', '$attr?', '$attr', '$key?', '$document', '$+', '$level', '$special', '$sectname', '$to_i', '$<', '$>', '$warn', '$next_block', '$blocks?', '$style', '$style=', '$parent=', '$content_model', '$content_model=', '$lines', '$subs', '$size', '$context=', '$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?', '$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?', '$apply_header_subs', '$rstrip', '$each_with_index', '$compact', '$to_h', '$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?', '$close_table', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
29005
29066
  return (function($base, $parent_nesting) {
29006
29067
  var self = $module($base, 'Asciidoctor');
29007
29068
 
@@ -29043,6 +29104,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29043
29104
  return ($truthy($a = ($truthy($b = self['$is_delimited_block?'](l)) ? $b : ($truthy($c = l['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](l) : $c))) ? $a : $$($nesting, 'AnyListRx')['$match?'](l));}, $Parser$3.$$s = self, $Parser$3.$$arity = 1, $Parser$3)));
29044
29105
  Opal.const_set($nesting[0], 'NoOp', nil);
29045
29106
  Opal.const_set($nesting[0], 'AuthorKeys', ["author", "authorinitials", "firstname", "middlename", "lastname", "email"]);
29107
+ Opal.const_set($nesting[0], 'ListContinuationMarker', $$$('::', 'Module').$new());
29108
+ Opal.const_set($nesting[0], 'ListContinuationPlaceholder', $$$('::', 'String').$new().$extend($$($nesting, 'ListContinuationMarker')));
29109
+ Opal.const_set($nesting[0], 'ListContinuationString', $$$('::', 'String').$new($$($nesting, 'LIST_CONTINUATION')).$extend($$($nesting, 'ListContinuationMarker')));
29046
29110
  Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"}));
29047
29111
  Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"}));
29048
29112
  Opal.const_set($nesting[0], 'TableCellStyles', $hash2(["d", "s", "e", "m", "h", "l", "a"], {"d": "none", "s": "strong", "e": "emphasis", "m": "monospaced", "h": "header", "l": "literal", "a": "asciidoc"}));
@@ -29445,16 +29509,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29445
29509
  if ($truthy(part)) {
29446
29510
  if ($truthy(section['$blocks?']()['$!']())) {
29447
29511
  if ($truthy(new_block.$style()['$!=']("partintro"))) {
29448
- if (new_block.$context()['$==']("paragraph")) {
29449
-
29450
-
29451
- $writer = ["open"];
29452
- $send(new_block, 'context=', Opal.to_a($writer));
29453
- $writer[$rb_minus($writer["length"], 1)];;
29512
+ if ($truthy((($b = new_block.$style()['$==']("open")) ? new_block.$context()['$==']("open") : new_block.$style()['$==']("open")))) {
29454
29513
 
29455
29514
  $writer = ["partintro"];
29456
29515
  $send(new_block, 'style=', Opal.to_a($writer));
29457
- $writer[$rb_minus($writer["length"], 1)];;
29516
+ $writer[$rb_minus($writer["length"], 1)];
29458
29517
  } else {
29459
29518
 
29460
29519
 
@@ -29466,7 +29525,16 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29466
29525
  $send(intro, 'style=', Opal.to_a($writer));
29467
29526
  $writer[$rb_minus($writer["length"], 1)];;
29468
29527
  section.$blocks()['$<<'](intro);
29469
- }}
29528
+ }
29529
+ } else if (new_block.$content_model()['$==']("simple")) {
29530
+
29531
+
29532
+ $writer = ["compound"];
29533
+ $send(new_block, 'content_model=', Opal.to_a($writer));
29534
+ $writer[$rb_minus($writer["length"], 1)];;
29535
+ new_block['$<<']($$($nesting, 'Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
29536
+ new_block.$lines().$clear();
29537
+ new_block.$subs().$clear();}
29470
29538
  } else if (section.$blocks().$size()['$=='](1)) {
29471
29539
 
29472
29540
  first_block = section.$blocks()['$[]'](0);
@@ -29478,12 +29546,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29478
29546
  $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))];
29479
29547
  $send(new_block, 'parent=', Opal.to_a($writer));
29480
29548
  $writer[$rb_minus($writer["length"], 1)];;
29481
-
29482
- $writer = ["partintro"];
29483
- $send(intro, 'style=', Opal.to_a($writer));
29484
- $writer[$rb_minus($writer["length"], 1)];;
29485
- section.$blocks().$shift();
29486
- if (first_block.$style()['$==']("partintro")) {
29549
+ if (first_block.$style()['$==']((($writer = ["partintro"]), $send(intro, 'style=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) {
29487
29550
 
29488
29551
 
29489
29552
  $writer = ["paragraph"];
@@ -29493,6 +29556,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29493
29556
  $writer = [nil];
29494
29557
  $send(first_block, 'style=', Opal.to_a($writer));
29495
29558
  $writer[$rb_minus($writer["length"], 1)];;};
29559
+ section.$blocks().$shift();
29496
29560
  intro['$<<'](first_block);
29497
29561
  section.$blocks()['$<<'](intro);};}};
29498
29562
  ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block);
@@ -29595,6 +29659,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29595
29659
  if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) {
29596
29660
 
29597
29661
  block_context = style.$to_sym();
29662
+ cloaked_context = "paragraph";
29598
29663
  reader.$unshift_line(this_line);
29599
29664
  break;;};
29600
29665
  if ($truthy(text_only)) {
@@ -29961,7 +30026,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29961
30026
  } else {
29962
30027
  $case = block_context;
29963
30028
  if ("listing"['$===']($case) || "source"['$===']($case)) {
29964
- if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : ($truthy($b = attributes['$[]'](1)['$!']()) ? (language = ($truthy($c = attributes['$[]'](2)) ? $c : doc_attrs['$[]']("source-language"))) : $b)))) {
30029
+ if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : (language = (function() {if ($truthy(attributes['$[]'](1))) {
30030
+ return nil
30031
+ } else {
30032
+ return ($truthy($b = attributes['$[]'](2)) ? $b : doc_attrs['$[]']("source-language"))
30033
+ }; return nil; })())))) {
29965
30034
 
29966
30035
  if ($truthy(language)) {
29967
30036
 
@@ -29983,6 +30052,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29983
30052
  $writer = ["language", doc_attrs['$[]']("source-language")];
29984
30053
  $send(attributes, '[]=', Opal.to_a($writer));
29985
30054
  $writer[$rb_minus($writer["length"], 1)];};
30055
+ if (cloaked_context['$==']("listing")) {
30056
+ } else {
30057
+
30058
+ $writer = ["cloaked-context", cloaked_context];
30059
+ $send(attributes, '[]=', Opal.to_a($writer));
30060
+ $writer[$rb_minus($writer["length"], 1)];
30061
+ };
29986
30062
  };
29987
30063
  if ($truthy(attributes['$key?']("linenums"))) {
29988
30064
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
@@ -30032,6 +30108,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30032
30108
  $send(attributes, '[]=', Opal.to_a($writer));
30033
30109
  $writer[$rb_minus($writer["length"], 1)];
30034
30110
  };
30111
+
30112
+ $writer = ["cloaked-context", cloaked_context];
30113
+ $send(attributes, '[]=', Opal.to_a($writer));
30114
+ $writer[$rb_minus($writer["length"], 1)];;
30035
30115
  if ($truthy(attributes['$key?']("linenums"))) {
30036
30116
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
30037
30117
 
@@ -30426,8 +30506,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30426
30506
  reftext = reftext.$gsub("\\]", "]");
30427
30507
  if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30428
30508
  reftext = document.$sub_attributes(reftext)};
30429
- } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
30430
- return nil;}};
30509
+ } else if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30510
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
30511
+ reftext = nil}}};
30431
30512
  };
30432
30513
  if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
30433
30514
  return nil
@@ -30651,7 +30732,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30651
30732
  };
30652
30733
  }, $Parser_parse_list_item$27.$$arity = -5);
30653
30734
  Opal.defs(self, '$read_lines_for_list_item', $Parser_read_lines_for_list_item$28 = function $$read_lines_for_list_item(reader, list_type, sibling_trait, has_text) {
30654
- var $a, $b, $c, $$29, $$30, $$31, $$32, $$33, self = this, buffer = nil, continuation = nil, within_nested_list = nil, detached_continuation = nil, dlist = nil, this_line = nil, prev_line = nil, $writer = nil, match = nil, nested_list_type = nil, last_line = nil;
30735
+ var $a, $b, $c, $d, $$29, $$30, $$31, $$32, $$33, self = this, buffer = nil, continuation = nil, within_nested_list = nil, detached_continuation = nil, dlist = nil, this_line = nil, prev_line = nil, $writer = nil, match = nil, block_attribute_lines = nil, next_line = nil, interrupt = nil, ch0 = nil, nested_list_type = nil, last_line = nil;
30655
30736
 
30656
30737
 
30657
30738
 
@@ -30672,12 +30753,14 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30672
30753
  this_line = reader.$read_line();
30673
30754
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
30674
30755
  break;};
30756
+ if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
30757
+ this_line = $$($nesting, 'ListContinuationString')};
30675
30758
  prev_line = (function() {if ($truthy(buffer['$empty?']())) {
30676
30759
  return nil
30677
30760
  } else {
30678
30761
  return buffer['$[]'](-1)
30679
30762
  }; return nil; })();
30680
- if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
30763
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](prev_line))) {
30681
30764
 
30682
30765
  if (continuation['$==']("inactive")) {
30683
30766
 
@@ -30686,11 +30769,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30686
30769
  if ($truthy(within_nested_list)) {
30687
30770
  } else {
30688
30771
 
30689
- $writer = [-1, ""];
30772
+ $writer = [-1, $$($nesting, 'ListContinuationPlaceholder')];
30690
30773
  $send(buffer, '[]=', Opal.to_a($writer));
30691
30774
  $writer[$rb_minus($writer["length"], 1)];
30692
30775
  };};
30693
- if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
30776
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
30694
30777
 
30695
30778
  if ($truthy(continuation['$!=']("frozen"))) {
30696
30779
 
@@ -30699,16 +30782,37 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30699
30782
  this_line = nil;
30700
30783
  continue;;};};
30701
30784
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
30785
+
30702
30786
  if (continuation['$==']("active")) {
30703
-
30704
- buffer['$<<'](this_line);
30705
- buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
30706
- continuation = "inactive";
30707
30787
  } else {
30708
30788
  break;
30709
- }
30710
- } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
30711
- break;
30789
+ };
30790
+ buffer['$<<'](this_line);
30791
+ buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
30792
+ continuation = "inactive";
30793
+ } else if ($truthy(($truthy($b = ($truthy($c = ($truthy($d = dlist) ? continuation['$!=']("active") : $d)) ? this_line['$start_with?']("[") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
30794
+
30795
+ block_attribute_lines = [this_line];
30796
+ while ($truthy((next_line = reader.$peek_line()))) {
30797
+
30798
+ if ($truthy(self['$is_delimited_block?'](next_line))) {
30799
+ interrupt = true
30800
+ } else if ($truthy(($truthy($c = next_line['$empty?']()) ? $c : ($truthy($d = next_line['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](next_line) : $d)))) {
30801
+
30802
+ block_attribute_lines['$<<'](reader.$read_line());
30803
+ continue;;
30804
+ } else if ($truthy(($truthy($c = $$($nesting, 'AnyListRx')['$match?'](next_line)) ? self['$is_sibling_list_item?'](next_line, list_type, sibling_trait)['$!']() : $c))) {
30805
+ buffer.$concat(block_attribute_lines)
30806
+ } else {
30807
+ interrupt = true
30808
+ };
30809
+ break;;
30810
+ };
30811
+ if ($truthy(interrupt)) {
30812
+
30813
+ this_line = nil;
30814
+ reader.$unshift_lines(block_attribute_lines);
30815
+ break;;};
30712
30816
  } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) {
30713
30817
  if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) {
30714
30818
 
@@ -30726,7 +30830,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30726
30830
  buffer.$concat(reader.$read_lines_until($hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true})))
30727
30831
  };
30728
30832
  continuation = "inactive";
30729
- } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'BlockTitleRx')['$match?'](this_line)) ? $c : $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line))) ? $b : $$($nesting, 'AttributeEntryRx')['$match?'](this_line)))) {
30833
+ } else if ($truthy(($truthy($b = ($truthy($c = (($d = (ch0 = this_line.$chr())['$=='](".")) ? $$($nesting, 'BlockTitleRx')['$match?'](this_line) : (ch0 = this_line.$chr())['$==']("."))) ? $c : (($d = ch0['$==']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : ch0['$==']("[")))) ? $b : (($c = ch0['$=='](":")) ? $$($nesting, 'AttributeEntryRx')['$match?'](this_line) : ch0['$=='](":"))))) {
30730
30834
  buffer['$<<'](this_line)
30731
30835
  } else {
30732
30836
 
@@ -30741,7 +30845,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30741
30845
  if (ctx == null) {
30742
30846
  ctx = nil;
30743
30847
  };
30744
- return $$($nesting, 'ListRxMap')['$[]'](ctx)['$match?'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
30848
+ return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
30745
30849
 
30746
30850
  within_nested_list = true;
30747
30851
  if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) {
@@ -30762,7 +30866,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30762
30866
  if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
30763
30867
 
30764
30868
  detached_continuation = buffer.$size();
30765
- buffer['$<<'](this_line);
30869
+ buffer['$<<']($$($nesting, 'ListContinuationString'));
30766
30870
  } else if ($truthy(has_text)) {
30767
30871
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
30768
30872
  break;
@@ -30806,6 +30910,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30806
30910
  buffer['$<<'](this_line);
30807
30911
  has_text = true;
30808
30912
  };
30913
+ } else if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
30914
+
30915
+ has_text = true;
30916
+ buffer['$<<'](this_line);
30809
30917
  } else {
30810
30918
 
30811
30919
  if ($truthy(this_line['$empty?']())) {
@@ -30836,17 +30944,18 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30836
30944
  reader.$unshift_line(this_line)};
30837
30945
  if ($truthy(detached_continuation)) {
30838
30946
 
30839
- $writer = [detached_continuation, ""];
30947
+ $writer = [detached_continuation, $$($nesting, 'ListContinuationPlaceholder')];
30840
30948
  $send(buffer, '[]=', Opal.to_a($writer));
30841
30949
  $writer[$rb_minus($writer["length"], 1)];};
30842
30950
  while (!($truthy(buffer['$empty?']()))) {
30843
- if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
30844
- buffer.$pop()
30845
- } else {
30951
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$===']((last_line = buffer['$[]'](-1))))) {
30846
30952
 
30847
- if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
30848
- buffer.$pop()};
30953
+ buffer.$pop();
30849
30954
  break;;
30955
+ } else if ($truthy(last_line['$empty?']())) {
30956
+ buffer.$pop()
30957
+ } else {
30958
+ break;
30850
30959
  }
30851
30960
  };
30852
30961
  return buffer;
@@ -31845,6 +31954,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31845
31954
  }
31846
31955
  };
31847
31956
  };
31957
+ parser_ctx.$close_table();
31848
31958
  if ($truthy(($truthy($a = (($logical_op_recvr_tmp_2 = table.$attributes()), ($truthy($b = $logical_op_recvr_tmp_2['$[]']("colcount")) ? $b : (($writer = ["colcount", table.$columns().$size()]), $send($logical_op_recvr_tmp_2, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])))['$=='](0)) ? $a : explicit_colspecs))) {
31849
31959
  } else {
31850
31960
  table.$assign_column_widths()
@@ -32333,7 +32443,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32333
32443
  (function($base, $super, $parent_nesting) {
32334
32444
  var self = $klass($base, $super, 'PathResolver');
32335
32445
 
32336
- var $nesting = [self].concat($parent_nesting), $PathResolver_initialize$1, $PathResolver_absolute_path$ques$2, $a, $PathResolver_root$ques$3, $PathResolver_unc$ques$4, $PathResolver_web_root$ques$5, $PathResolver_descends_from$ques$6, $PathResolver_relative_path$7, $PathResolver_posixify$8, $PathResolver_expand_path$9, $PathResolver_partition_path$11, $PathResolver_join_path$12, $PathResolver_system_path$13, $PathResolver_web_path$16, $PathResolver_extract_uri_prefix$18;
32446
+ var $nesting = [self].concat($parent_nesting), $PathResolver_initialize$1, $PathResolver_absolute_path$ques$2, $a, $PathResolver_root$ques$3, $PathResolver_root$ques$4, $PathResolver_unc$ques$5, $PathResolver_web_root$ques$6, $PathResolver_descends_from$ques$7, $PathResolver_relative_path$8, $PathResolver_posixify$9, $PathResolver_expand_path$10, $PathResolver_partition_path$12, $PathResolver_join_path$13, $PathResolver_system_path$14, $PathResolver_web_path$17, $PathResolver_extract_uri_prefix$19;
32337
32447
 
32338
32448
  self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
32339
32449
 
@@ -32344,6 +32454,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32344
32454
  Opal.const_set($nesting[0], 'SLASH', "/");
32345
32455
  Opal.const_set($nesting[0], 'BACKSLASH', "\\");
32346
32456
  Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//");
32457
+ Opal.const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
32347
32458
  Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
32348
32459
  self.$attr_accessor("file_separator");
32349
32460
  self.$attr_accessor("working_dir");
@@ -32389,23 +32500,30 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32389
32500
 
32390
32501
  return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://"))
32391
32502
  }, $PathResolver_root$ques$3.$$arity = 1)
32503
+ } else if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
32504
+
32505
+ Opal.def(self, '$root?', $PathResolver_root$ques$4 = function(path) {
32506
+ var $a, self = this;
32507
+
32508
+ return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))
32509
+ }, $PathResolver_root$ques$4.$$arity = 1)
32392
32510
  } else {
32393
32511
  Opal.alias(self, "root?", "absolute_path?")
32394
32512
  };
32395
32513
 
32396
- Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) {
32514
+ Opal.def(self, '$unc?', $PathResolver_unc$ques$5 = function(path) {
32397
32515
  var self = this;
32398
32516
 
32399
32517
  return path['$start_with?']($$($nesting, 'DOUBLE_SLASH'))
32400
- }, $PathResolver_unc$ques$4.$$arity = 1);
32518
+ }, $PathResolver_unc$ques$5.$$arity = 1);
32401
32519
 
32402
- Opal.def(self, '$web_root?', $PathResolver_web_root$ques$5 = function(path) {
32520
+ Opal.def(self, '$web_root?', $PathResolver_web_root$ques$6 = function(path) {
32403
32521
  var self = this;
32404
32522
 
32405
32523
  return path['$start_with?']($$($nesting, 'SLASH'))
32406
- }, $PathResolver_web_root$ques$5.$$arity = 1);
32524
+ }, $PathResolver_web_root$ques$6.$$arity = 1);
32407
32525
 
32408
- Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$6 = function(path, base) {
32526
+ Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$7 = function(path, base) {
32409
32527
  var $a, self = this;
32410
32528
 
32411
32529
  if (base['$=='](path)) {
@@ -32415,9 +32533,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32415
32533
  } else {
32416
32534
  return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a)
32417
32535
  }
32418
- }, $PathResolver_descends_from$ques$6.$$arity = 2);
32536
+ }, $PathResolver_descends_from$ques$7.$$arity = 2);
32419
32537
 
32420
- Opal.def(self, '$relative_path', $PathResolver_relative_path$7 = function $$relative_path(path, base) {
32538
+ Opal.def(self, '$relative_path', $PathResolver_relative_path$8 = function $$relative_path(path, base) {
32421
32539
  var self = this, offset = nil;
32422
32540
 
32423
32541
  if ($truthy(self['$root?'](path))) {
@@ -32438,9 +32556,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32438
32556
  } else {
32439
32557
  return path
32440
32558
  }
32441
- }, $PathResolver_relative_path$7.$$arity = 2);
32559
+ }, $PathResolver_relative_path$8.$$arity = 2);
32442
32560
 
32443
- Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) {
32561
+ Opal.def(self, '$posixify', $PathResolver_posixify$9 = function $$posixify(path) {
32444
32562
  var $a, self = this;
32445
32563
 
32446
32564
  if ($truthy(path)) {
@@ -32453,18 +32571,18 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32453
32571
  } else {
32454
32572
  return ""
32455
32573
  }
32456
- }, $PathResolver_posixify$8.$$arity = 1);
32574
+ }, $PathResolver_posixify$9.$$arity = 1);
32457
32575
  Opal.alias(self, "posixfy", "posixify");
32458
32576
 
32459
- Opal.def(self, '$expand_path', $PathResolver_expand_path$9 = function $$expand_path(path) {
32460
- var $a, $b, $$10, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
32577
+ Opal.def(self, '$expand_path', $PathResolver_expand_path$10 = function $$expand_path(path) {
32578
+ var $a, $b, $$11, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
32461
32579
 
32462
32580
 
32463
32581
  $b = self.$partition_path(path), $a = Opal.to_ary($b), (path_segments = ($a[0] == null ? nil : $a[0])), (path_root = ($a[1] == null ? nil : $a[1])), $b;
32464
32582
  if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) {
32465
32583
 
32466
32584
  resolved_segments = [];
32467
- $send(path_segments, 'each', [], ($$10 = function(segment){var self = $$10.$$s || this;
32585
+ $send(path_segments, 'each', [], ($$11 = function(segment){var self = $$11.$$s || this;
32468
32586
 
32469
32587
 
32470
32588
 
@@ -32475,14 +32593,14 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32475
32593
  return resolved_segments.$pop()
32476
32594
  } else {
32477
32595
  return resolved_segments['$<<'](segment)
32478
- };}, $$10.$$s = self, $$10.$$arity = 1, $$10));
32596
+ };}, $$11.$$s = self, $$11.$$arity = 1, $$11));
32479
32597
  return self.$join_path(resolved_segments, path_root);
32480
32598
  } else {
32481
32599
  return self.$join_path(path_segments, path_root)
32482
32600
  };
32483
- }, $PathResolver_expand_path$9.$$arity = 1);
32601
+ }, $PathResolver_expand_path$10.$$arity = 1);
32484
32602
 
32485
- Opal.def(self, '$partition_path', $PathResolver_partition_path$11 = function $$partition_path(path, web) {
32603
+ Opal.def(self, '$partition_path', $PathResolver_partition_path$12 = function $$partition_path(path, web) {
32486
32604
  var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil;
32487
32605
 
32488
32606
 
@@ -32507,6 +32625,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32507
32625
  root = $$($nesting, 'DOUBLE_SLASH')
32508
32626
  } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) {
32509
32627
  root = $$($nesting, 'SLASH')
32628
+ } else if ($truthy(posix_path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))) {
32629
+ root = posix_path.$slice(0, $$($nesting, 'URI_CLASSLOADER').$length())
32510
32630
  } else {
32511
32631
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1))
32512
32632
  }
@@ -32523,9 +32643,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32523
32643
  $writer = [path, [path_segments, root]];
32524
32644
  $send(cache, '[]=', Opal.to_a($writer));
32525
32645
  return $writer[$rb_minus($writer["length"], 1)];;
32526
- }, $PathResolver_partition_path$11.$$arity = -2);
32646
+ }, $PathResolver_partition_path$12.$$arity = -2);
32527
32647
 
32528
- Opal.def(self, '$join_path', $PathResolver_join_path$12 = function $$join_path(segments, root) {
32648
+ Opal.def(self, '$join_path', $PathResolver_join_path$13 = function $$join_path(segments, root) {
32529
32649
  var self = this;
32530
32650
 
32531
32651
 
@@ -32539,10 +32659,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32539
32659
 
32540
32660
  return segments.$join($$($nesting, 'SLASH'));
32541
32661
  };
32542
- }, $PathResolver_join_path$12.$$arity = -2);
32662
+ }, $PathResolver_join_path$13.$$arity = -2);
32543
32663
 
32544
- Opal.def(self, '$system_path', $PathResolver_system_path$13 = function $$system_path(target, start, jail, opts) {
32545
- var $a, $b, $$14, $$15, self = this, target_path = nil, target_segments = nil, jail_segments = nil, jail_root = nil, recheck = nil, start_segments = nil, start_root = nil, resolved_segments = nil, unresolved_segments = nil, warned = nil;
32664
+ Opal.def(self, '$system_path', $PathResolver_system_path$14 = function $$system_path(target, start, jail, opts) {
32665
+ var $a, $b, $$15, $$16, self = this, target_path = nil, target_segments = nil, jail_segments = nil, jail_root = nil, recheck = nil, start_segments = nil, start_root = nil, resolved_segments = nil, unresolved_segments = nil, warned = nil;
32546
32666
 
32547
32667
 
32548
32668
 
@@ -32633,7 +32753,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32633
32753
  $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
32634
32754
  };
32635
32755
  warned = false;
32636
- $send(unresolved_segments, 'each', [], ($$14 = function(segment){var self = $$14.$$s || this, $c;
32756
+ $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this, $c;
32637
32757
 
32638
32758
 
32639
32759
 
@@ -32656,9 +32776,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32656
32776
  }
32657
32777
  } else {
32658
32778
  return resolved_segments['$<<'](segment)
32659
- };}, $$14.$$s = self, $$14.$$arity = 1, $$14));
32779
+ };}, $$15.$$s = self, $$15.$$arity = 1, $$15));
32660
32780
  } else {
32661
- $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this;
32781
+ $send(unresolved_segments, 'each', [], ($$16 = function(segment){var self = $$16.$$s || this;
32662
32782
 
32663
32783
 
32664
32784
 
@@ -32669,7 +32789,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32669
32789
  return resolved_segments.$pop()
32670
32790
  } else {
32671
32791
  return resolved_segments['$<<'](segment)
32672
- };}, $$15.$$s = self, $$15.$$arity = 1, $$15))
32792
+ };}, $$16.$$s = self, $$16.$$arity = 1, $$16))
32673
32793
  };};
32674
32794
  if ($truthy(recheck)) {
32675
32795
 
@@ -32690,10 +32810,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32690
32810
  } else {
32691
32811
  return self.$join_path(resolved_segments, jail_root)
32692
32812
  };
32693
- }, $PathResolver_system_path$13.$$arity = -2);
32813
+ }, $PathResolver_system_path$14.$$arity = -2);
32694
32814
 
32695
- Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
32696
- var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
32815
+ Opal.def(self, '$web_path', $PathResolver_web_path$17 = function $$web_path(target, start) {
32816
+ var $a, $b, $$18, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
32697
32817
 
32698
32818
 
32699
32819
 
@@ -32712,7 +32832,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32712
32832
  };
32713
32833
  $b = self.$partition_path(target, true), $a = Opal.to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), (target_root = ($a[1] == null ? nil : $a[1])), $b;
32714
32834
  resolved_segments = [];
32715
- $send(target_segments, 'each', [], ($$17 = function(segment){var self = $$17.$$s || this, $c;
32835
+ $send(target_segments, 'each', [], ($$18 = function(segment){var self = $$18.$$s || this, $c;
32716
32836
 
32717
32837
 
32718
32838
 
@@ -32733,7 +32853,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32733
32853
  }
32734
32854
  } else {
32735
32855
  return resolved_segments['$<<'](segment)
32736
- };}, $$17.$$s = self, $$17.$$arity = 1, $$17));
32856
+ };}, $$18.$$s = self, $$18.$$arity = 1, $$18));
32737
32857
  if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) {
32738
32858
  resolved_path = resolved_path.$gsub(" ", "%20")};
32739
32859
  if ($truthy(uri_prefix)) {
@@ -32741,9 +32861,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32741
32861
  } else {
32742
32862
  return resolved_path
32743
32863
  };
32744
- }, $PathResolver_web_path$16.$$arity = -2);
32864
+ }, $PathResolver_web_path$17.$$arity = -2);
32745
32865
  self.$private();
32746
- return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) {
32866
+ return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$19 = function $$extract_uri_prefix(str) {
32747
32867
  var $a, self = this;
32748
32868
 
32749
32869
  if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
@@ -32751,7 +32871,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32751
32871
  } else {
32752
32872
  return str
32753
32873
  }
32754
- }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
32874
+ }, $PathResolver_extract_uri_prefix$19.$$arity = 1), nil) && 'extract_uri_prefix';
32755
32875
  })($nesting[0], null, $nesting)
32756
32876
  })($nesting[0], $nesting)
32757
32877
  };
@@ -32778,7 +32898,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
32778
32898
  }
32779
32899
  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, $gvars = Opal.gvars, $hash = Opal.hash;
32780
32900
 
32781
- Opal.add_stubs(['$include', '$attr_reader', '$+', '$attr_accessor', '$!', '$===', '$split', '$file', '$dir', '$dirname', '$path', '$basename', '$lineno', '$reverse', '$prepare_lines', '$empty?', '$nil_or_empty?', '$peek_line', '$>', '$slice', '$[]', '$length', '$process_line', '$times', '$shift', '$read_line', '$<<', '$-', '$unshift_all', '$has_more_lines?', '$join', '$read_lines', '$unshift', '$start_with?', '$==', '$*', '$read_lines_until', '$size', '$clear', '$cursor', '$[]=', '$!=', '$fetch', '$cursor_at_mark', '$warn', '$logger', '$message_with_context', '$pop', '$push', '$respond_to?', '$reverse_each', '$new', '$tap', '$each', '$instance_variables', '$instance_variable_get', '$drop', '$instance_variable_set', '$class', '$object_id', '$inspect', '$private', '$prepare_source_array', '$prepare_source_string', '$chomp', '$valid_encoding?', '$to_s', '$raise', '$to_i', '$attributes', '$catalog', '$pop_include', '$parse', '$path=', '$dup', '$end_with?', '$keys', '$rindex', '$rootname', '$key?', '$attr', '$reverse!', '$>=', '$nil?', '$extensions?', '$include_processors?', '$extensions', '$include_processors', '$map', '$skip_front_matter!', '$adjust_indentation!', '$include?', '$=~', '$preprocess_conditional_directive', '$preprocess_include_directive', '$downcase', '$error', '$none?', '$any?', '$all?', '$strip', '$send', '$resolve_expr_val', '$replace_next_line', '$rstrip', '$sub_attributes', '$attribute_missing', '$info', '$parse_attributes', '$find', '$handles?', '$instance', '$process_method', '$safe', '$resolve_include_path', '$method', '$split_delimited_value', '$partition', '$<', '$to_a', '$uniq', '$sort', '$call', '$each_line', '$infinite?', '$push_include', '$delete', '$first', '$values', '$value?', '$create_include_cursor', '$delete_at', '$keep_if', '$read', '$uriish?', '$attr?', '$require_library', '$normalize_system_path', '$file?', '$relative_path', '$path_resolver', '$base_dir', '$to_f']);
32901
+ Opal.add_stubs(['$include', '$attr_reader', '$+', '$attr_accessor', '$!', '$===', '$split', '$file', '$dir', '$dirname', '$path', '$basename', '$lineno', '$reverse', '$prepare_lines', '$empty?', '$nil_or_empty?', '$peek_line', '$[]', '$>', '$slice', '$length', '$process_line', '$times', '$shift', '$read_line', '$<<', '$-', '$unshift_all', '$has_more_lines?', '$join', '$read_lines', '$unshift', '$start_with?', '$==', '$*', '$read_lines_until', '$size', '$clear', '$cursor', '$[]=', '$!=', '$fetch', '$cursor_at_mark', '$warn', '$logger', '$message_with_context', '$pop', '$push', '$respond_to?', '$reverse_each', '$new', '$tap', '$each', '$instance_variables', '$instance_variable_get', '$drop', '$instance_variable_set', '$class', '$object_id', '$inspect', '$private', '$prepare_source_array', '$prepare_source_string', '$chomp', '$valid_encoding?', '$to_s', '$raise', '$to_i', '$attributes', '$catalog', '$pop_include', '$parse', '$path=', '$dup', '$end_with?', '$keys', '$rindex', '$rootname', '$key?', '$attr', '$reverse!', '$>=', '$nil?', '$extensions?', '$include_processors?', '$extensions', '$include_processors', '$map', '$skip_front_matter!', '$adjust_indentation!', '$include?', '$=~', '$preprocess_conditional_directive', '$preprocess_include_directive', '$downcase', '$error', '$none?', '$any?', '$all?', '$strip', '$send', '$resolve_expr_val', '$replace_next_line', '$rstrip', '$sub_attributes', '$attribute_missing', '$info', '$parse_attributes', '$find', '$handles?', '$instance', '$process_method', '$safe', '$resolve_include_path', '$method', '$split_delimited_value', '$partition', '$<', '$to_a', '$uniq', '$sort', '$call', '$each_line', '$infinite?', '$push_include', '$delete', '$first', '$values', '$value?', '$create_include_cursor', '$delete_at', '$keep_if', '$read', '$uriish?', '$attr?', '$require_library', '$normalize_system_path', '$file?', '$relative_path', '$path_resolver', '$base_dir', '$to_f']);
32782
32902
  return (function($base, $parent_nesting) {
32783
32903
  var self = $module($base, 'Asciidoctor');
32784
32904
 
@@ -32923,26 +33043,31 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
32923
33043
  }, $Reader_next_line_empty$ques$7.$$arity = 0);
32924
33044
 
32925
33045
  Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) {
32926
- var $a, self = this, line = nil;
33046
+ var $a, $b, self = this, next_line = nil, line = nil;
32927
33047
 
32928
33048
 
32929
33049
 
32930
33050
  if (direct == null) {
32931
33051
  direct = false;
32932
33052
  };
32933
- if ($truthy(($truthy($a = direct) ? $a : $rb_gt(self.look_ahead, 0)))) {
32934
- if ($truthy(self.unescape_next_line)) {
32935
-
32936
- return (line = self.lines['$[]'](-1)).$slice(1, line.$length());
32937
- } else {
32938
- return self.lines['$[]'](-1)
32939
- }
32940
- } else if ($truthy(self.lines['$empty?']())) {
33053
+ while ($truthy(true)) {
32941
33054
 
32942
- self.look_ahead = 0;
32943
- return nil;
32944
- } else {
32945
- return ($truthy($a = self.$process_line(self.lines['$[]'](-1))) ? $a : self.$peek_line())
33055
+ next_line = self.lines['$[]'](-1);
33056
+ if ($truthy(($truthy($b = direct) ? $b : $rb_gt(self.look_ahead, 0)))) {
33057
+ return (function() {if ($truthy(self.unescape_next_line)) {
33058
+
33059
+ return next_line.$slice(1, next_line.$length());
33060
+ } else {
33061
+ return next_line
33062
+ }; return nil; })()
33063
+ } else if ($truthy(next_line)) {
33064
+ if ($truthy((line = self.$process_line(next_line)))) {
33065
+ return line}
33066
+ } else {
33067
+
33068
+ self.look_ahead = 0;
33069
+ return nil;
33070
+ };
32946
33071
  };
32947
33072
  }, $Reader_peek_line$8.$$arity = -1);
32948
33073
 
@@ -33436,7 +33561,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33436
33561
 
33437
33562
  var $nesting = [self].concat($parent_nesting), $PreprocessorReader_initialize$47, $PreprocessorReader_has_more_lines$ques$48, $PreprocessorReader_empty$ques$49, $PreprocessorReader_peek_line$50, $PreprocessorReader_push_include$51, $PreprocessorReader_include_depth$52, $PreprocessorReader_exceeds_max_depth$ques$53, $PreprocessorReader_shift$54, $PreprocessorReader_include_processors$ques$55, $PreprocessorReader_create_include_cursor$56, $PreprocessorReader_to_s$57, $PreprocessorReader_prepare_lines$59, $PreprocessorReader_process_line$60, $PreprocessorReader_preprocess_conditional_directive$61, $PreprocessorReader_preprocess_include_directive$66, $PreprocessorReader_resolve_include_path$80, $PreprocessorReader_pop_include$82, $PreprocessorReader_split_delimited_value$83, $PreprocessorReader_skip_front_matter$excl$84, $PreprocessorReader_resolve_expr_val$85;
33438
33563
 
33439
- self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.look_ahead = self.$$prototype.skipping = self.$$prototype.conditional_stack = nil;
33564
+ self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.skipping = self.$$prototype.look_ahead = self.$$prototype.conditional_stack = nil;
33440
33565
 
33441
33566
  self.$attr_reader("include_stack");
33442
33567
 
@@ -33557,27 +33682,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33557
33682
  };
33558
33683
  self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
33559
33684
  if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) {
33560
-
33561
- $writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33685
+ ($truthy($a = self.includes['$[]'](path.$slice(0, path.$rindex(".")))) ? $a : (($writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33562
33686
  return nil
33563
33687
  } else {
33564
33688
  return true
33565
- }; return nil; })()];
33566
- $send(self.includes, '[]=', Opal.to_a($writer));
33567
- $writer[$rb_minus($writer["length"], 1)];};
33689
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))};
33568
33690
  } else {
33569
33691
 
33570
33692
  self.dir = ".";
33571
33693
  self.process_lines = true;
33572
33694
  if ($truthy((self.path = path))) {
33573
-
33574
- $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33695
+ ($truthy($a = self.includes['$[]']($$($nesting, 'Helpers').$rootname(path))) ? $a : (($writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33575
33696
  return nil
33576
33697
  } else {
33577
33698
  return true
33578
- }; return nil; })()];
33579
- $send(self.includes, '[]=', Opal.to_a($writer));
33580
- $writer[$rb_minus($writer["length"], 1)];
33699
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
33581
33700
  } else {
33582
33701
  self.path = "<stdin>"
33583
33702
  };
@@ -33728,6 +33847,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33728
33847
  };
33729
33848
  if ($truthy(line['$empty?']())) {
33730
33849
 
33850
+ if ($truthy(self.skipping)) {
33851
+
33852
+ self.$shift();
33853
+ return nil;};
33731
33854
  self.look_ahead = $rb_plus(self.look_ahead, 1);
33732
33855
  return line;};
33733
33856
  if ($truthy(($truthy($a = ($truthy($b = line['$end_with?']("]")) ? line['$start_with?']("[")['$!']() : $b)) ? line['$include?']("::") : $a))) {
@@ -33959,7 +34082,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33959
34082
  ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})));
33960
34083
  return true;
33961
34084
  } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) {
33962
- return self.$replace_next_line("" + "link:" + (expanded_target) + "[]")
34085
+
34086
+ if ($truthy(expanded_target['$include?'](" "))) {
34087
+ expanded_target = "" + "pass:c[" + (expanded_target) + "]"};
34088
+ return self.$replace_next_line("" + "link:" + (expanded_target) + "[role=include]");
33963
34089
  } else if ($truthy(self.maxdepth)) {
33964
34090
 
33965
34091
  if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) {
@@ -34271,6 +34397,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34271
34397
  self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);};
34272
34398
  } else {
34273
34399
 
34400
+ inc_content = nil;
34401
+
34274
34402
  try {
34275
34403
 
34276
34404
  inc_content = $send(reader, 'call', [inc_path, read_mode], ($$79 = function(f){var self = $$79.$$s || this;
@@ -34282,7 +34410,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34282
34410
  };
34283
34411
  return f.$read();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
34284
34412
  self.$shift();
34285
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
34286
34413
  } catch ($err) {
34287
34414
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
34288
34415
  try {
@@ -34291,7 +34418,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34291
34418
  return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
34292
34419
  } finally { Opal.pop_exception() }
34293
34420
  } else { throw $err; }
34294
- };
34421
+ };;
34422
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
34295
34423
  };
34296
34424
  return true;
34297
34425
  } else {
@@ -34313,7 +34441,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34313
34441
 
34314
34442
  if ($truthy(doc['$attr?']("allow-uri-read"))) {
34315
34443
  } else {
34316
- return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]")
34444
+
34445
+ if ($truthy(target['$include?'](" "))) {
34446
+ target = "" + "pass:c[" + (target) + "]"};
34447
+ return self.$replace_next_line("" + "link:" + (target) + "[role=include]");
34317
34448
  };
34318
34449
  if ($truthy(doc['$attr?']("cache-uri"))) {
34319
34450
  if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) {
@@ -34370,39 +34501,37 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34370
34501
  }, $PreprocessorReader_split_delimited_value$83.$$arity = 1);
34371
34502
 
34372
34503
  Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$84 = function(data, increment_linenos) {
34373
- var $a, $b, self = this, front_matter = nil, original_data = nil;
34504
+ var $a, $b, self = this, delim = nil, original_data = nil, front_matter = nil, eof = nil;
34374
34505
 
34375
34506
 
34376
34507
 
34377
34508
  if (increment_linenos == null) {
34378
34509
  increment_linenos = true;
34379
34510
  };
34380
- front_matter = nil;
34381
- if (data['$[]'](0)['$==']("---")) {
34511
+ if ((delim = data['$[]'](0))['$==']("---")) {
34512
+ } else {
34513
+ return nil
34514
+ };
34515
+ original_data = data.$drop(0);
34516
+ data.$shift();
34517
+ front_matter = [];
34518
+ if ($truthy(increment_linenos)) {
34519
+ self.lineno = $rb_plus(self.lineno, 1)};
34520
+ while (!($truthy(($truthy($b = (eof = data['$empty?']())) ? $b : data['$[]'](0)['$=='](delim))))) {
34382
34521
 
34383
- original_data = data.$drop(0);
34384
- data.$shift();
34385
- front_matter = [];
34522
+ front_matter['$<<'](data.$shift());
34386
34523
  if ($truthy(increment_linenos)) {
34387
34524
  self.lineno = $rb_plus(self.lineno, 1)};
34388
- while ($truthy(($truthy($b = data['$empty?']()['$!']()) ? data['$[]'](0)['$!=']("---") : $b))) {
34389
-
34390
- front_matter['$<<'](data.$shift());
34391
- if ($truthy(increment_linenos)) {
34392
- self.lineno = $rb_plus(self.lineno, 1)};
34393
- };
34394
- if ($truthy(data['$empty?']())) {
34395
-
34396
- $send(data, 'unshift', Opal.to_a(original_data));
34397
- if ($truthy(increment_linenos)) {
34398
- self.lineno = 0};
34399
- front_matter = nil;
34400
- } else {
34401
-
34402
- data.$shift();
34403
- if ($truthy(increment_linenos)) {
34404
- self.lineno = $rb_plus(self.lineno, 1)};
34405
- };};
34525
+ };
34526
+ if ($truthy(eof)) {
34527
+
34528
+ $send(data, 'unshift', Opal.to_a(original_data));
34529
+ if ($truthy(increment_linenos)) {
34530
+ self.lineno = $rb_minus(self.lineno, original_data.$size())};
34531
+ return nil;};
34532
+ data.$shift();
34533
+ if ($truthy(increment_linenos)) {
34534
+ self.lineno = $rb_plus(self.lineno, 1)};
34406
34535
  return front_matter;
34407
34536
  }, $PreprocessorReader_skip_front_matter$excl$84.$$arity = -2);
34408
34537
  return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$85 = function $$resolve_expr_val(val) {
@@ -34822,7 +34951,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
34822
34951
  }
34823
34952
  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;
34824
34953
 
34825
- 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', '$attr_writer', '$convert', '$text', '$!=', '$file', '$lineno', '$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']);
34954
+ 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', '$attr_writer', '$convert', '$text', '$!=', '$file', '$lineno', '$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']);
34826
34955
  return (function($base, $parent_nesting) {
34827
34956
  var self = $module($base, 'Asciidoctor');
34828
34957
 
@@ -35238,7 +35367,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35238
35367
  if ($truthy(inner_document_lines['$empty?']())) {
35239
35368
  } else if ($truthy((unprocessed_line1 = inner_document_lines['$[]'](0))['$include?']("::"))) {
35240
35369
 
35241
- preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1]).$readlines();
35370
+ preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1], inner_document_cursor).$readlines();
35242
35371
  if ($truthy((($a = unprocessed_line1['$=='](preprocessed_lines['$[]'](0))) ? $rb_lt(preprocessed_lines.$size(), 2) : unprocessed_line1['$=='](preprocessed_lines['$[]'](0))))) {
35243
35372
  } else {
35244
35373
 
@@ -35386,9 +35515,9 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35386
35515
  (function($base, $super, $parent_nesting) {
35387
35516
  var self = $klass($base, $super, 'ParserContext');
35388
35517
 
35389
- var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$30, $ParserContext_starts_with_delimiter$ques$31, $ParserContext_match_delimiter$32, $ParserContext_skip_past_delimiter$33, $ParserContext_skip_past_escaped_delimiter$34, $ParserContext_buffer_has_unclosed_quotes$ques$35, $ParserContext_take_cellspec$36, $ParserContext_push_cellspec$37, $ParserContext_keep_cell_open$38, $ParserContext_mark_cell_closed$39, $ParserContext_cell_open$ques$40, $ParserContext_cell_closed$ques$41, $ParserContext_close_open_cell$42, $ParserContext_close_cell$43, $ParserContext_close_row$46, $ParserContext_activate_rowspan$47, $ParserContext_end_of_row$ques$49, $ParserContext_effective_column_visits$50, $ParserContext_advance$51;
35518
+ var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$30, $ParserContext_starts_with_delimiter$ques$31, $ParserContext_match_delimiter$32, $ParserContext_skip_past_delimiter$33, $ParserContext_skip_past_escaped_delimiter$34, $ParserContext_buffer_has_unclosed_quotes$ques$35, $ParserContext_take_cellspec$36, $ParserContext_push_cellspec$37, $ParserContext_keep_cell_open$38, $ParserContext_mark_cell_closed$39, $ParserContext_cell_open$ques$40, $ParserContext_cell_closed$ques$41, $ParserContext_close_open_cell$42, $ParserContext_close_cell$43, $ParserContext_close_table$46, $ParserContext_close_row$47, $ParserContext_activate_rowspan$48, $ParserContext_end_of_row$ques$50, $ParserContext_effective_column_visits$51, $ParserContext_advance$52;
35390
35519
 
35391
- 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;
35520
+ 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.column_visits = self.$$prototype.table = self.$$prototype.current_row = self.$$prototype.colcount = self.$$prototype.active_rowspans = self.$$prototype.linenum = nil;
35392
35521
 
35393
35522
  self.$include($$($nesting, 'Logging'));
35394
35523
  Opal.const_set($nesting[0], 'FORMATS', ["psv", "csv", "dsv", "tsv"].$to_set());
@@ -35577,8 +35706,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35577
35706
  return nil;
35578
35707
  }, $ParserContext_close_open_cell$42.$$arity = -1);
35579
35708
 
35580
- Opal.def(self, '$close_cell', $ParserContext_close_cell$43 = function $$close_cell(eol) {try {
35581
-
35709
+ Opal.def(self, '$close_cell', $ParserContext_close_cell$43 = function $$close_cell(eol) {
35582
35710
  var $a, $b, $$44, self = this, cell_text = nil, cellspec = nil, repeat = nil, q = nil;
35583
35711
 
35584
35712
 
@@ -35617,7 +35745,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35617
35745
  cell_text = cell_text.$squeeze(q)
35618
35746
  }};
35619
35747
  };
35620
- $send((1), 'upto', [repeat], ($$44 = function(i){var self = $$44.$$s || this, $c, $d, $$45, $e, column = nil, extra_cols = nil, offset = nil, cell = nil;
35748
+ $send((1), 'upto', [repeat], ($$44 = function(i){var self = $$44.$$s || this, $c, $d, $$45, $e, column = nil, extra_cols = nil, offset = nil, cell = nil, cursor_before_mark = nil, row_status = nil;
35621
35749
  if (self.colcount == null) self.colcount = nil;
35622
35750
  if (self.table == null) self.table = nil;
35623
35751
  if (self.current_row == null) self.current_row = nil;
@@ -35645,13 +35773,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35645
35773
  j = nil;
35646
35774
  };
35647
35775
  return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$45.$$s = self, $$45.$$arity = 1, $$45));};
35648
- } else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) {
35649
35776
  } else {
35650
-
35651
- self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": self.reader.$cursor_before_mark()})));
35652
- Opal.ret(nil);
35777
+ column = self.table.$columns()['$[]'](self.current_row.$size())
35653
35778
  };
35654
- cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": self.reader.$cursor_before_mark()}));
35779
+ cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": (cursor_before_mark = self.reader.$cursor_before_mark())}));
35655
35780
  self.reader.$mark();
35656
35781
  if ($truthy(($truthy($c = cell.$rowspan()['$!']()) ? $c : cell.$rowspan()['$=='](1)))) {
35657
35782
  } else {
@@ -35659,22 +35784,44 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35659
35784
  };
35660
35785
  self.column_visits = $rb_plus(self.column_visits, ($truthy($c = cell.$colspan()) ? $c : 1));
35661
35786
  self.current_row['$<<'](cell);
35662
- if ($truthy(($truthy($c = self['$end_of_row?']()) ? ($truthy($d = ($truthy($e = self.colcount['$!='](-1)) ? $e : $rb_gt(self.linenum, 0))) ? $d : ($truthy($e = eol) ? i['$=='](repeat) : $e)) : $c))) {
35663
- return self.$close_row()
35787
+ if ($truthy(($truthy($c = $rb_gt((row_status = self['$end_of_row?']()), -1)) ? ($truthy($d = ($truthy($e = self.colcount['$!='](-1)) ? $e : $rb_gt(self.linenum, 0))) ? $d : ($truthy($e = eol) ? i['$=='](repeat) : $e)) : $c))) {
35788
+ if ($truthy($rb_gt(row_status, 0))) {
35789
+
35790
+ self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": cursor_before_mark})));
35791
+ return self.$close_row(true);
35792
+ } else {
35793
+ return self.$close_row()
35794
+ }
35664
35795
  } else {
35665
35796
  return nil
35666
35797
  };}, $$44.$$s = self, $$44.$$arity = 1, $$44));
35667
35798
  self.cell_open = false;
35668
35799
  return nil;
35669
- } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
35670
35800
  }, $ParserContext_close_cell$43.$$arity = -1);
35801
+
35802
+ Opal.def(self, '$close_table', $ParserContext_close_table$46 = function $$close_table() {
35803
+ var self = this;
35804
+
35805
+
35806
+ if (self.column_visits['$=='](0)) {
35807
+ return nil};
35808
+ self.$logger().$error(self.$message_with_context("dropping cells from incomplete row detected end of table", $hash2(["source_location"], {"source_location": self.reader.$cursor_before_mark()})));
35809
+ return nil;
35810
+ }, $ParserContext_close_table$46.$$arity = 0);
35671
35811
  self.$private();
35672
35812
 
35673
- Opal.def(self, '$close_row', $ParserContext_close_row$46 = function $$close_row() {
35813
+ Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row(drop) {
35674
35814
  var $a, self = this, $writer = nil;
35675
35815
 
35676
35816
 
35677
- self.table.$rows().$body()['$<<'](self.current_row);
35817
+
35818
+ if (drop == null) {
35819
+ drop = false;
35820
+ };
35821
+ if ($truthy(drop)) {
35822
+ } else {
35823
+ self.table.$rows().$body()['$<<'](self.current_row)
35824
+ };
35678
35825
  if (self.colcount['$=='](-1)) {
35679
35826
  self.colcount = self.column_visits};
35680
35827
  self.column_visits = 0;
@@ -35682,13 +35829,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35682
35829
  self.active_rowspans.$shift();
35683
35830
  ($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
35684
35831
  return nil;
35685
- }, $ParserContext_close_row$46.$$arity = 0);
35832
+ }, $ParserContext_close_row$47.$$arity = -1);
35686
35833
 
35687
- Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$47 = function $$activate_rowspan(rowspan, colspan) {
35688
- var $$48, self = this;
35834
+ Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) {
35835
+ var $$49, self = this;
35689
35836
 
35690
35837
 
35691
- $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$48 = function(i){var self = $$48.$$s || this, $a, $writer = nil;
35838
+ $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil;
35692
35839
  if (self.active_rowspans == null) self.active_rowspans = nil;
35693
35840
 
35694
35841
 
@@ -35698,26 +35845,30 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35698
35845
  };
35699
35846
  $writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)];
35700
35847
  $send(self.active_rowspans, '[]=', Opal.to_a($writer));
35701
- return $writer[$rb_minus($writer["length"], 1)];}, $$48.$$s = self, $$48.$$arity = 1, $$48));
35848
+ return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49));
35702
35849
  return nil;
35703
- }, $ParserContext_activate_rowspan$47.$$arity = 2);
35850
+ }, $ParserContext_activate_rowspan$48.$$arity = 2);
35704
35851
 
35705
- Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$49 = function() {
35706
- var $a, self = this;
35852
+ Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() {
35853
+ var self = this;
35707
35854
 
35708
- return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount))
35709
- }, $ParserContext_end_of_row$ques$49.$$arity = 0);
35855
+ if (self.colcount['$=='](-1)) {
35856
+ return 0
35857
+ } else {
35858
+ return self.$effective_column_visits()['$<=>'](self.colcount)
35859
+ }
35860
+ }, $ParserContext_end_of_row$ques$50.$$arity = 0);
35710
35861
 
35711
- Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$50 = function $$effective_column_visits() {
35862
+ Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() {
35712
35863
  var self = this;
35713
35864
 
35714
35865
  return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0))
35715
- }, $ParserContext_effective_column_visits$50.$$arity = 0);
35716
- return (Opal.def(self, '$advance', $ParserContext_advance$51 = function $$advance() {
35866
+ }, $ParserContext_effective_column_visits$51.$$arity = 0);
35867
+ return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() {
35717
35868
  var self = this;
35718
35869
 
35719
35870
  return (self.linenum = $rb_plus(self.linenum, 1))
35720
- }, $ParserContext_advance$51.$$arity = 0), nil) && 'advance';
35871
+ }, $ParserContext_advance$52.$$arity = 0), nil) && 'advance';
35721
35872
  })($$($nesting, 'Table'), null, $nesting);
35722
35873
  })($nesting[0], $nesting)
35723
35874
  };
@@ -36284,7 +36435,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
36284
36435
  return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
36285
36436
  } else {
36286
36437
  return ""
36287
- }; 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>"
36438
+ }; return nil; })()) + "<script>\n" + "if (!hljs.initHighlighting.called) {\n" + " hljs.initHighlighting.called = true\n" + " ;[].slice.call(document.querySelectorAll('pre.highlight > code[data-lang]')).forEach(function (el) { hljs.highlightBlock(el) })\n" + "}\n" + "</script>"
36288
36439
  };
36289
36440
  }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
36290
36441
  })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
@@ -37852,7 +38003,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
37852
38003
 
37853
38004
  return syntax_hl.$format(node, lang, opts);
37854
38005
  } else {
37855
- return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close)
38006
+ return $rb_plus($rb_plus(pre_open, node.$content()), pre_close)
37856
38007
  }; return nil; })()) + "\n" + "</div>\n" + "</div>";
37857
38008
  }, $Html5Converter_convert_listing$26.$$arity = 1);
37858
38009
 
@@ -37984,7 +38135,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
37984
38135
  if ((style = node.$style())['$==']("abstract")) {
37985
38136
  if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) {
37986
38137
 
37987
- self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content.");
38138
+ self.$logger().$warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content.");
37988
38139
  return "";
37989
38140
  } else {
37990
38141
 
@@ -39066,7 +39217,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
39066
39217
  }
39067
39218
  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, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send, $hash = Opal.hash;
39068
39219
 
39069
- Opal.add_stubs(['$==', '$[]=', '$config', '$-', '$const_defined?', '$singleton_class?', '$include', '$const_get', '$extend', '$attr_reader', '$merge', '$class', '$update', '$raise', '$document', '$doctype', '$[]', '$+', '$level', '$delete', '$>', '$casecmp', '$new', '$title=', '$sectname=', '$special=', '$fetch', '$numbered=', '$!', '$key?', '$attr?', '$special', '$numbered', '$generate_id', '$title', '$id=', '$update_attributes', '$tr', '$basename', '$create_block', '$assign_caption', '$===', '$parse_blocks', '$empty?', '$include?', '$sub_attributes', '$parse', '$each', '$define_method', '$unshift', '$shift', '$send', '$size', '$binding', '$receiver', '$define_singleton_method', '$instance_exec', '$to_proc', '$call', '$option', '$flatten', '$respond_to?', '$to_s', '$partition', '$to_i', '$<<', '$compact', '$inspect', '$attr_accessor', '$to_set', '$match?', '$resolve_regexp', '$method', '$register', '$values', '$groups', '$arity', '$activate', '$add_document_processor', '$any?', '$select', '$add_syntax_processor', '$to_sym', '$instance_variable_get', '$kind', '$private', '$join', '$map', '$split', '$capitalize', '$instance_variable_set', '$resolve_args', '$enable_dsl', '$singleton_class', '$process_block_given?', '$source_location', '$freeze', '$resolve_class', '$<', '$update_config', '$as_symbol', '$name', '$name=', '$pop', '$-@', '$next_auto_id', '$generate_name']);
39220
+ Opal.add_stubs(['$==', '$[]=', '$config', '$-', '$const_defined?', '$singleton_class?', '$include', '$const_get', '$extend', '$attr_reader', '$merge', '$class', '$update', '$raise', '$document', '$doctype', '$[]', '$+', '$level', '$delete', '$>', '$casecmp', '$new', '$title=', '$sectname=', '$special=', '$fetch', '$numbered=', '$!', '$key?', '$attr?', '$special', '$numbered', '$generate_id', '$title', '$id=', '$update_attributes', '$tr', '$basename', '$create_block', '$assign_caption', '$===', '$parse_blocks', '$empty?', '$include?', '$sub_attributes', '$parse', '$each', '$define_method', '$unshift', '$shift', '$send', '$size', '$binding', '$receiver', '$define_singleton_method', '$instance_exec', '$to_proc', '$call', '$option', '$flatten', '$respond_to?', '$to_s', '$partition', '$to_i', '$<<', '$compact', '$inspect', '$attr_accessor', '$to_set', '$match?', '$resolve_regexp', '$method', '$register', '$reset', '$values', '$groups', '$arity', '$activate', '$add_document_processor', '$any?', '$select', '$add_syntax_processor', '$to_sym', '$instance_variable_get', '$kind', '$private', '$join', '$map', '$split', '$capitalize', '$instance_variable_set', '$resolve_args', '$enable_dsl', '$singleton_class', '$process_block_given?', '$source_location', '$freeze', '$resolve_class', '$<', '$update_config', '$as_symbol', '$name', '$name=', '$pop', '$-@', '$next_auto_id', '$generate_name', '$each_with_object']);
39070
39221
 
39071
39222
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
39072
39223
  } else {
@@ -40004,9 +40155,9 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40004
40155
  (function($base, $super, $parent_nesting) {
40005
40156
  var self = $klass($base, $super, 'Registry');
40006
40157
 
40007
- var $nesting = [self].concat($parent_nesting), $Registry_initialize$53, $Registry_activate$54, $Registry_preprocessor$56, $Registry_preprocessors$ques$57, $Registry_preprocessors$58, $Registry_tree_processor$59, $Registry_tree_processors$ques$60, $Registry_tree_processors$61, $Registry_postprocessor$62, $Registry_postprocessors$ques$63, $Registry_postprocessors$64, $Registry_include_processor$65, $Registry_include_processors$ques$66, $Registry_include_processors$67, $Registry_docinfo_processor$68, $Registry_docinfo_processors$ques$69, $Registry_docinfo_processors$71, $Registry_block$73, $Registry_blocks$ques$74, $Registry_registered_for_block$ques$75, $Registry_find_block_extension$76, $Registry_block_macro$77, $Registry_block_macros$ques$78, $Registry_registered_for_block_macro$ques$79, $Registry_find_block_macro_extension$80, $Registry_inline_macro$81, $Registry_inline_macros$ques$82, $Registry_registered_for_inline_macro$ques$83, $Registry_find_inline_macro_extension$84, $Registry_inline_macros$85, $Registry_prefer$86, $Registry_add_document_processor$87, $Registry_add_syntax_processor$89, $Registry_resolve_args$91, $Registry_as_symbol$92;
40158
+ var $nesting = [self].concat($parent_nesting), $Registry_initialize$53, $Registry_activate$54, $Registry_preprocessor$56, $Registry_preprocessors$ques$57, $Registry_preprocessors$58, $Registry_tree_processor$59, $Registry_tree_processors$ques$60, $Registry_tree_processors$61, $Registry_postprocessor$62, $Registry_postprocessors$ques$63, $Registry_postprocessors$64, $Registry_include_processor$65, $Registry_include_processors$ques$66, $Registry_include_processors$67, $Registry_docinfo_processor$68, $Registry_docinfo_processors$ques$69, $Registry_docinfo_processors$71, $Registry_block$73, $Registry_blocks$ques$74, $Registry_registered_for_block$ques$75, $Registry_find_block_extension$76, $Registry_block_macro$77, $Registry_block_macros$ques$78, $Registry_registered_for_block_macro$ques$79, $Registry_find_block_macro_extension$80, $Registry_inline_macro$81, $Registry_inline_macros$ques$82, $Registry_registered_for_inline_macro$ques$83, $Registry_find_inline_macro_extension$84, $Registry_inline_macros$85, $Registry_prefer$86, $Registry_add_document_processor$87, $Registry_add_syntax_processor$89, $Registry_reset$91, $Registry_resolve_args$92, $Registry_as_symbol$93;
40008
40159
 
40009
- self.$$prototype.groups = self.$$prototype.preprocessor_extensions = self.$$prototype.tree_processor_extensions = self.$$prototype.postprocessor_extensions = self.$$prototype.include_processor_extensions = self.$$prototype.docinfo_processor_extensions = self.$$prototype.block_extensions = self.$$prototype.block_macro_extensions = self.$$prototype.inline_macro_extensions = nil;
40160
+ self.$$prototype.document = self.$$prototype.groups = self.$$prototype.preprocessor_extensions = self.$$prototype.tree_processor_extensions = self.$$prototype.postprocessor_extensions = self.$$prototype.include_processor_extensions = self.$$prototype.docinfo_processor_extensions = self.$$prototype.block_extensions = self.$$prototype.block_macro_extensions = self.$$prototype.inline_macro_extensions = nil;
40010
40161
 
40011
40162
  self.$attr_reader("document");
40012
40163
  self.$attr_reader("groups");
@@ -40020,6 +40171,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40020
40171
  groups = $hash2([], {});
40021
40172
  };
40022
40173
  self.groups = groups;
40174
+ self.$reset();
40023
40175
  self.preprocessor_extensions = (self.tree_processor_extensions = (self.postprocessor_extensions = (self.include_processor_extensions = (self.docinfo_processor_extensions = (self.block_extensions = (self.block_macro_extensions = (self.inline_macro_extensions = nil)))))));
40024
40176
  return (self.document = nil);
40025
40177
  }, $Registry_initialize$53.$$arity = -1);
@@ -40028,6 +40180,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40028
40180
  var $$55, self = this, ext_groups = nil;
40029
40181
 
40030
40182
 
40183
+ if ($truthy(self.document)) {
40184
+ self.$reset()};
40031
40185
  self.document = document;
40032
40186
  if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) {
40033
40187
  } else {
@@ -40398,7 +40552,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40398
40552
  };
40399
40553
  if ($truthy(processor['$process_block_given?']())) {
40400
40554
  } else {
40401
- self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
40555
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40402
40556
  };
40403
40557
  processor.$freeze();
40404
40558
  extension = $$($nesting, 'ProcessorExtension').$new(kind, processor);
@@ -40468,11 +40622,11 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40468
40622
  };
40469
40623
  if ($truthy((name = self.$as_symbol(processor.$name())))) {
40470
40624
  } else {
40471
- self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location()))
40625
+ self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40472
40626
  };
40473
40627
  if ($truthy(processor['$process_block_given?']())) {
40474
40628
  } else {
40475
- self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
40629
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40476
40630
  };
40477
40631
  processor.$freeze();
40478
40632
 
@@ -40525,7 +40679,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40525
40679
  };
40526
40680
  }, $Registry_add_syntax_processor$89.$$arity = 2);
40527
40681
 
40528
- Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) {
40682
+ Opal.def(self, '$reset', $Registry_reset$91 = function $$reset() {
40683
+ var self = this;
40684
+
40685
+
40686
+ self.preprocessor_extensions = (self.tree_processor_extensions = (self.postprocessor_extensions = (self.include_processor_extensions = (self.docinfo_processor_extensions = (self.block_extensions = (self.block_macro_extensions = (self.inline_macro_extensions = nil)))))));
40687
+ return (self.document = nil);
40688
+ }, $Registry_reset$91.$$arity = 0);
40689
+
40690
+ Opal.def(self, '$resolve_args', $Registry_resolve_args$92 = function $$resolve_args(args, expect) {
40529
40691
  var self = this, opts = nil, missing = nil;
40530
40692
 
40531
40693
 
@@ -40542,8 +40704,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40542
40704
  args.$pop(missing['$-@']())};
40543
40705
  args['$<<'](opts);
40544
40706
  return args;
40545
- }, $Registry_resolve_args$91.$$arity = 2);
40546
- return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) {
40707
+ }, $Registry_resolve_args$92.$$arity = 2);
40708
+ return (Opal.def(self, '$as_symbol', $Registry_as_symbol$93 = function $$as_symbol(name) {
40547
40709
  var self = this;
40548
40710
 
40549
40711
  if ($truthy(name)) {
@@ -40551,42 +40713,42 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40551
40713
  } else {
40552
40714
  return nil
40553
40715
  }
40554
- }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol';
40716
+ }, $Registry_as_symbol$93.$$arity = 1), nil) && 'as_symbol';
40555
40717
  })($nesting[0], null, $nesting);
40556
40718
  (function(self, $parent_nesting) {
40557
- var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99;
40719
+ var $nesting = [self].concat($parent_nesting), $generate_name$94, $next_auto_id$95, $groups$96, $create$97, $register$98, $unregister_all$99, $unregister$100;
40558
40720
 
40559
40721
 
40560
40722
 
40561
- Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() {
40723
+ Opal.def(self, '$generate_name', $generate_name$94 = function $$generate_name() {
40562
40724
  var self = this;
40563
40725
 
40564
40726
  return "" + "extgrp" + (self.$next_auto_id())
40565
- }, $generate_name$93.$$arity = 0);
40727
+ }, $generate_name$94.$$arity = 0);
40566
40728
 
40567
- Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() {
40729
+ Opal.def(self, '$next_auto_id', $next_auto_id$95 = function $$next_auto_id() {
40568
40730
  var $a, self = this;
40569
40731
  if (self.auto_id == null) self.auto_id = nil;
40570
40732
 
40571
40733
 
40572
40734
  self.auto_id = ($truthy($a = self.auto_id) ? $a : -1);
40573
40735
  return (self.auto_id = $rb_plus(self.auto_id, 1));
40574
- }, $next_auto_id$94.$$arity = 0);
40736
+ }, $next_auto_id$95.$$arity = 0);
40575
40737
 
40576
- Opal.def(self, '$groups', $groups$95 = function $$groups() {
40738
+ Opal.def(self, '$groups', $groups$96 = function $$groups() {
40577
40739
  var $a, self = this;
40578
40740
  if (self.groups == null) self.groups = nil;
40579
40741
 
40580
40742
  return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {})))
40581
- }, $groups$95.$$arity = 0);
40743
+ }, $groups$96.$$arity = 0);
40582
40744
 
40583
- Opal.def(self, '$create', $create$96 = function $$create(name) {
40584
- var $iter = $create$96.$$p, block = $iter || nil, $a, self = this;
40745
+ Opal.def(self, '$create', $create$97 = function $$create(name) {
40746
+ var $iter = $create$97.$$p, block = $iter || nil, $a, self = this;
40585
40747
 
40586
- if ($iter) $create$96.$$p = null;
40748
+ if ($iter) $create$97.$$p = null;
40587
40749
 
40588
40750
 
40589
- if ($iter) $create$96.$$p = null;;
40751
+ if ($iter) $create$97.$$p = null;;
40590
40752
 
40591
40753
  if (name == null) {
40592
40754
  name = nil;
@@ -40596,15 +40758,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40596
40758
  } else {
40597
40759
  return $$($nesting, 'Registry').$new()
40598
40760
  };
40599
- }, $create$96.$$arity = -1);
40761
+ }, $create$97.$$arity = -1);
40600
40762
 
40601
- Opal.def(self, '$register', $register$97 = function $$register($a) {
40602
- var $iter = $register$97.$$p, block = $iter || nil, $post_args, args, $b, self = this, argc = nil, resolved_group = nil, group = nil, name = nil, $writer = nil;
40763
+ Opal.def(self, '$register', $register$98 = function $$register($a) {
40764
+ var $iter = $register$98.$$p, block = $iter || nil, $post_args, args, $b, self = this, argc = nil, resolved_group = nil, group = nil, name = nil, $writer = nil;
40603
40765
 
40604
- if ($iter) $register$97.$$p = null;
40766
+ if ($iter) $register$98.$$p = null;
40605
40767
 
40606
40768
 
40607
- if ($iter) $register$97.$$p = null;;
40769
+ if ($iter) $register$98.$$p = null;;
40608
40770
 
40609
40771
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
40610
40772
 
@@ -40626,34 +40788,37 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40626
40788
  $writer = [name.$to_sym(), resolved_group];
40627
40789
  $send(self.$groups(), '[]=', Opal.to_a($writer));
40628
40790
  return $writer[$rb_minus($writer["length"], 1)];;
40629
- }, $register$97.$$arity = -1);
40791
+ }, $register$98.$$arity = -1);
40630
40792
 
40631
- Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() {
40793
+ Opal.def(self, '$unregister_all', $unregister_all$99 = function $$unregister_all() {
40632
40794
  var self = this;
40633
40795
 
40634
40796
 
40635
40797
  self.groups = $hash2([], {});
40636
40798
  return nil;
40637
- }, $unregister_all$98.$$arity = 0);
40638
- return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) {
40639
- var $post_args, names, $$100, self = this;
40799
+ }, $unregister_all$99.$$arity = 0);
40800
+ return (Opal.def(self, '$unregister', $unregister$100 = function $$unregister($a) {
40801
+ var $post_args, names, $$101, self = this;
40640
40802
 
40641
40803
 
40642
40804
 
40643
40805
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
40644
40806
 
40645
40807
  names = $post_args;;
40646
- $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this;
40647
- if (self.groups == null) self.groups = nil;
40808
+ $send(names, 'each_with_object', [self.$groups()], ($$101 = function(group, catalog){var self = $$101.$$s || this;
40648
40809
 
40649
40810
 
40650
40811
 
40651
40812
  if (group == null) {
40652
40813
  group = nil;
40653
40814
  };
40654
- return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100));
40815
+
40816
+ if (catalog == null) {
40817
+ catalog = nil;
40818
+ };
40819
+ return catalog.$delete(group.$to_sym());}, $$101.$$s = self, $$101.$$arity = 2, $$101));
40655
40820
  return nil;
40656
- }, $unregister$99.$$arity = -1), nil) && 'unregister';
40821
+ }, $unregister$100.$$arity = -1), nil) && 'unregister';
40657
40822
  })(Opal.get_singleton_class(self), $nesting);
40658
40823
  })($nesting[0], $nesting)
40659
40824
  })($nesting[0], $nesting);
@@ -41009,7 +41174,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
41009
41174
  self.$require("asciidoctor/converter/html5");
41010
41175
  self.$require("asciidoctor/extensions");
41011
41176
  self.$require("asciidoctor/js/asciidoctor_ext");
41012
- return self.$require("asciidoctor/js/opal_ext/logger");
41177
+ self.$require("asciidoctor/js/opal_ext/logger");
41178
+ return Opal.const_set($$($nesting, 'Asciidoctor'), 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$$($$($nesting, 'Asciidoctor'), 'CG_BLANK')) + "|\\\\?&lt;(?=\\\\?(?:https?|file|ftp|irc)(:))|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|" + ($$$($$($nesting, 'Asciidoctor'), 'CC_ALL')) + "*?[^\\\\])\\]|(?!\\2)([^\\s]*?)&gt;|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))"));
41013
41179
  };
41014
41180
 
41015
41181
  /* Generated by Opal 0.11.99.dev */
@@ -41144,13 +41310,13 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
41144
41310
  Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
41145
41311
  return "r"
41146
41312
  } else {
41147
- return "rb:utf-8:utf-8"
41313
+ return "rb:UTF-8:UTF-8"
41148
41314
  }; return nil; })());
41149
41315
  Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE'));
41150
41316
  Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
41151
41317
  return "w"
41152
41318
  } else {
41153
- return "w:utf-8"
41319
+ return "wb:UTF-8"
41154
41320
  }; return nil; })());
41155
41321
  Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article");
41156
41322
  Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5");
@@ -46636,7 +46802,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
46636
46802
  }
46637
46803
 
46638
46804
 
46639
- var ASCIIDOCTOR_JS_VERSION = '2.2.6';
46805
+ var ASCIIDOCTOR_JS_VERSION = '2.2.8';
46640
46806
 
46641
46807
  /**
46642
46808
  * Get Asciidoctor.js version number.