@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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Asciidoctor.js 2.2.6 | MIT | https://github.com/asciidoctor/asciidoctor.js
2
+ * @license Asciidoctor.js 2.2.8 | MIT | https://github.com/asciidoctor/asciidoctor.js
3
3
  */
4
4
  (function(undefined) {
5
5
  // @note
@@ -21179,6 +21179,30 @@ Opal.modules["asciidoctor/js/opal_ext/string"] = function(Opal) {
21179
21179
  })($nesting[0], null, $nesting)
21180
21180
  };
21181
21181
 
21182
+ /* Generated by Opal 0.11.99.dev */
21183
+ Opal.modules["asciidoctor/js/opal_ext/array"] = function(Opal) {
21184
+ 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;
21185
+
21186
+ Opal.add_stubs(['$==', '$strict_encode64', '$_original_pack']);
21187
+ return (function($base, $super, $parent_nesting) {
21188
+ var self = $klass($base, $super, 'Array');
21189
+
21190
+ var $nesting = [self].concat($parent_nesting), $Array_pack$1;
21191
+
21192
+
21193
+ Opal.alias(self, "_original_pack", "pack");
21194
+ return (Opal.def(self, '$pack', $Array_pack$1 = function $$pack(format) {
21195
+ var self = this;
21196
+
21197
+ if (format['$==']("m0")) {
21198
+ return $$$('::', 'Base64').$strict_encode64(self)
21199
+ } else {
21200
+ return self.$_original_pack(self)
21201
+ }
21202
+ }, $Array_pack$1.$$arity = 1), nil) && 'pack';
21203
+ })($nesting[0], null, $nesting)
21204
+ };
21205
+
21182
21206
  /* Generated by Opal 0.11.99.dev */
21183
21207
  Opal.modules["asciidoctor/js/opal_ext/uri"] = function(Opal) {
21184
21208
  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;
@@ -21318,6 +21342,7 @@ Opal.modules["asciidoctor/js/opal_ext"] = function(Opal) {
21318
21342
  self.$require("asciidoctor/js/opal_ext/file");
21319
21343
  self.$require("asciidoctor/js/opal_ext/match_data");
21320
21344
  self.$require("asciidoctor/js/opal_ext/string");
21345
+ self.$require("asciidoctor/js/opal_ext/array");
21321
21346
  self.$require("asciidoctor/js/opal_ext/uri");
21322
21347
  self.$require("asciidoctor/js/opal_ext/base64");
21323
21348
  self.$require("asciidoctor/js/opal_ext/number");
@@ -21927,7 +21952,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21927
21952
  }
21928
21953
  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;
21929
21954
 
21930
- 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']);
21955
+ 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']);
21931
21956
  return (function($base, $parent_nesting) {
21932
21957
  var self = $module($base, 'Asciidoctor');
21933
21958
 
@@ -21936,7 +21961,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21936
21961
  (function($base, $parent_nesting) {
21937
21962
  var self = $module($base, 'Helpers');
21938
21963
 
21939
- 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;
21964
+ 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;
21940
21965
 
21941
21966
 
21942
21967
  self.$module_function();
@@ -22165,15 +22190,24 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22165
22190
  return lines['$<<'](line.$chomp());}, $$15.$$s = self, $$15.$$arity = 1, $$15));}, $$14.$$s = self, $$14.$$arity = 1, $$14))
22166
22191
  };
22167
22192
  }, $Helpers_prepare_source_string$11.$$arity = -2);
22168
-
22169
- Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) {
22170
- var $a, self = this;
22193
+ if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
22194
+
22195
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) {
22196
+ var $a, $b, self = this;
22171
22197
 
22172
- return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
22173
- }, $Helpers_uriish$ques$16.$$arity = 1);
22198
+ return ($truthy($a = ($truthy($b = str['$include?'](":")) ? str['$start_with?']("uri:classloader:")['$!']() : $b)) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
22199
+ }, $Helpers_uriish$ques$16.$$arity = 1)
22200
+ } else {
22201
+
22202
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$17 = function(str) {
22203
+ var $a, self = this;
22204
+
22205
+ return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
22206
+ }, $Helpers_uriish$ques$17.$$arity = 1)
22207
+ };
22174
22208
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
22175
22209
 
22176
- Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$17 = function $$encode_uri_component(str) {
22210
+ Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$18 = function $$encode_uri_component(str) {
22177
22211
  var self = this;
22178
22212
 
22179
22213
 
@@ -22181,12 +22215,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22181
22215
  return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16)
22182
22216
  })
22183
22217
 
22184
- }, $Helpers_encode_uri_component$17.$$arity = 1)
22218
+ }, $Helpers_encode_uri_component$18.$$arity = 1)
22185
22219
  } else {
22186
22220
  nil
22187
22221
  };
22188
22222
 
22189
- Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$18 = function $$encode_spaces_in_uri(str) {
22223
+ Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$19 = function $$encode_spaces_in_uri(str) {
22190
22224
  var self = this;
22191
22225
 
22192
22226
  if ($truthy(str['$include?'](" "))) {
@@ -22195,9 +22229,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22195
22229
  } else {
22196
22230
  return str
22197
22231
  }
22198
- }, $Helpers_encode_spaces_in_uri$18.$$arity = 1);
22232
+ }, $Helpers_encode_spaces_in_uri$19.$$arity = 1);
22199
22233
 
22200
- Opal.def(self, '$rootname', $Helpers_rootname$19 = function $$rootname(filename) {
22234
+ Opal.def(self, '$rootname', $Helpers_rootname$20 = function $$rootname(filename) {
22201
22235
  var self = this, last_dot_idx = nil;
22202
22236
 
22203
22237
  if ($truthy((last_dot_idx = filename.$rindex(".")))) {
@@ -22210,9 +22244,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22210
22244
  } else {
22211
22245
  return filename
22212
22246
  }
22213
- }, $Helpers_rootname$19.$$arity = 1);
22247
+ }, $Helpers_rootname$20.$$arity = 1);
22214
22248
 
22215
- Opal.def(self, '$basename', $Helpers_basename$20 = function $$basename(filename, drop_ext) {
22249
+ Opal.def(self, '$basename', $Helpers_basename$21 = function $$basename(filename, drop_ext) {
22216
22250
  var self = this;
22217
22251
 
22218
22252
 
@@ -22230,16 +22264,16 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22230
22264
  } else {
22231
22265
  return $$$('::', 'File').$basename(filename)
22232
22266
  };
22233
- }, $Helpers_basename$20.$$arity = -2);
22267
+ }, $Helpers_basename$21.$$arity = -2);
22234
22268
 
22235
- Opal.def(self, '$extname?', $Helpers_extname$ques$21 = function(path) {
22269
+ Opal.def(self, '$extname?', $Helpers_extname$ques$22 = function(path) {
22236
22270
  var $a, self = this, last_dot_idx = nil;
22237
22271
 
22238
22272
  return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a)
22239
- }, $Helpers_extname$ques$21.$$arity = 1);
22273
+ }, $Helpers_extname$ques$22.$$arity = 1);
22240
22274
  if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) {
22241
22275
 
22242
- Opal.def(self, '$extname', $Helpers_extname$22 = function $$extname(path, fallback) {
22276
+ Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) {
22243
22277
  var $a, self = this, last_dot_idx = nil;
22244
22278
 
22245
22279
 
@@ -22257,10 +22291,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22257
22291
  } else {
22258
22292
  return fallback
22259
22293
  };
22260
- }, $Helpers_extname$22.$$arity = -2)
22294
+ }, $Helpers_extname$23.$$arity = -2)
22261
22295
  } else {
22262
22296
 
22263
- Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) {
22297
+ Opal.def(self, '$extname', $Helpers_extname$24 = function $$extname(path, fallback) {
22264
22298
  var self = this, last_dot_idx = nil;
22265
22299
 
22266
22300
 
@@ -22278,10 +22312,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22278
22312
  } else {
22279
22313
  return fallback
22280
22314
  };
22281
- }, $Helpers_extname$23.$$arity = -2)
22315
+ }, $Helpers_extname$24.$$arity = -2)
22282
22316
  };
22283
22317
 
22284
- Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$24 = function $$mkdir_p(dir) {
22318
+ Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$25 = function $$mkdir_p(dir) {
22285
22319
  var self = this, parent_dir = nil;
22286
22320
 
22287
22321
  if ($truthy($$$('::', 'File')['$directory?'](dir))) {
@@ -22307,14 +22341,14 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22307
22341
  } else { throw $err; }
22308
22342
  };;
22309
22343
  }
22310
- }, $Helpers_mkdir_p$24.$$arity = 1);
22344
+ }, $Helpers_mkdir_p$25.$$arity = 1);
22311
22345
  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}));
22312
22346
  self.$private_constant("ROMAN_NUMERALS");
22313
22347
 
22314
- Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$25 = function $$int_to_roman(val) {
22315
- var $$26, self = this;
22348
+ Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$26 = function $$int_to_roman(val) {
22349
+ var $$27, self = this;
22316
22350
 
22317
- return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$26 = function(l, i){var self = $$26.$$s || this, $a, $b, repeat = nil;
22351
+ return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$27 = function(l, i){var self = $$27.$$s || this, $a, $b, repeat = nil;
22318
22352
 
22319
22353
 
22320
22354
 
@@ -22326,10 +22360,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22326
22360
  i = nil;
22327
22361
  };
22328
22362
  $b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b;
22329
- return $rb_times(l, repeat);}, $$26.$$s = self, $$26.$$arity = 2, $$26)).$join()
22330
- }, $Helpers_int_to_roman$25.$$arity = 1);
22363
+ return $rb_times(l, repeat);}, $$27.$$s = self, $$27.$$arity = 2, $$27)).$join()
22364
+ }, $Helpers_int_to_roman$26.$$arity = 1);
22331
22365
 
22332
- Opal.def(self, '$nextval', $Helpers_nextval$27 = function $$nextval(current) {
22366
+ Opal.def(self, '$nextval', $Helpers_nextval$28 = function $$nextval(current) {
22333
22367
  var self = this, intval = nil;
22334
22368
 
22335
22369
  if ($truthy($$$('::', 'Integer')['$==='](current))) {
@@ -22339,9 +22373,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22339
22373
  } else {
22340
22374
  return current.$succ()
22341
22375
  }
22342
- }, $Helpers_nextval$27.$$arity = 1);
22376
+ }, $Helpers_nextval$28.$$arity = 1);
22343
22377
 
22344
- Opal.def(self, '$resolve_class', $Helpers_resolve_class$28 = function $$resolve_class(object) {
22378
+ Opal.def(self, '$resolve_class', $Helpers_resolve_class$29 = function $$resolve_class(object) {
22345
22379
  var self = this;
22346
22380
 
22347
22381
  if ($truthy($$$('::', 'Class')['$==='](object))) {
@@ -22355,9 +22389,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22355
22389
  return nil
22356
22390
  };
22357
22391
  }
22358
- }, $Helpers_resolve_class$28.$$arity = 1);
22392
+ }, $Helpers_resolve_class$29.$$arity = 1);
22359
22393
 
22360
- Opal.def(self, '$class_for_name', $Helpers_class_for_name$29 = function $$class_for_name(qualified_name) {
22394
+ Opal.def(self, '$class_for_name', $Helpers_class_for_name$30 = function $$class_for_name(qualified_name) {
22361
22395
  var self = this, resolved = nil;
22362
22396
 
22363
22397
  try {
@@ -22374,7 +22408,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
22374
22408
  } finally { Opal.pop_exception() }
22375
22409
  } else { throw $err; }
22376
22410
  }
22377
- }, $Helpers_class_for_name$29.$$arity = 1);
22411
+ }, $Helpers_class_for_name$30.$$arity = 1);
22378
22412
  })($nesting[0], $nesting)
22379
22413
  })($nesting[0], $nesting)
22380
22414
  };
@@ -22744,9 +22778,11 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
22744
22778
  self.$attr_reader("messages");
22745
22779
 
22746
22780
  Opal.def(self, '$initialize', $MemoryLogger_initialize$6 = function $$initialize() {
22747
- var self = this, $writer = nil;
22781
+ var $iter = $MemoryLogger_initialize$6.$$p, $yield = $iter || nil, self = this, $writer = nil;
22748
22782
 
22783
+ if ($iter) $MemoryLogger_initialize$6.$$p = null;
22749
22784
 
22785
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $MemoryLogger_initialize$6, false), [nil], null);
22750
22786
 
22751
22787
  $writer = [$$($nesting, 'WARN')];
22752
22788
  $send(self, 'level=', Opal.to_a($writer));
@@ -22814,12 +22850,15 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
22814
22850
  self.$attr_reader("max_severity");
22815
22851
 
22816
22852
  Opal.def(self, '$initialize', $NullLogger_initialize$12 = function $$initialize() {
22817
- var self = this, $writer = nil;
22853
+ var $iter = $NullLogger_initialize$12.$$p, $yield = $iter || nil, self = this, $writer = nil;
22818
22854
 
22855
+ if ($iter) $NullLogger_initialize$12.$$p = null;
22856
+
22857
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $NullLogger_initialize$12, false), [nil], null);
22819
22858
 
22820
22859
  $writer = [$$($nesting, 'WARN')];
22821
22860
  $send(self, 'level=', Opal.to_a($writer));
22822
- return $writer[$rb_minus($writer["length"], 1)];
22861
+ return $writer[$rb_minus($writer["length"], 1)];;
22823
22862
  }, $NullLogger_initialize$12.$$arity = 0);
22824
22863
  return (Opal.def(self, '$add', $NullLogger_add$13 = function $$add(severity, message, progname) {
22825
22864
  var $a, self = this;
@@ -22948,7 +22987,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
22948
22987
  Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
22949
22988
  Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22950
22989
  Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
22951
- Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22990
+ Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\s\\[](?:[^\\[]*[^\\s\\[])?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22952
22991
  Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
22953
22992
  Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
22954
22993
  Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]"));
@@ -23034,14 +23073,17 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
23034
23073
  Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
23035
23074
  Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
23036
23075
  Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
23037
- Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
23076
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
23077
+ 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,.?!\\[\\]<\\)])))"))
23078
+ } else {
23079
+ nil
23080
+ };
23038
23081
  Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
23039
23082
  Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
23040
23083
  Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
23041
23084
  Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
23042
23085
  Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""));
23043
- 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')]));
23044
- Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
23086
+ 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')]));
23045
23087
  Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
23046
23088
  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'));
23047
23089
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
@@ -23057,7 +23099,11 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
23057
23099
  Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
23058
23100
  Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
23059
23101
  Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
23060
- Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
23102
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
23103
+ Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"))
23104
+ } else {
23105
+ nil
23106
+ };
23061
23107
  Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
23062
23108
  })($nesting[0], $nesting)
23063
23109
  };
@@ -23081,7 +23127,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23081
23127
  }
23082
23128
  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;
23083
23129
 
23084
- 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']);
23130
+ 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']);
23085
23131
  return (function($base, $parent_nesting) {
23086
23132
  var self = $module($base, 'Asciidoctor');
23087
23133
 
@@ -23090,7 +23136,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23090
23136
  (function($base, $parent_nesting) {
23091
23137
  var self = $module($base, 'Substitutors');
23092
23138
 
23093
- 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;
23139
+ 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;
23094
23140
 
23095
23141
 
23096
23142
  Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
@@ -23586,7 +23632,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23586
23632
  ($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)]));
23587
23633
  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))};
23588
23634
  if ($truthy(($truthy($a = ($truthy($b = text['$include?']("((")) ? text['$include?']("))") : $b)) ? $a : ($truthy($b = found_macroish_short) ? text['$include?']("dexterm") : $b)))) {
23589
- 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;
23635
+ 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;
23590
23636
 
23591
23637
  return (function() {$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
23592
23638
  if ("indexterm"['$===']($case)) {
@@ -23595,8 +23641,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23595
23641
  if ($truthy((attrlist = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) {
23596
23642
  if ($truthy((primary = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) {
23597
23643
 
23644
+ terms = [primary];
23645
+ if ($truthy((secondary = attrs['$[]'](2)))) {
23646
+
23647
+ terms['$<<'](secondary);
23648
+ if ($truthy((tertiary = attrs['$[]'](3)))) {
23649
+ terms['$<<'](tertiary)};};
23598
23650
 
23599
- $writer = ["terms", [primary]];
23651
+ $writer = ["terms", terms];
23600
23652
  $send(attrs, '[]=', Opal.to_a($writer));
23601
23653
  $writer[$rb_minus($writer["length"], 1)];;
23602
23654
  if ($truthy((see_also = attrs['$[]']("see-also")))) {
@@ -23709,78 +23761,94 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23709
23761
  return subbed_term
23710
23762
  };}})()}, $$31.$$s = self, $$31.$$arity = 0, $$31))};
23711
23763
  if ($truthy(($truthy($a = found_colon) ? text['$include?']("://") : $a))) {
23712
- 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;
23764
+ 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;
23713
23765
 
23714
-
23715
- if ($truthy((target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))['$start_with?']($$($nesting, 'RS')))) {
23716
- return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + (target.$slice(1, target.$length())) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)));};
23717
- $c = [(($d = $gvars['~']) === nil ? nil : $d['$[]'](1)), ""], (prefix = $c[0]), (suffix = $c[1]), $c;
23718
- if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) {
23766
+ if ($truthy(($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2))) ? (($d = $gvars['~']) === nil ? nil : $d['$[]'](5))['$!']() : $c))) {
23719
23767
 
23720
- if (prefix['$==']("link:")) {
23721
- prefix = ""};
23722
- if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))['$empty?']())) {
23723
- link_text = nil};
23724
- } else {
23725
-
23726
- $case = prefix;
23727
- if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23728
- $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
23729
- if (")"['$===']($case) || "?"['$===']($case) || "!"['$===']($case)) {
23730
- target = target.$chop();
23731
- if ($truthy((($c = (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")) ? target['$end_with?'](".", "?", "!") : (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")))) {
23732
-
23733
- suffix = $rb_plus(target['$[]'](-1), suffix);
23734
- target = target.$chop();};
23735
- if ($truthy(target['$end_with?']("://"))) {
23736
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23737
- else if (";"['$===']($case)) {
23738
- if ($truthy(($truthy($c = prefix['$start_with?']("&lt;")) ? target['$end_with?']("&gt;") : $c))) {
23739
-
23740
- prefix = prefix.$slice(4, prefix.$length());
23741
- target = target.$slice(0, $rb_minus(target.$length(), 4));
23742
- } else if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23743
-
23744
- target = target.$chop();
23745
- suffix = ");";
23768
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$start_with?']($$($nesting, 'RS')))) {
23769
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());};
23770
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
23771
+ 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()));};
23772
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](6)))) {
23746
23773
  } else {
23747
- suffix = ";"
23774
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));
23748
23775
  };
23749
- if ($truthy(target['$end_with?']("://"))) {
23750
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23751
- else if (":"['$===']($case)) {
23752
- if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23776
+ doc.$register("links", (target = $rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](6)))));
23777
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23753
23778
 
23754
- target = target.$chop();
23755
- suffix = "):";
23779
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
23756
23780
  } else {
23757
- suffix = ":"
23758
- };
23759
- if ($truthy(target['$end_with?']("://"))) {
23760
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
23761
- };
23762
- $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c;
23763
- if ($truthy(link_text)) {
23781
+ return target
23782
+ }; return nil; })();
23783
+ return $$($nesting, 'Inline').$new(self, "anchor", link_text, $hash2(["type", "target", "attributes"], {"type": "link", "target": target, "attributes": $hash2(["role"], {"role": "bare"})})).$convert();
23784
+ } else {
23764
23785
 
23765
- if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
23766
- new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
23767
- if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
23768
-
23769
- $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;
23770
- new_link_text = link_text;
23786
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
23787
+ 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()));};
23788
+ $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;
23789
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
23771
23790
 
23772
- $writer = ["id", attrs['$[]']("id")];
23773
- $send(link_opts, '[]=', Opal.to_a($writer));
23774
- $writer[$rb_minus($writer["length"], 1)];;};
23775
- if ($truthy(link_text['$end_with?']("^"))) {
23791
+ if (prefix['$==']("link:")) {
23792
+ prefix = ""};
23793
+ if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))['$empty?']())) {
23794
+ link_text = nil};
23795
+ } else {
23776
23796
 
23777
- new_link_text = (link_text = link_text.$chop());
23778
- if ($truthy(attrs)) {
23779
- ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
23797
+ $case = prefix;
23798
+ if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23799
+ $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
23800
+ if (";"['$===']($case)) {
23801
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23802
+
23803
+ target = target.$chop();
23804
+ suffix = ");";
23780
23805
  } else {
23781
- attrs = $hash2(["window"], {"window": "_blank"})
23782
- };};
23783
- if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
23806
+ suffix = ";"
23807
+ };
23808
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23809
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23810
+ else if (":"['$===']($case)) {
23811
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23812
+
23813
+ target = target.$chop();
23814
+ suffix = "):";
23815
+ } else {
23816
+ suffix = ":"
23817
+ };
23818
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23819
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
23820
+ };
23821
+ link_opts = $hash2(["type"], {"type": "link"});
23822
+ if ($truthy(link_text)) {
23823
+
23824
+ if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
23825
+ new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
23826
+ if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
23827
+
23828
+ $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;
23829
+ new_link_text = link_text;
23830
+
23831
+ $writer = ["id", attrs['$[]']("id")];
23832
+ $send(link_opts, '[]=', Opal.to_a($writer));
23833
+ $writer[$rb_minus($writer["length"], 1)];;};
23834
+ if ($truthy(link_text['$end_with?']("^"))) {
23835
+
23836
+ new_link_text = (link_text = link_text.$chop());
23837
+ if ($truthy(attrs)) {
23838
+ ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
23839
+ } else {
23840
+ attrs = $hash2(["window"], {"window": "_blank"})
23841
+ };};
23842
+ if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
23843
+
23844
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23845
+
23846
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
23847
+ } else {
23848
+ return target
23849
+ }; return nil; })();
23850
+ bare = true;};
23851
+ } else {
23784
23852
 
23785
23853
  link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23786
23854
 
@@ -23788,37 +23856,29 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23788
23856
  } else {
23789
23857
  return target
23790
23858
  }; return nil; })();
23791
- bare = true;};
23792
- } else {
23793
-
23794
- link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23795
-
23796
- return target.$sub($$($nesting, 'UriSniffRx'), "");
23797
- } else {
23798
- return target
23799
- }; return nil; })();
23800
- bare = true;
23801
- };
23802
- if ($truthy(bare)) {
23859
+ bare = true;
23860
+ };
23861
+ if ($truthy(bare)) {
23862
+ if ($truthy(attrs)) {
23863
+
23864
+ $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
23865
+ return "" + "bare " + (attrs['$[]']("role"))
23866
+ } else {
23867
+ return "bare"
23868
+ }; return nil; })()];
23869
+ $send(attrs, '[]=', Opal.to_a($writer));
23870
+ $writer[$rb_minus($writer["length"], 1)];
23871
+ } else {
23872
+ attrs = $hash2(["role"], {"role": "bare"})
23873
+ }};
23874
+ doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
23803
23875
  if ($truthy(attrs)) {
23804
23876
 
23805
- $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
23806
- return "" + "bare " + (attrs['$[]']("role"))
23807
- } else {
23808
- return "bare"
23809
- }; return nil; })()];
23810
- $send(attrs, '[]=', Opal.to_a($writer));
23811
- $writer[$rb_minus($writer["length"], 1)];
23812
- } else {
23813
- attrs = $hash2(["role"], {"role": "bare"})
23814
- }};
23815
- doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
23816
- if ($truthy(attrs)) {
23817
-
23818
- $writer = ["attributes", attrs];
23819
- $send(link_opts, '[]=', Opal.to_a($writer));
23820
- $writer[$rb_minus($writer["length"], 1)];};
23821
- return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
23877
+ $writer = ["attributes", attrs];
23878
+ $send(link_opts, '[]=', Opal.to_a($writer));
23879
+ $writer[$rb_minus($writer["length"], 1)];};
23880
+ return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);
23881
+ }}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
23822
23882
  if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("link:")) ? $b : text['$include?']("ilto:")) : $a))) {
23823
23883
  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;
23824
23884
 
@@ -23956,7 +24016,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23956
24016
  };
23957
24017
  if ($truthy(doc.$compat_mode())) {
23958
24018
  fragment = refid
23959
- } else if ($truthy((hash_idx = refid.$index("#")))) {
24019
+ } else if ($truthy(($truthy($c = (hash_idx = refid.$index("#"))) ? refid['$[]']($rb_minus(hash_idx, 1))['$!=']("&") : $c))) {
23960
24020
  if ($truthy($rb_gt(hash_idx, 0))) {
23961
24021
 
23962
24022
  if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
@@ -24307,13 +24367,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24307
24367
  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);
24308
24368
  } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) {
24309
24369
  preceding = "" + "[" + (attrlist) + "]"
24310
- } else {
24311
-
24312
- if ($truthy((($c = boundary['$==']("++")) ? attrlist['$end_with?']("x-") : boundary['$==']("++")))) {
24370
+ } else if (boundary['$==']("++")) {
24371
+ if (attrlist['$==']("x-")) {
24313
24372
 
24314
24373
  old_behavior = true;
24315
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));};
24316
- attributes = self.$parse_quoted_text_attributes(attrlist);
24374
+ attributes = $hash2([], {});
24375
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
24376
+
24377
+ old_behavior = true;
24378
+ attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
24379
+ } else {
24380
+ attributes = self.$parse_quoted_text_attributes(attrlist)
24381
+ }
24382
+ } else {
24383
+ attributes = self.$parse_quoted_text_attributes(attrlist)
24317
24384
  }
24318
24385
  } else if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) {
24319
24386
  return "" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);};
@@ -24359,33 +24426,42 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24359
24426
  return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
24360
24427
  $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;
24361
24428
  if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) {
24362
- 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;
24429
+ 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;
24363
24430
 
24364
24431
 
24365
24432
  preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
24366
- attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2));
24367
- if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$($nesting, 'RS')))) {
24368
- escape_mark = $$($nesting, 'RS')};
24369
- format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
24370
- content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5));
24433
+ attrlist = ($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](4))) ? $c : (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)));
24434
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
24435
+ escaped = true};
24436
+ quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
24437
+ format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
24438
+ content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
24371
24439
  if ($truthy(compat_mode)) {
24372
24440
  old_behavior = true
24373
- } else if ($truthy((old_behavior = ($truthy($c = attrlist) ? attrlist['$end_with?']("x-") : $c)))) {
24374
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))};
24441
+ } else if ($truthy(($truthy($c = attrlist) ? ($truthy($d = attrlist['$==']("x-")) ? $d : attrlist['$end_with?'](" x-")) : $c))) {
24442
+ old_behavior = (old_behavior_forced = true)};
24375
24443
  if ($truthy(attrlist)) {
24376
- if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) {
24377
- return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark));
24378
- } else if ($truthy(escape_mark)) {
24444
+ if ($truthy(escaped)) {
24379
24445
  return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()));
24380
24446
  } else if (preceding['$==']($$($nesting, 'RS'))) {
24381
- preceding = "" + "[" + (attrlist) + "]"
24447
+
24448
+ if ($truthy(($truthy($c = old_behavior_forced) ? format_mark['$==']("`") : $c))) {
24449
+ return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text);};
24450
+ preceding = "" + "[" + (attrlist) + "]";
24451
+ } else if ($truthy(old_behavior_forced)) {
24452
+ attributes = (function() {if (attrlist['$==']("x-")) {
24453
+ return $hash2([], {})
24454
+ } else {
24455
+
24456
+ return self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
24457
+ }; return nil; })()
24382
24458
  } else {
24383
24459
  attributes = self.$parse_quoted_text_attributes(attrlist)
24384
24460
  }
24385
- } else if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) {
24386
- return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark));
24387
- } else if ($truthy(escape_mark)) {
24388
- return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));};
24461
+ } else if ($truthy(escaped)) {
24462
+ return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));
24463
+ } else if ($truthy(($truthy($c = compat_mode) ? preceding['$==']($$($nesting, 'RS')) : $c))) {
24464
+ return quoted_text;};
24389
24465
  if ($truthy(compat_mode)) {
24390
24466
 
24391
24467
  $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "monospaced"})];
@@ -24819,27 +24895,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24819
24895
  };}, $$71.$$s = self, $$71.$$arity = 1, $$71)).$join($$($nesting, 'LF')));
24820
24896
  }, $Substitutors_restore_callouts$70.$$arity = -3);
24821
24897
 
24822
- Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$73 = function $$extract_inner_passthrough(text, pre) {
24823
- var $a, $b, self = this, $writer = nil, passthru_key = nil;
24824
- if (self.passthroughs == null) self.passthroughs = nil;
24825
-
24826
- if ($truthy(($truthy($a = ($truthy($b = text['$end_with?']("+")) ? text['$start_with?']("+", "\\+") : $b)) ? $$($nesting, 'SinglePlusInlinePassRx')['$=~'](text) : $a))) {
24827
- if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) {
24828
- return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`"
24829
- } else {
24830
-
24831
-
24832
- $writer = [(passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$($nesting, 'BASIC_SUBS')})];
24833
- $send(self.passthroughs, '[]=', Opal.to_a($writer));
24834
- $writer[$rb_minus($writer["length"], 1)];;
24835
- return "" + (pre) + "`" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END')) + "`";
24836
- }
24837
- } else {
24838
- return "" + (pre) + "`" + (text) + "`"
24839
- }
24840
- }, $Substitutors_extract_inner_passthrough$73.$$arity = 2);
24841
-
24842
- Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$74 = function $$convert_quoted_text(match, type, scope) {
24898
+ Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
24843
24899
  var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
24844
24900
 
24845
24901
 
@@ -24870,9 +24926,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24870
24926
  type = "unquoted"};};
24871
24927
  return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
24872
24928
  };
24873
- }, $Substitutors_convert_quoted_text$74.$$arity = 3);
24929
+ }, $Substitutors_convert_quoted_text$73.$$arity = 3);
24874
24930
 
24875
- Opal.def(self, '$do_replacement', $Substitutors_do_replacement$75 = function $$do_replacement(m, replacement, restore) {
24931
+ Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
24876
24932
  var self = this, captured = nil, $case = nil;
24877
24933
 
24878
24934
  if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
@@ -24883,13 +24939,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24883
24939
  else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
24884
24940
  else {return $rb_plus(m['$[]'](1), replacement)}})()
24885
24941
  }
24886
- }, $Substitutors_do_replacement$75.$$arity = 3);
24942
+ }, $Substitutors_do_replacement$74.$$arity = 3);
24887
24943
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
24888
24944
  } else {
24889
24945
  nil
24890
24946
  };
24891
24947
 
24892
- Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$76 = function $$parse_quoted_text_attributes(str) {
24948
+ Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
24893
24949
  var $a, $b, self = this, before = nil, _ = nil, after = nil, attrs = nil, $writer = nil, id = nil, roles = nil;
24894
24950
 
24895
24951
 
@@ -24941,9 +24997,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24941
24997
  } else {
24942
24998
  return $hash2(["role"], {"role": str})
24943
24999
  };
24944
- }, $Substitutors_parse_quoted_text_attributes$76.$$arity = 1);
25000
+ }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
24945
25001
 
24946
- Opal.def(self, '$normalize_text', $Substitutors_normalize_text$77 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
25002
+ Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24947
25003
  var $a, self = this;
24948
25004
 
24949
25005
 
@@ -24964,10 +25020,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24964
25020
  text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
24965
25021
  };
24966
25022
  return text;
24967
- }, $Substitutors_normalize_text$77.$$arity = -2);
25023
+ }, $Substitutors_normalize_text$76.$$arity = -2);
24968
25024
 
24969
- Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$78 = function $$split_simple_csv(str) {
24970
- var $$79, $$80, self = this, values = nil, accum = nil, quote_open = nil;
25025
+ Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
25026
+ var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
24971
25027
 
24972
25028
  if ($truthy(str['$empty?']())) {
24973
25029
  return []
@@ -24976,7 +25032,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24976
25032
  values = [];
24977
25033
  accum = "";
24978
25034
  quote_open = nil;
24979
- $send(str, 'each_char', [], ($$79 = function(c){var self = $$79.$$s || this, $case = nil;
25035
+ $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
24980
25036
 
24981
25037
 
24982
25038
 
@@ -24992,19 +25048,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24992
25048
  return (accum = "");
24993
25049
  }}
24994
25050
  else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
24995
- else {return (accum = $rb_plus(accum, c))}})();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
25051
+ else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
24996
25052
  return values['$<<'](accum.$strip());
24997
25053
  } else {
24998
- return $send(str.$split(","), 'map', [], ($$80 = function(it){var self = $$80.$$s || this;
25054
+ return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
24999
25055
 
25000
25056
 
25001
25057
 
25002
25058
  if (it == null) {
25003
25059
  it = nil;
25004
25060
  };
25005
- return it.$strip();}, $$80.$$s = self, $$80.$$arity = 1, $$80))
25061
+ return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
25006
25062
  }
25007
- }, $Substitutors_split_simple_csv$78.$$arity = 1);
25063
+ }, $Substitutors_split_simple_csv$77.$$arity = 1);
25008
25064
  })($nesting[0], $nesting)
25009
25065
  })($nesting[0], $nesting)
25010
25066
  };
@@ -25018,7 +25074,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
25018
25074
 
25019
25075
  var $nesting = [self].concat($parent_nesting);
25020
25076
 
25021
- Opal.const_set($nesting[0], 'VERSION', "2.0.17")
25077
+ Opal.const_set($nesting[0], 'VERSION', "2.0.23")
25022
25078
  })($nesting[0], $nesting)
25023
25079
  };
25024
25080
 
@@ -25032,7 +25088,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25032
25088
  }
25033
25089
  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;
25034
25090
 
25035
- 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']);
25091
+ 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']);
25036
25092
  return (function($base, $parent_nesting) {
25037
25093
  var self = $module($base, 'Asciidoctor');
25038
25094
 
@@ -25437,7 +25493,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25437
25493
  image_path = self.$normalize_system_path(target_image)
25438
25494
  };
25439
25495
  if ($truthy($$$('::', 'File')['$readable?'](image_path))) {
25440
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64($$$('::', 'File').$binread(image_path)))
25496
+ return "" + "data:" + (mimetype) + ";base64," + ([$$$('::', 'File').$binread(image_path)].$pack("m0"))
25441
25497
  } else {
25442
25498
 
25443
25499
  self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
@@ -25468,7 +25524,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25468
25524
  f = nil;
25469
25525
  };
25470
25526
  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;
25471
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata));
25527
+ return "" + "data:" + (mimetype) + ";base64," + ([bindata].$pack("m0"));
25472
25528
  } catch ($err) {
25473
25529
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
25474
25530
  try {
@@ -26596,7 +26652,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
26596
26652
  else if ("verbatim"['$===']($case) || "raw"['$===']($case)) {
26597
26653
  result = self.$apply_subs(self.lines, self.subs);
26598
26654
  if ($truthy($rb_lt(result.$size(), 2))) {
26599
- return result['$[]'](0)
26655
+ return ($truthy($a = result['$[]'](0)) ? $a : "")
26600
26656
  } else {
26601
26657
 
26602
26658
  while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) {
@@ -26610,7 +26666,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
26610
26666
  else {
26611
26667
  if (self.content_model['$==']("empty")) {
26612
26668
  } else {
26613
- self.$logger().$warn("" + "Unknown content model '" + (self.content_model) + "' for block: " + (self))
26669
+ self.$logger().$warn("" + "unknown content model '" + (self.content_model) + "' for block: " + (self))
26614
26670
  };
26615
26671
  return nil;}})()
26616
26672
  }, $Block_content$2.$$arity = 0);
@@ -27452,6 +27508,11 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27452
27508
  $writer = ["catalog_assets", true];
27453
27509
  $send(options, '[]=', Opal.to_a($writer));
27454
27510
  $writer[$rb_minus($writer["length"], 1)];};
27511
+ if ($truthy(parent_doc.$options()['$[]']("to_dir"))) {
27512
+
27513
+ $writer = ["to_dir", parent_doc.$options()['$[]']("to_dir")];
27514
+ $send(options, '[]=', Opal.to_a($writer));
27515
+ $writer[$rb_minus($writer["length"], 1)];};
27455
27516
  self.catalog = parent_doc.$catalog().$merge($hash2(["footnotes"], {"footnotes": []}));
27456
27517
  self.attribute_overrides = (attr_overrides = parent_doc.$instance_variable_get("@attribute_overrides").$merge(parent_doc.$attributes()));
27457
27518
  attr_overrides.$delete("compat-mode");
@@ -29271,7 +29332,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29271
29332
  }
29272
29333
  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;
29273
29334
 
29274
- 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', '$%']);
29335
+ 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', '$%']);
29275
29336
  return (function($base, $parent_nesting) {
29276
29337
  var self = $module($base, 'Asciidoctor');
29277
29338
 
@@ -29313,6 +29374,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29313
29374
  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)));
29314
29375
  Opal.const_set($nesting[0], 'NoOp', nil);
29315
29376
  Opal.const_set($nesting[0], 'AuthorKeys', ["author", "authorinitials", "firstname", "middlename", "lastname", "email"]);
29377
+ Opal.const_set($nesting[0], 'ListContinuationMarker', $$$('::', 'Module').$new());
29378
+ Opal.const_set($nesting[0], 'ListContinuationPlaceholder', $$$('::', 'String').$new().$extend($$($nesting, 'ListContinuationMarker')));
29379
+ Opal.const_set($nesting[0], 'ListContinuationString', $$$('::', 'String').$new($$($nesting, 'LIST_CONTINUATION')).$extend($$($nesting, 'ListContinuationMarker')));
29316
29380
  Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"}));
29317
29381
  Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"}));
29318
29382
  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"}));
@@ -29715,16 +29779,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29715
29779
  if ($truthy(part)) {
29716
29780
  if ($truthy(section['$blocks?']()['$!']())) {
29717
29781
  if ($truthy(new_block.$style()['$!=']("partintro"))) {
29718
- if (new_block.$context()['$==']("paragraph")) {
29719
-
29720
-
29721
- $writer = ["open"];
29722
- $send(new_block, 'context=', Opal.to_a($writer));
29723
- $writer[$rb_minus($writer["length"], 1)];;
29782
+ if ($truthy((($b = new_block.$style()['$==']("open")) ? new_block.$context()['$==']("open") : new_block.$style()['$==']("open")))) {
29724
29783
 
29725
29784
  $writer = ["partintro"];
29726
29785
  $send(new_block, 'style=', Opal.to_a($writer));
29727
- $writer[$rb_minus($writer["length"], 1)];;
29786
+ $writer[$rb_minus($writer["length"], 1)];
29728
29787
  } else {
29729
29788
 
29730
29789
 
@@ -29736,7 +29795,16 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29736
29795
  $send(intro, 'style=', Opal.to_a($writer));
29737
29796
  $writer[$rb_minus($writer["length"], 1)];;
29738
29797
  section.$blocks()['$<<'](intro);
29739
- }}
29798
+ }
29799
+ } else if (new_block.$content_model()['$==']("simple")) {
29800
+
29801
+
29802
+ $writer = ["compound"];
29803
+ $send(new_block, 'content_model=', Opal.to_a($writer));
29804
+ $writer[$rb_minus($writer["length"], 1)];;
29805
+ new_block['$<<']($$($nesting, 'Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
29806
+ new_block.$lines().$clear();
29807
+ new_block.$subs().$clear();}
29740
29808
  } else if (section.$blocks().$size()['$=='](1)) {
29741
29809
 
29742
29810
  first_block = section.$blocks()['$[]'](0);
@@ -29748,12 +29816,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29748
29816
  $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))];
29749
29817
  $send(new_block, 'parent=', Opal.to_a($writer));
29750
29818
  $writer[$rb_minus($writer["length"], 1)];;
29751
-
29752
- $writer = ["partintro"];
29753
- $send(intro, 'style=', Opal.to_a($writer));
29754
- $writer[$rb_minus($writer["length"], 1)];;
29755
- section.$blocks().$shift();
29756
- if (first_block.$style()['$==']("partintro")) {
29819
+ if (first_block.$style()['$==']((($writer = ["partintro"]), $send(intro, 'style=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) {
29757
29820
 
29758
29821
 
29759
29822
  $writer = ["paragraph"];
@@ -29763,6 +29826,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29763
29826
  $writer = [nil];
29764
29827
  $send(first_block, 'style=', Opal.to_a($writer));
29765
29828
  $writer[$rb_minus($writer["length"], 1)];;};
29829
+ section.$blocks().$shift();
29766
29830
  intro['$<<'](first_block);
29767
29831
  section.$blocks()['$<<'](intro);};}};
29768
29832
  ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block);
@@ -29865,6 +29929,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29865
29929
  if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) {
29866
29930
 
29867
29931
  block_context = style.$to_sym();
29932
+ cloaked_context = "paragraph";
29868
29933
  reader.$unshift_line(this_line);
29869
29934
  break;;};
29870
29935
  if ($truthy(text_only)) {
@@ -30231,7 +30296,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30231
30296
  } else {
30232
30297
  $case = block_context;
30233
30298
  if ("listing"['$===']($case) || "source"['$===']($case)) {
30234
- if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : ($truthy($b = attributes['$[]'](1)['$!']()) ? (language = ($truthy($c = attributes['$[]'](2)) ? $c : doc_attrs['$[]']("source-language"))) : $b)))) {
30299
+ if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : (language = (function() {if ($truthy(attributes['$[]'](1))) {
30300
+ return nil
30301
+ } else {
30302
+ return ($truthy($b = attributes['$[]'](2)) ? $b : doc_attrs['$[]']("source-language"))
30303
+ }; return nil; })())))) {
30235
30304
 
30236
30305
  if ($truthy(language)) {
30237
30306
 
@@ -30253,6 +30322,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30253
30322
  $writer = ["language", doc_attrs['$[]']("source-language")];
30254
30323
  $send(attributes, '[]=', Opal.to_a($writer));
30255
30324
  $writer[$rb_minus($writer["length"], 1)];};
30325
+ if (cloaked_context['$==']("listing")) {
30326
+ } else {
30327
+
30328
+ $writer = ["cloaked-context", cloaked_context];
30329
+ $send(attributes, '[]=', Opal.to_a($writer));
30330
+ $writer[$rb_minus($writer["length"], 1)];
30331
+ };
30256
30332
  };
30257
30333
  if ($truthy(attributes['$key?']("linenums"))) {
30258
30334
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
@@ -30302,6 +30378,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30302
30378
  $send(attributes, '[]=', Opal.to_a($writer));
30303
30379
  $writer[$rb_minus($writer["length"], 1)];
30304
30380
  };
30381
+
30382
+ $writer = ["cloaked-context", cloaked_context];
30383
+ $send(attributes, '[]=', Opal.to_a($writer));
30384
+ $writer[$rb_minus($writer["length"], 1)];;
30305
30385
  if ($truthy(attributes['$key?']("linenums"))) {
30306
30386
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
30307
30387
 
@@ -30696,8 +30776,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30696
30776
  reftext = reftext.$gsub("\\]", "]");
30697
30777
  if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30698
30778
  reftext = document.$sub_attributes(reftext)};
30699
- } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
30700
- return nil;}};
30779
+ } else if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30780
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
30781
+ reftext = nil}}};
30701
30782
  };
30702
30783
  if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
30703
30784
  return nil
@@ -30921,7 +31002,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30921
31002
  };
30922
31003
  }, $Parser_parse_list_item$27.$$arity = -5);
30923
31004
  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) {
30924
- 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;
31005
+ 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;
30925
31006
 
30926
31007
 
30927
31008
 
@@ -30942,12 +31023,14 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30942
31023
  this_line = reader.$read_line();
30943
31024
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
30944
31025
  break;};
31026
+ if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31027
+ this_line = $$($nesting, 'ListContinuationString')};
30945
31028
  prev_line = (function() {if ($truthy(buffer['$empty?']())) {
30946
31029
  return nil
30947
31030
  } else {
30948
31031
  return buffer['$[]'](-1)
30949
31032
  }; return nil; })();
30950
- if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31033
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](prev_line))) {
30951
31034
 
30952
31035
  if (continuation['$==']("inactive")) {
30953
31036
 
@@ -30956,11 +31039,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30956
31039
  if ($truthy(within_nested_list)) {
30957
31040
  } else {
30958
31041
 
30959
- $writer = [-1, ""];
31042
+ $writer = [-1, $$($nesting, 'ListContinuationPlaceholder')];
30960
31043
  $send(buffer, '[]=', Opal.to_a($writer));
30961
31044
  $writer[$rb_minus($writer["length"], 1)];
30962
31045
  };};
30963
- if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31046
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
30964
31047
 
30965
31048
  if ($truthy(continuation['$!=']("frozen"))) {
30966
31049
 
@@ -30969,16 +31052,37 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30969
31052
  this_line = nil;
30970
31053
  continue;;};};
30971
31054
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
31055
+
30972
31056
  if (continuation['$==']("active")) {
30973
-
30974
- buffer['$<<'](this_line);
30975
- buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
30976
- continuation = "inactive";
30977
31057
  } else {
30978
31058
  break;
30979
- }
30980
- } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
30981
- break;
31059
+ };
31060
+ buffer['$<<'](this_line);
31061
+ buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
31062
+ continuation = "inactive";
31063
+ } else if ($truthy(($truthy($b = ($truthy($c = ($truthy($d = dlist) ? continuation['$!=']("active") : $d)) ? this_line['$start_with?']("[") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
31064
+
31065
+ block_attribute_lines = [this_line];
31066
+ while ($truthy((next_line = reader.$peek_line()))) {
31067
+
31068
+ if ($truthy(self['$is_delimited_block?'](next_line))) {
31069
+ interrupt = true
31070
+ } else if ($truthy(($truthy($c = next_line['$empty?']()) ? $c : ($truthy($d = next_line['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](next_line) : $d)))) {
31071
+
31072
+ block_attribute_lines['$<<'](reader.$read_line());
31073
+ continue;;
31074
+ } else if ($truthy(($truthy($c = $$($nesting, 'AnyListRx')['$match?'](next_line)) ? self['$is_sibling_list_item?'](next_line, list_type, sibling_trait)['$!']() : $c))) {
31075
+ buffer.$concat(block_attribute_lines)
31076
+ } else {
31077
+ interrupt = true
31078
+ };
31079
+ break;;
31080
+ };
31081
+ if ($truthy(interrupt)) {
31082
+
31083
+ this_line = nil;
31084
+ reader.$unshift_lines(block_attribute_lines);
31085
+ break;;};
30982
31086
  } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) {
30983
31087
  if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) {
30984
31088
 
@@ -30996,7 +31100,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30996
31100
  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})))
30997
31101
  };
30998
31102
  continuation = "inactive";
30999
- } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'BlockTitleRx')['$match?'](this_line)) ? $c : $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line))) ? $b : $$($nesting, 'AttributeEntryRx')['$match?'](this_line)))) {
31103
+ } 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['$=='](":"))))) {
31000
31104
  buffer['$<<'](this_line)
31001
31105
  } else {
31002
31106
 
@@ -31011,7 +31115,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31011
31115
  if (ctx == null) {
31012
31116
  ctx = nil;
31013
31117
  };
31014
- return $$($nesting, 'ListRxMap')['$[]'](ctx)['$match?'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
31118
+ return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
31015
31119
 
31016
31120
  within_nested_list = true;
31017
31121
  if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) {
@@ -31032,7 +31136,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31032
31136
  if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31033
31137
 
31034
31138
  detached_continuation = buffer.$size();
31035
- buffer['$<<'](this_line);
31139
+ buffer['$<<']($$($nesting, 'ListContinuationString'));
31036
31140
  } else if ($truthy(has_text)) {
31037
31141
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
31038
31142
  break;
@@ -31076,6 +31180,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31076
31180
  buffer['$<<'](this_line);
31077
31181
  has_text = true;
31078
31182
  };
31183
+ } else if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
31184
+
31185
+ has_text = true;
31186
+ buffer['$<<'](this_line);
31079
31187
  } else {
31080
31188
 
31081
31189
  if ($truthy(this_line['$empty?']())) {
@@ -31106,17 +31214,18 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31106
31214
  reader.$unshift_line(this_line)};
31107
31215
  if ($truthy(detached_continuation)) {
31108
31216
 
31109
- $writer = [detached_continuation, ""];
31217
+ $writer = [detached_continuation, $$($nesting, 'ListContinuationPlaceholder')];
31110
31218
  $send(buffer, '[]=', Opal.to_a($writer));
31111
31219
  $writer[$rb_minus($writer["length"], 1)];};
31112
31220
  while (!($truthy(buffer['$empty?']()))) {
31113
- if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
31114
- buffer.$pop()
31115
- } else {
31221
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$===']((last_line = buffer['$[]'](-1))))) {
31116
31222
 
31117
- if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31118
- buffer.$pop()};
31223
+ buffer.$pop();
31119
31224
  break;;
31225
+ } else if ($truthy(last_line['$empty?']())) {
31226
+ buffer.$pop()
31227
+ } else {
31228
+ break;
31120
31229
  }
31121
31230
  };
31122
31231
  return buffer;
@@ -32115,6 +32224,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
32115
32224
  }
32116
32225
  };
32117
32226
  };
32227
+ parser_ctx.$close_table();
32118
32228
  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))) {
32119
32229
  } else {
32120
32230
  table.$assign_column_widths()
@@ -32603,7 +32713,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32603
32713
  (function($base, $super, $parent_nesting) {
32604
32714
  var self = $klass($base, $super, 'PathResolver');
32605
32715
 
32606
- 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;
32716
+ 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;
32607
32717
 
32608
32718
  self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
32609
32719
 
@@ -32614,6 +32724,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32614
32724
  Opal.const_set($nesting[0], 'SLASH', "/");
32615
32725
  Opal.const_set($nesting[0], 'BACKSLASH', "\\");
32616
32726
  Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//");
32727
+ Opal.const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
32617
32728
  Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
32618
32729
  self.$attr_accessor("file_separator");
32619
32730
  self.$attr_accessor("working_dir");
@@ -32659,23 +32770,30 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32659
32770
 
32660
32771
  return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://"))
32661
32772
  }, $PathResolver_root$ques$3.$$arity = 1)
32773
+ } else if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
32774
+
32775
+ Opal.def(self, '$root?', $PathResolver_root$ques$4 = function(path) {
32776
+ var $a, self = this;
32777
+
32778
+ return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))
32779
+ }, $PathResolver_root$ques$4.$$arity = 1)
32662
32780
  } else {
32663
32781
  Opal.alias(self, "root?", "absolute_path?")
32664
32782
  };
32665
32783
 
32666
- Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) {
32784
+ Opal.def(self, '$unc?', $PathResolver_unc$ques$5 = function(path) {
32667
32785
  var self = this;
32668
32786
 
32669
32787
  return path['$start_with?']($$($nesting, 'DOUBLE_SLASH'))
32670
- }, $PathResolver_unc$ques$4.$$arity = 1);
32788
+ }, $PathResolver_unc$ques$5.$$arity = 1);
32671
32789
 
32672
- Opal.def(self, '$web_root?', $PathResolver_web_root$ques$5 = function(path) {
32790
+ Opal.def(self, '$web_root?', $PathResolver_web_root$ques$6 = function(path) {
32673
32791
  var self = this;
32674
32792
 
32675
32793
  return path['$start_with?']($$($nesting, 'SLASH'))
32676
- }, $PathResolver_web_root$ques$5.$$arity = 1);
32794
+ }, $PathResolver_web_root$ques$6.$$arity = 1);
32677
32795
 
32678
- Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$6 = function(path, base) {
32796
+ Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$7 = function(path, base) {
32679
32797
  var $a, self = this;
32680
32798
 
32681
32799
  if (base['$=='](path)) {
@@ -32685,9 +32803,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32685
32803
  } else {
32686
32804
  return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a)
32687
32805
  }
32688
- }, $PathResolver_descends_from$ques$6.$$arity = 2);
32806
+ }, $PathResolver_descends_from$ques$7.$$arity = 2);
32689
32807
 
32690
- Opal.def(self, '$relative_path', $PathResolver_relative_path$7 = function $$relative_path(path, base) {
32808
+ Opal.def(self, '$relative_path', $PathResolver_relative_path$8 = function $$relative_path(path, base) {
32691
32809
  var self = this, offset = nil;
32692
32810
 
32693
32811
  if ($truthy(self['$root?'](path))) {
@@ -32708,9 +32826,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32708
32826
  } else {
32709
32827
  return path
32710
32828
  }
32711
- }, $PathResolver_relative_path$7.$$arity = 2);
32829
+ }, $PathResolver_relative_path$8.$$arity = 2);
32712
32830
 
32713
- Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) {
32831
+ Opal.def(self, '$posixify', $PathResolver_posixify$9 = function $$posixify(path) {
32714
32832
  var $a, self = this;
32715
32833
 
32716
32834
  if ($truthy(path)) {
@@ -32723,18 +32841,18 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32723
32841
  } else {
32724
32842
  return ""
32725
32843
  }
32726
- }, $PathResolver_posixify$8.$$arity = 1);
32844
+ }, $PathResolver_posixify$9.$$arity = 1);
32727
32845
  Opal.alias(self, "posixfy", "posixify");
32728
32846
 
32729
- Opal.def(self, '$expand_path', $PathResolver_expand_path$9 = function $$expand_path(path) {
32730
- var $a, $b, $$10, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
32847
+ Opal.def(self, '$expand_path', $PathResolver_expand_path$10 = function $$expand_path(path) {
32848
+ var $a, $b, $$11, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
32731
32849
 
32732
32850
 
32733
32851
  $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;
32734
32852
  if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) {
32735
32853
 
32736
32854
  resolved_segments = [];
32737
- $send(path_segments, 'each', [], ($$10 = function(segment){var self = $$10.$$s || this;
32855
+ $send(path_segments, 'each', [], ($$11 = function(segment){var self = $$11.$$s || this;
32738
32856
 
32739
32857
 
32740
32858
 
@@ -32745,14 +32863,14 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32745
32863
  return resolved_segments.$pop()
32746
32864
  } else {
32747
32865
  return resolved_segments['$<<'](segment)
32748
- };}, $$10.$$s = self, $$10.$$arity = 1, $$10));
32866
+ };}, $$11.$$s = self, $$11.$$arity = 1, $$11));
32749
32867
  return self.$join_path(resolved_segments, path_root);
32750
32868
  } else {
32751
32869
  return self.$join_path(path_segments, path_root)
32752
32870
  };
32753
- }, $PathResolver_expand_path$9.$$arity = 1);
32871
+ }, $PathResolver_expand_path$10.$$arity = 1);
32754
32872
 
32755
- Opal.def(self, '$partition_path', $PathResolver_partition_path$11 = function $$partition_path(path, web) {
32873
+ Opal.def(self, '$partition_path', $PathResolver_partition_path$12 = function $$partition_path(path, web) {
32756
32874
  var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil;
32757
32875
 
32758
32876
 
@@ -32777,6 +32895,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32777
32895
  root = $$($nesting, 'DOUBLE_SLASH')
32778
32896
  } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) {
32779
32897
  root = $$($nesting, 'SLASH')
32898
+ } else if ($truthy(posix_path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))) {
32899
+ root = posix_path.$slice(0, $$($nesting, 'URI_CLASSLOADER').$length())
32780
32900
  } else {
32781
32901
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1))
32782
32902
  }
@@ -32793,9 +32913,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32793
32913
  $writer = [path, [path_segments, root]];
32794
32914
  $send(cache, '[]=', Opal.to_a($writer));
32795
32915
  return $writer[$rb_minus($writer["length"], 1)];;
32796
- }, $PathResolver_partition_path$11.$$arity = -2);
32916
+ }, $PathResolver_partition_path$12.$$arity = -2);
32797
32917
 
32798
- Opal.def(self, '$join_path', $PathResolver_join_path$12 = function $$join_path(segments, root) {
32918
+ Opal.def(self, '$join_path', $PathResolver_join_path$13 = function $$join_path(segments, root) {
32799
32919
  var self = this;
32800
32920
 
32801
32921
 
@@ -32809,10 +32929,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32809
32929
 
32810
32930
  return segments.$join($$($nesting, 'SLASH'));
32811
32931
  };
32812
- }, $PathResolver_join_path$12.$$arity = -2);
32932
+ }, $PathResolver_join_path$13.$$arity = -2);
32813
32933
 
32814
- Opal.def(self, '$system_path', $PathResolver_system_path$13 = function $$system_path(target, start, jail, opts) {
32815
- 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;
32934
+ Opal.def(self, '$system_path', $PathResolver_system_path$14 = function $$system_path(target, start, jail, opts) {
32935
+ 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;
32816
32936
 
32817
32937
 
32818
32938
 
@@ -32903,7 +33023,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32903
33023
  $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
32904
33024
  };
32905
33025
  warned = false;
32906
- $send(unresolved_segments, 'each', [], ($$14 = function(segment){var self = $$14.$$s || this, $c;
33026
+ $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this, $c;
32907
33027
 
32908
33028
 
32909
33029
 
@@ -32926,9 +33046,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32926
33046
  }
32927
33047
  } else {
32928
33048
  return resolved_segments['$<<'](segment)
32929
- };}, $$14.$$s = self, $$14.$$arity = 1, $$14));
33049
+ };}, $$15.$$s = self, $$15.$$arity = 1, $$15));
32930
33050
  } else {
32931
- $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this;
33051
+ $send(unresolved_segments, 'each', [], ($$16 = function(segment){var self = $$16.$$s || this;
32932
33052
 
32933
33053
 
32934
33054
 
@@ -32939,7 +33059,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32939
33059
  return resolved_segments.$pop()
32940
33060
  } else {
32941
33061
  return resolved_segments['$<<'](segment)
32942
- };}, $$15.$$s = self, $$15.$$arity = 1, $$15))
33062
+ };}, $$16.$$s = self, $$16.$$arity = 1, $$16))
32943
33063
  };};
32944
33064
  if ($truthy(recheck)) {
32945
33065
 
@@ -32960,10 +33080,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32960
33080
  } else {
32961
33081
  return self.$join_path(resolved_segments, jail_root)
32962
33082
  };
32963
- }, $PathResolver_system_path$13.$$arity = -2);
33083
+ }, $PathResolver_system_path$14.$$arity = -2);
32964
33084
 
32965
- Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
32966
- var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
33085
+ Opal.def(self, '$web_path', $PathResolver_web_path$17 = function $$web_path(target, start) {
33086
+ var $a, $b, $$18, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
32967
33087
 
32968
33088
 
32969
33089
 
@@ -32982,7 +33102,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32982
33102
  };
32983
33103
  $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;
32984
33104
  resolved_segments = [];
32985
- $send(target_segments, 'each', [], ($$17 = function(segment){var self = $$17.$$s || this, $c;
33105
+ $send(target_segments, 'each', [], ($$18 = function(segment){var self = $$18.$$s || this, $c;
32986
33106
 
32987
33107
 
32988
33108
 
@@ -33003,7 +33123,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
33003
33123
  }
33004
33124
  } else {
33005
33125
  return resolved_segments['$<<'](segment)
33006
- };}, $$17.$$s = self, $$17.$$arity = 1, $$17));
33126
+ };}, $$18.$$s = self, $$18.$$arity = 1, $$18));
33007
33127
  if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) {
33008
33128
  resolved_path = resolved_path.$gsub(" ", "%20")};
33009
33129
  if ($truthy(uri_prefix)) {
@@ -33011,9 +33131,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
33011
33131
  } else {
33012
33132
  return resolved_path
33013
33133
  };
33014
- }, $PathResolver_web_path$16.$$arity = -2);
33134
+ }, $PathResolver_web_path$17.$$arity = -2);
33015
33135
  self.$private();
33016
- return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) {
33136
+ return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$19 = function $$extract_uri_prefix(str) {
33017
33137
  var $a, self = this;
33018
33138
 
33019
33139
  if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
@@ -33021,7 +33141,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
33021
33141
  } else {
33022
33142
  return str
33023
33143
  }
33024
- }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
33144
+ }, $PathResolver_extract_uri_prefix$19.$$arity = 1), nil) && 'extract_uri_prefix';
33025
33145
  })($nesting[0], null, $nesting)
33026
33146
  })($nesting[0], $nesting)
33027
33147
  };
@@ -33048,7 +33168,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33048
33168
  }
33049
33169
  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;
33050
33170
 
33051
- 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']);
33171
+ 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']);
33052
33172
  return (function($base, $parent_nesting) {
33053
33173
  var self = $module($base, 'Asciidoctor');
33054
33174
 
@@ -33193,26 +33313,31 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33193
33313
  }, $Reader_next_line_empty$ques$7.$$arity = 0);
33194
33314
 
33195
33315
  Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) {
33196
- var $a, self = this, line = nil;
33316
+ var $a, $b, self = this, next_line = nil, line = nil;
33197
33317
 
33198
33318
 
33199
33319
 
33200
33320
  if (direct == null) {
33201
33321
  direct = false;
33202
33322
  };
33203
- if ($truthy(($truthy($a = direct) ? $a : $rb_gt(self.look_ahead, 0)))) {
33204
- if ($truthy(self.unescape_next_line)) {
33205
-
33206
- return (line = self.lines['$[]'](-1)).$slice(1, line.$length());
33207
- } else {
33208
- return self.lines['$[]'](-1)
33209
- }
33210
- } else if ($truthy(self.lines['$empty?']())) {
33323
+ while ($truthy(true)) {
33211
33324
 
33212
- self.look_ahead = 0;
33213
- return nil;
33214
- } else {
33215
- return ($truthy($a = self.$process_line(self.lines['$[]'](-1))) ? $a : self.$peek_line())
33325
+ next_line = self.lines['$[]'](-1);
33326
+ if ($truthy(($truthy($b = direct) ? $b : $rb_gt(self.look_ahead, 0)))) {
33327
+ return (function() {if ($truthy(self.unescape_next_line)) {
33328
+
33329
+ return next_line.$slice(1, next_line.$length());
33330
+ } else {
33331
+ return next_line
33332
+ }; return nil; })()
33333
+ } else if ($truthy(next_line)) {
33334
+ if ($truthy((line = self.$process_line(next_line)))) {
33335
+ return line}
33336
+ } else {
33337
+
33338
+ self.look_ahead = 0;
33339
+ return nil;
33340
+ };
33216
33341
  };
33217
33342
  }, $Reader_peek_line$8.$$arity = -1);
33218
33343
 
@@ -33706,7 +33831,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33706
33831
 
33707
33832
  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;
33708
33833
 
33709
- 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;
33834
+ 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;
33710
33835
 
33711
33836
  self.$attr_reader("include_stack");
33712
33837
 
@@ -33827,27 +33952,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33827
33952
  };
33828
33953
  self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
33829
33954
  if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) {
33830
-
33831
- $writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33955
+ ($truthy($a = self.includes['$[]'](path.$slice(0, path.$rindex(".")))) ? $a : (($writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33832
33956
  return nil
33833
33957
  } else {
33834
33958
  return true
33835
- }; return nil; })()];
33836
- $send(self.includes, '[]=', Opal.to_a($writer));
33837
- $writer[$rb_minus($writer["length"], 1)];};
33959
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))};
33838
33960
  } else {
33839
33961
 
33840
33962
  self.dir = ".";
33841
33963
  self.process_lines = true;
33842
33964
  if ($truthy((self.path = path))) {
33843
-
33844
- $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33965
+ ($truthy($a = self.includes['$[]']($$($nesting, 'Helpers').$rootname(path))) ? $a : (($writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33845
33966
  return nil
33846
33967
  } else {
33847
33968
  return true
33848
- }; return nil; })()];
33849
- $send(self.includes, '[]=', Opal.to_a($writer));
33850
- $writer[$rb_minus($writer["length"], 1)];
33969
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
33851
33970
  } else {
33852
33971
  self.path = "<stdin>"
33853
33972
  };
@@ -33998,6 +34117,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33998
34117
  };
33999
34118
  if ($truthy(line['$empty?']())) {
34000
34119
 
34120
+ if ($truthy(self.skipping)) {
34121
+
34122
+ self.$shift();
34123
+ return nil;};
34001
34124
  self.look_ahead = $rb_plus(self.look_ahead, 1);
34002
34125
  return line;};
34003
34126
  if ($truthy(($truthy($a = ($truthy($b = line['$end_with?']("]")) ? line['$start_with?']("[")['$!']() : $b)) ? line['$include?']("::") : $a))) {
@@ -34229,7 +34352,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34229
34352
  ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})));
34230
34353
  return true;
34231
34354
  } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) {
34232
- return self.$replace_next_line("" + "link:" + (expanded_target) + "[]")
34355
+
34356
+ if ($truthy(expanded_target['$include?'](" "))) {
34357
+ expanded_target = "" + "pass:c[" + (expanded_target) + "]"};
34358
+ return self.$replace_next_line("" + "link:" + (expanded_target) + "[role=include]");
34233
34359
  } else if ($truthy(self.maxdepth)) {
34234
34360
 
34235
34361
  if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) {
@@ -34541,6 +34667,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34541
34667
  self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);};
34542
34668
  } else {
34543
34669
 
34670
+ inc_content = nil;
34671
+
34544
34672
  try {
34545
34673
 
34546
34674
  inc_content = $send(reader, 'call', [inc_path, read_mode], ($$79 = function(f){var self = $$79.$$s || this;
@@ -34552,7 +34680,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34552
34680
  };
34553
34681
  return f.$read();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
34554
34682
  self.$shift();
34555
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
34556
34683
  } catch ($err) {
34557
34684
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
34558
34685
  try {
@@ -34561,7 +34688,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34561
34688
  return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
34562
34689
  } finally { Opal.pop_exception() }
34563
34690
  } else { throw $err; }
34564
- };
34691
+ };;
34692
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
34565
34693
  };
34566
34694
  return true;
34567
34695
  } else {
@@ -34583,7 +34711,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34583
34711
 
34584
34712
  if ($truthy(doc['$attr?']("allow-uri-read"))) {
34585
34713
  } else {
34586
- return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]")
34714
+
34715
+ if ($truthy(target['$include?'](" "))) {
34716
+ target = "" + "pass:c[" + (target) + "]"};
34717
+ return self.$replace_next_line("" + "link:" + (target) + "[role=include]");
34587
34718
  };
34588
34719
  if ($truthy(doc['$attr?']("cache-uri"))) {
34589
34720
  if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) {
@@ -34640,39 +34771,37 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34640
34771
  }, $PreprocessorReader_split_delimited_value$83.$$arity = 1);
34641
34772
 
34642
34773
  Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$84 = function(data, increment_linenos) {
34643
- var $a, $b, self = this, front_matter = nil, original_data = nil;
34774
+ var $a, $b, self = this, delim = nil, original_data = nil, front_matter = nil, eof = nil;
34644
34775
 
34645
34776
 
34646
34777
 
34647
34778
  if (increment_linenos == null) {
34648
34779
  increment_linenos = true;
34649
34780
  };
34650
- front_matter = nil;
34651
- if (data['$[]'](0)['$==']("---")) {
34781
+ if ((delim = data['$[]'](0))['$==']("---")) {
34782
+ } else {
34783
+ return nil
34784
+ };
34785
+ original_data = data.$drop(0);
34786
+ data.$shift();
34787
+ front_matter = [];
34788
+ if ($truthy(increment_linenos)) {
34789
+ self.lineno = $rb_plus(self.lineno, 1)};
34790
+ while (!($truthy(($truthy($b = (eof = data['$empty?']())) ? $b : data['$[]'](0)['$=='](delim))))) {
34652
34791
 
34653
- original_data = data.$drop(0);
34654
- data.$shift();
34655
- front_matter = [];
34792
+ front_matter['$<<'](data.$shift());
34656
34793
  if ($truthy(increment_linenos)) {
34657
34794
  self.lineno = $rb_plus(self.lineno, 1)};
34658
- while ($truthy(($truthy($b = data['$empty?']()['$!']()) ? data['$[]'](0)['$!=']("---") : $b))) {
34659
-
34660
- front_matter['$<<'](data.$shift());
34661
- if ($truthy(increment_linenos)) {
34662
- self.lineno = $rb_plus(self.lineno, 1)};
34663
- };
34664
- if ($truthy(data['$empty?']())) {
34665
-
34666
- $send(data, 'unshift', Opal.to_a(original_data));
34667
- if ($truthy(increment_linenos)) {
34668
- self.lineno = 0};
34669
- front_matter = nil;
34670
- } else {
34671
-
34672
- data.$shift();
34673
- if ($truthy(increment_linenos)) {
34674
- self.lineno = $rb_plus(self.lineno, 1)};
34675
- };};
34795
+ };
34796
+ if ($truthy(eof)) {
34797
+
34798
+ $send(data, 'unshift', Opal.to_a(original_data));
34799
+ if ($truthy(increment_linenos)) {
34800
+ self.lineno = $rb_minus(self.lineno, original_data.$size())};
34801
+ return nil;};
34802
+ data.$shift();
34803
+ if ($truthy(increment_linenos)) {
34804
+ self.lineno = $rb_plus(self.lineno, 1)};
34676
34805
  return front_matter;
34677
34806
  }, $PreprocessorReader_skip_front_matter$excl$84.$$arity = -2);
34678
34807
  return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$85 = function $$resolve_expr_val(val) {
@@ -35092,7 +35221,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35092
35221
  }
35093
35222
  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;
35094
35223
 
35095
- 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']);
35224
+ 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']);
35096
35225
  return (function($base, $parent_nesting) {
35097
35226
  var self = $module($base, 'Asciidoctor');
35098
35227
 
@@ -35508,7 +35637,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35508
35637
  if ($truthy(inner_document_lines['$empty?']())) {
35509
35638
  } else if ($truthy((unprocessed_line1 = inner_document_lines['$[]'](0))['$include?']("::"))) {
35510
35639
 
35511
- preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1]).$readlines();
35640
+ preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1], inner_document_cursor).$readlines();
35512
35641
  if ($truthy((($a = unprocessed_line1['$=='](preprocessed_lines['$[]'](0))) ? $rb_lt(preprocessed_lines.$size(), 2) : unprocessed_line1['$=='](preprocessed_lines['$[]'](0))))) {
35513
35642
  } else {
35514
35643
 
@@ -35656,9 +35785,9 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35656
35785
  (function($base, $super, $parent_nesting) {
35657
35786
  var self = $klass($base, $super, 'ParserContext');
35658
35787
 
35659
- 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;
35788
+ 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;
35660
35789
 
35661
- 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;
35790
+ 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;
35662
35791
 
35663
35792
  self.$include($$($nesting, 'Logging'));
35664
35793
  Opal.const_set($nesting[0], 'FORMATS', ["psv", "csv", "dsv", "tsv"].$to_set());
@@ -35847,8 +35976,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35847
35976
  return nil;
35848
35977
  }, $ParserContext_close_open_cell$42.$$arity = -1);
35849
35978
 
35850
- Opal.def(self, '$close_cell', $ParserContext_close_cell$43 = function $$close_cell(eol) {try {
35851
-
35979
+ Opal.def(self, '$close_cell', $ParserContext_close_cell$43 = function $$close_cell(eol) {
35852
35980
  var $a, $b, $$44, self = this, cell_text = nil, cellspec = nil, repeat = nil, q = nil;
35853
35981
 
35854
35982
 
@@ -35887,7 +36015,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35887
36015
  cell_text = cell_text.$squeeze(q)
35888
36016
  }};
35889
36017
  };
35890
- $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;
36018
+ $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;
35891
36019
  if (self.colcount == null) self.colcount = nil;
35892
36020
  if (self.table == null) self.table = nil;
35893
36021
  if (self.current_row == null) self.current_row = nil;
@@ -35915,13 +36043,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35915
36043
  j = nil;
35916
36044
  };
35917
36045
  return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$45.$$s = self, $$45.$$arity = 1, $$45));};
35918
- } else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) {
35919
36046
  } else {
35920
-
35921
- 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()})));
35922
- Opal.ret(nil);
36047
+ column = self.table.$columns()['$[]'](self.current_row.$size())
35923
36048
  };
35924
- cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": self.reader.$cursor_before_mark()}));
36049
+ cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": (cursor_before_mark = self.reader.$cursor_before_mark())}));
35925
36050
  self.reader.$mark();
35926
36051
  if ($truthy(($truthy($c = cell.$rowspan()['$!']()) ? $c : cell.$rowspan()['$=='](1)))) {
35927
36052
  } else {
@@ -35929,22 +36054,44 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35929
36054
  };
35930
36055
  self.column_visits = $rb_plus(self.column_visits, ($truthy($c = cell.$colspan()) ? $c : 1));
35931
36056
  self.current_row['$<<'](cell);
35932
- 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))) {
35933
- return self.$close_row()
36057
+ 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))) {
36058
+ if ($truthy($rb_gt(row_status, 0))) {
36059
+
36060
+ self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": cursor_before_mark})));
36061
+ return self.$close_row(true);
36062
+ } else {
36063
+ return self.$close_row()
36064
+ }
35934
36065
  } else {
35935
36066
  return nil
35936
36067
  };}, $$44.$$s = self, $$44.$$arity = 1, $$44));
35937
36068
  self.cell_open = false;
35938
36069
  return nil;
35939
- } catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
35940
36070
  }, $ParserContext_close_cell$43.$$arity = -1);
36071
+
36072
+ Opal.def(self, '$close_table', $ParserContext_close_table$46 = function $$close_table() {
36073
+ var self = this;
36074
+
36075
+
36076
+ if (self.column_visits['$=='](0)) {
36077
+ return nil};
36078
+ 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()})));
36079
+ return nil;
36080
+ }, $ParserContext_close_table$46.$$arity = 0);
35941
36081
  self.$private();
35942
36082
 
35943
- Opal.def(self, '$close_row', $ParserContext_close_row$46 = function $$close_row() {
36083
+ Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row(drop) {
35944
36084
  var $a, self = this, $writer = nil;
35945
36085
 
35946
36086
 
35947
- self.table.$rows().$body()['$<<'](self.current_row);
36087
+
36088
+ if (drop == null) {
36089
+ drop = false;
36090
+ };
36091
+ if ($truthy(drop)) {
36092
+ } else {
36093
+ self.table.$rows().$body()['$<<'](self.current_row)
36094
+ };
35948
36095
  if (self.colcount['$=='](-1)) {
35949
36096
  self.colcount = self.column_visits};
35950
36097
  self.column_visits = 0;
@@ -35952,13 +36099,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35952
36099
  self.active_rowspans.$shift();
35953
36100
  ($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
35954
36101
  return nil;
35955
- }, $ParserContext_close_row$46.$$arity = 0);
36102
+ }, $ParserContext_close_row$47.$$arity = -1);
35956
36103
 
35957
- Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$47 = function $$activate_rowspan(rowspan, colspan) {
35958
- var $$48, self = this;
36104
+ Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) {
36105
+ var $$49, self = this;
35959
36106
 
35960
36107
 
35961
- $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$48 = function(i){var self = $$48.$$s || this, $a, $writer = nil;
36108
+ $send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil;
35962
36109
  if (self.active_rowspans == null) self.active_rowspans = nil;
35963
36110
 
35964
36111
 
@@ -35968,26 +36115,30 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35968
36115
  };
35969
36116
  $writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)];
35970
36117
  $send(self.active_rowspans, '[]=', Opal.to_a($writer));
35971
- return $writer[$rb_minus($writer["length"], 1)];}, $$48.$$s = self, $$48.$$arity = 1, $$48));
36118
+ return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49));
35972
36119
  return nil;
35973
- }, $ParserContext_activate_rowspan$47.$$arity = 2);
36120
+ }, $ParserContext_activate_rowspan$48.$$arity = 2);
35974
36121
 
35975
- Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$49 = function() {
35976
- var $a, self = this;
36122
+ Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() {
36123
+ var self = this;
35977
36124
 
35978
- return ($truthy($a = self.colcount['$=='](-1)) ? $a : self.$effective_column_visits()['$=='](self.colcount))
35979
- }, $ParserContext_end_of_row$ques$49.$$arity = 0);
36125
+ if (self.colcount['$=='](-1)) {
36126
+ return 0
36127
+ } else {
36128
+ return self.$effective_column_visits()['$<=>'](self.colcount)
36129
+ }
36130
+ }, $ParserContext_end_of_row$ques$50.$$arity = 0);
35980
36131
 
35981
- Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$50 = function $$effective_column_visits() {
36132
+ Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() {
35982
36133
  var self = this;
35983
36134
 
35984
36135
  return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0))
35985
- }, $ParserContext_effective_column_visits$50.$$arity = 0);
35986
- return (Opal.def(self, '$advance', $ParserContext_advance$51 = function $$advance() {
36136
+ }, $ParserContext_effective_column_visits$51.$$arity = 0);
36137
+ return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() {
35987
36138
  var self = this;
35988
36139
 
35989
36140
  return (self.linenum = $rb_plus(self.linenum, 1))
35990
- }, $ParserContext_advance$51.$$arity = 0), nil) && 'advance';
36141
+ }, $ParserContext_advance$52.$$arity = 0), nil) && 'advance';
35991
36142
  })($$($nesting, 'Table'), null, $nesting);
35992
36143
  })($nesting[0], $nesting)
35993
36144
  };
@@ -36554,7 +36705,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
36554
36705
  return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
36555
36706
  } else {
36556
36707
  return ""
36557
- }; 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>"
36708
+ }; 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>"
36558
36709
  };
36559
36710
  }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
36560
36711
  })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
@@ -38122,7 +38273,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38122
38273
 
38123
38274
  return syntax_hl.$format(node, lang, opts);
38124
38275
  } else {
38125
- return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close)
38276
+ return $rb_plus($rb_plus(pre_open, node.$content()), pre_close)
38126
38277
  }; return nil; })()) + "\n" + "</div>\n" + "</div>";
38127
38278
  }, $Html5Converter_convert_listing$26.$$arity = 1);
38128
38279
 
@@ -38254,7 +38405,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38254
38405
  if ((style = node.$style())['$==']("abstract")) {
38255
38406
  if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) {
38256
38407
 
38257
- self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content.");
38408
+ self.$logger().$warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content.");
38258
38409
  return "";
38259
38410
  } else {
38260
38411
 
@@ -39336,7 +39487,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
39336
39487
  }
39337
39488
  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;
39338
39489
 
39339
- 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']);
39490
+ 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']);
39340
39491
 
39341
39492
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
39342
39493
  } else {
@@ -40274,9 +40425,9 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40274
40425
  (function($base, $super, $parent_nesting) {
40275
40426
  var self = $klass($base, $super, 'Registry');
40276
40427
 
40277
- 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;
40428
+ 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;
40278
40429
 
40279
- 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;
40430
+ 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;
40280
40431
 
40281
40432
  self.$attr_reader("document");
40282
40433
  self.$attr_reader("groups");
@@ -40290,6 +40441,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40290
40441
  groups = $hash2([], {});
40291
40442
  };
40292
40443
  self.groups = groups;
40444
+ self.$reset();
40293
40445
  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)))))));
40294
40446
  return (self.document = nil);
40295
40447
  }, $Registry_initialize$53.$$arity = -1);
@@ -40298,6 +40450,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40298
40450
  var $$55, self = this, ext_groups = nil;
40299
40451
 
40300
40452
 
40453
+ if ($truthy(self.document)) {
40454
+ self.$reset()};
40301
40455
  self.document = document;
40302
40456
  if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) {
40303
40457
  } else {
@@ -40668,7 +40822,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40668
40822
  };
40669
40823
  if ($truthy(processor['$process_block_given?']())) {
40670
40824
  } else {
40671
- self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
40825
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40672
40826
  };
40673
40827
  processor.$freeze();
40674
40828
  extension = $$($nesting, 'ProcessorExtension').$new(kind, processor);
@@ -40738,11 +40892,11 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40738
40892
  };
40739
40893
  if ($truthy((name = self.$as_symbol(processor.$name())))) {
40740
40894
  } else {
40741
- self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location()))
40895
+ self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40742
40896
  };
40743
40897
  if ($truthy(processor['$process_block_given?']())) {
40744
40898
  } else {
40745
- self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
40899
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40746
40900
  };
40747
40901
  processor.$freeze();
40748
40902
 
@@ -40795,7 +40949,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40795
40949
  };
40796
40950
  }, $Registry_add_syntax_processor$89.$$arity = 2);
40797
40951
 
40798
- Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) {
40952
+ Opal.def(self, '$reset', $Registry_reset$91 = function $$reset() {
40953
+ var self = this;
40954
+
40955
+
40956
+ 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)))))));
40957
+ return (self.document = nil);
40958
+ }, $Registry_reset$91.$$arity = 0);
40959
+
40960
+ Opal.def(self, '$resolve_args', $Registry_resolve_args$92 = function $$resolve_args(args, expect) {
40799
40961
  var self = this, opts = nil, missing = nil;
40800
40962
 
40801
40963
 
@@ -40812,8 +40974,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40812
40974
  args.$pop(missing['$-@']())};
40813
40975
  args['$<<'](opts);
40814
40976
  return args;
40815
- }, $Registry_resolve_args$91.$$arity = 2);
40816
- return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) {
40977
+ }, $Registry_resolve_args$92.$$arity = 2);
40978
+ return (Opal.def(self, '$as_symbol', $Registry_as_symbol$93 = function $$as_symbol(name) {
40817
40979
  var self = this;
40818
40980
 
40819
40981
  if ($truthy(name)) {
@@ -40821,42 +40983,42 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40821
40983
  } else {
40822
40984
  return nil
40823
40985
  }
40824
- }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol';
40986
+ }, $Registry_as_symbol$93.$$arity = 1), nil) && 'as_symbol';
40825
40987
  })($nesting[0], null, $nesting);
40826
40988
  (function(self, $parent_nesting) {
40827
- var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99;
40989
+ var $nesting = [self].concat($parent_nesting), $generate_name$94, $next_auto_id$95, $groups$96, $create$97, $register$98, $unregister_all$99, $unregister$100;
40828
40990
 
40829
40991
 
40830
40992
 
40831
- Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() {
40993
+ Opal.def(self, '$generate_name', $generate_name$94 = function $$generate_name() {
40832
40994
  var self = this;
40833
40995
 
40834
40996
  return "" + "extgrp" + (self.$next_auto_id())
40835
- }, $generate_name$93.$$arity = 0);
40997
+ }, $generate_name$94.$$arity = 0);
40836
40998
 
40837
- Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() {
40999
+ Opal.def(self, '$next_auto_id', $next_auto_id$95 = function $$next_auto_id() {
40838
41000
  var $a, self = this;
40839
41001
  if (self.auto_id == null) self.auto_id = nil;
40840
41002
 
40841
41003
 
40842
41004
  self.auto_id = ($truthy($a = self.auto_id) ? $a : -1);
40843
41005
  return (self.auto_id = $rb_plus(self.auto_id, 1));
40844
- }, $next_auto_id$94.$$arity = 0);
41006
+ }, $next_auto_id$95.$$arity = 0);
40845
41007
 
40846
- Opal.def(self, '$groups', $groups$95 = function $$groups() {
41008
+ Opal.def(self, '$groups', $groups$96 = function $$groups() {
40847
41009
  var $a, self = this;
40848
41010
  if (self.groups == null) self.groups = nil;
40849
41011
 
40850
41012
  return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {})))
40851
- }, $groups$95.$$arity = 0);
41013
+ }, $groups$96.$$arity = 0);
40852
41014
 
40853
- Opal.def(self, '$create', $create$96 = function $$create(name) {
40854
- var $iter = $create$96.$$p, block = $iter || nil, $a, self = this;
41015
+ Opal.def(self, '$create', $create$97 = function $$create(name) {
41016
+ var $iter = $create$97.$$p, block = $iter || nil, $a, self = this;
40855
41017
 
40856
- if ($iter) $create$96.$$p = null;
41018
+ if ($iter) $create$97.$$p = null;
40857
41019
 
40858
41020
 
40859
- if ($iter) $create$96.$$p = null;;
41021
+ if ($iter) $create$97.$$p = null;;
40860
41022
 
40861
41023
  if (name == null) {
40862
41024
  name = nil;
@@ -40866,15 +41028,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40866
41028
  } else {
40867
41029
  return $$($nesting, 'Registry').$new()
40868
41030
  };
40869
- }, $create$96.$$arity = -1);
41031
+ }, $create$97.$$arity = -1);
40870
41032
 
40871
- Opal.def(self, '$register', $register$97 = function $$register($a) {
40872
- 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;
41033
+ Opal.def(self, '$register', $register$98 = function $$register($a) {
41034
+ 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;
40873
41035
 
40874
- if ($iter) $register$97.$$p = null;
41036
+ if ($iter) $register$98.$$p = null;
40875
41037
 
40876
41038
 
40877
- if ($iter) $register$97.$$p = null;;
41039
+ if ($iter) $register$98.$$p = null;;
40878
41040
 
40879
41041
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
40880
41042
 
@@ -40896,34 +41058,37 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40896
41058
  $writer = [name.$to_sym(), resolved_group];
40897
41059
  $send(self.$groups(), '[]=', Opal.to_a($writer));
40898
41060
  return $writer[$rb_minus($writer["length"], 1)];;
40899
- }, $register$97.$$arity = -1);
41061
+ }, $register$98.$$arity = -1);
40900
41062
 
40901
- Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() {
41063
+ Opal.def(self, '$unregister_all', $unregister_all$99 = function $$unregister_all() {
40902
41064
  var self = this;
40903
41065
 
40904
41066
 
40905
41067
  self.groups = $hash2([], {});
40906
41068
  return nil;
40907
- }, $unregister_all$98.$$arity = 0);
40908
- return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) {
40909
- var $post_args, names, $$100, self = this;
41069
+ }, $unregister_all$99.$$arity = 0);
41070
+ return (Opal.def(self, '$unregister', $unregister$100 = function $$unregister($a) {
41071
+ var $post_args, names, $$101, self = this;
40910
41072
 
40911
41073
 
40912
41074
 
40913
41075
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
40914
41076
 
40915
41077
  names = $post_args;;
40916
- $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this;
40917
- if (self.groups == null) self.groups = nil;
41078
+ $send(names, 'each_with_object', [self.$groups()], ($$101 = function(group, catalog){var self = $$101.$$s || this;
40918
41079
 
40919
41080
 
40920
41081
 
40921
41082
  if (group == null) {
40922
41083
  group = nil;
40923
41084
  };
40924
- return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100));
41085
+
41086
+ if (catalog == null) {
41087
+ catalog = nil;
41088
+ };
41089
+ return catalog.$delete(group.$to_sym());}, $$101.$$s = self, $$101.$$arity = 2, $$101));
40925
41090
  return nil;
40926
- }, $unregister$99.$$arity = -1), nil) && 'unregister';
41091
+ }, $unregister$100.$$arity = -1), nil) && 'unregister';
40927
41092
  })(Opal.get_singleton_class(self), $nesting);
40928
41093
  })($nesting[0], $nesting)
40929
41094
  })($nesting[0], $nesting);
@@ -41279,7 +41444,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
41279
41444
  self.$require("asciidoctor/converter/html5");
41280
41445
  self.$require("asciidoctor/extensions");
41281
41446
  self.$require("asciidoctor/js/asciidoctor_ext");
41282
- return self.$require("asciidoctor/js/opal_ext/logger");
41447
+ self.$require("asciidoctor/js/opal_ext/logger");
41448
+ 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,.?!\\[\\]<\\)])))"));
41283
41449
  };
41284
41450
 
41285
41451
  /* Generated by Opal 0.11.99.dev */
@@ -41414,13 +41580,13 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
41414
41580
  Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
41415
41581
  return "r"
41416
41582
  } else {
41417
- return "rb:utf-8:utf-8"
41583
+ return "rb:UTF-8:UTF-8"
41418
41584
  }; return nil; })());
41419
41585
  Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE'));
41420
41586
  Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
41421
41587
  return "w"
41422
41588
  } else {
41423
- return "w:utf-8"
41589
+ return "wb:UTF-8"
41424
41590
  }; return nil; })());
41425
41591
  Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article");
41426
41592
  Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5");
@@ -46906,7 +47072,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
46906
47072
  }
46907
47073
 
46908
47074
 
46909
- var ASCIIDOCTOR_JS_VERSION = '2.2.6';
47075
+ var ASCIIDOCTOR_JS_VERSION = '2.2.8';
46910
47076
 
46911
47077
  /**
46912
47078
  * Get Asciidoctor.js version number.