@asciidoctor/core 2.2.6 → 2.2.7

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.7 | 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;
22197
+
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;
22171
22204
 
22172
- return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
22173
- }, $Helpers_uriish$ques$16.$$arity = 1);
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,13 @@ 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
+ Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|\\\\?&lt;()|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\2([^\\s]*?)&gt;|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))", 'm'));
23038
23077
  Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
23039
23078
  Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
23040
23079
  Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
23041
23080
  Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
23042
23081
  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'));
23082
+ 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
23083
  Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
23046
23084
  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
23085
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
@@ -23057,7 +23095,11 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
23057
23095
  Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
23058
23096
  Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
23059
23097
  Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
23060
- Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
23098
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
23099
+ Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"))
23100
+ } else {
23101
+ nil
23102
+ };
23061
23103
  Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
23062
23104
  })($nesting[0], $nesting)
23063
23105
  };
@@ -23081,7 +23123,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23081
23123
  }
23082
23124
  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
23125
 
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']);
23126
+ 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
23127
  return (function($base, $parent_nesting) {
23086
23128
  var self = $module($base, 'Asciidoctor');
23087
23129
 
@@ -23090,7 +23132,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23090
23132
  (function($base, $parent_nesting) {
23091
23133
  var self = $module($base, 'Substitutors');
23092
23134
 
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;
23135
+ 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
23136
 
23095
23137
 
23096
23138
  Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
@@ -23586,7 +23628,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23586
23628
  ($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
23629
  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
23630
  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;
23631
+ 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
23632
 
23591
23633
  return (function() {$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
23592
23634
  if ("indexterm"['$===']($case)) {
@@ -23595,8 +23637,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23595
23637
  if ($truthy((attrlist = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) {
23596
23638
  if ($truthy((primary = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) {
23597
23639
 
23640
+ terms = [primary];
23641
+ if ($truthy((secondary = attrs['$[]'](2)))) {
23642
+
23643
+ terms['$<<'](secondary);
23644
+ if ($truthy((tertiary = attrs['$[]'](3)))) {
23645
+ terms['$<<'](tertiary)};};
23598
23646
 
23599
- $writer = ["terms", [primary]];
23647
+ $writer = ["terms", terms];
23600
23648
  $send(attrs, '[]=', Opal.to_a($writer));
23601
23649
  $writer[$rb_minus($writer["length"], 1)];;
23602
23650
  if ($truthy((see_also = attrs['$[]']("see-also")))) {
@@ -23709,78 +23757,93 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23709
23757
  return subbed_term
23710
23758
  };}})()}, $$31.$$s = self, $$31.$$arity = 0, $$31))};
23711
23759
  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;
23760
+ 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
23761
 
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)))) {
23762
+ if ($truthy(($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2))) ? (($d = $gvars['~']) === nil ? nil : $d['$[]'](5))['$!']() : $c))) {
23719
23763
 
23720
- if (prefix['$==']("link:")) {
23721
- prefix = ""};
23722
- if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))['$empty?']())) {
23723
- link_text = nil};
23764
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$start_with?']($$($nesting, 'RS')))) {
23765
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());};
23766
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
23767
+ 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()));};
23768
+ target = $rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](6)));
23769
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23770
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23771
+ doc.$register("links", target);
23772
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23773
+
23774
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
23775
+ } else {
23776
+ return target
23777
+ }; return nil; })();
23778
+ return $$($nesting, 'Inline').$new(self, "anchor", link_text, $hash2(["type", "target", "attributes"], {"type": "link", "target": target, "attributes": $hash2(["role"], {"role": "bare"})})).$convert();
23724
23779
  } else {
23725
23780
 
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)))['$=='](")")))) {
23781
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
23782
+ 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()));};
23783
+ $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;
23784
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
23732
23785
 
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 = ");";
23786
+ if (prefix['$==']("link:")) {
23787
+ prefix = ""};
23788
+ if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))['$empty?']())) {
23789
+ link_text = nil};
23746
23790
  } else {
23747
- suffix = ";"
23748
- };
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?'](")"))) {
23753
23791
 
23754
- target = target.$chop();
23755
- suffix = "):";
23756
- } else {
23757
- suffix = ":"
23792
+ $case = prefix;
23793
+ if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
23794
+ $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
23795
+ if (";"['$===']($case)) {
23796
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23797
+
23798
+ target = target.$chop();
23799
+ suffix = ");";
23800
+ } else {
23801
+ suffix = ";"
23802
+ };
23803
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23804
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
23805
+ else if (":"['$===']($case)) {
23806
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
23807
+
23808
+ target = target.$chop();
23809
+ suffix = "):";
23810
+ } else {
23811
+ suffix = ":"
23812
+ };
23813
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
23814
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
23758
23815
  };
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)) {
23764
-
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))) {
23816
+ link_opts = $hash2(["type"], {"type": "link"});
23817
+ if ($truthy(link_text)) {
23768
23818
 
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;
23771
-
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?']("^"))) {
23776
-
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)]))
23780
- } else {
23781
- attrs = $hash2(["window"], {"window": "_blank"})
23782
- };};
23783
- if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
23819
+ if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
23820
+ new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
23821
+ if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
23822
+
23823
+ $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;
23824
+ new_link_text = link_text;
23825
+
23826
+ $writer = ["id", attrs['$[]']("id")];
23827
+ $send(link_opts, '[]=', Opal.to_a($writer));
23828
+ $writer[$rb_minus($writer["length"], 1)];;};
23829
+ if ($truthy(link_text['$end_with?']("^"))) {
23830
+
23831
+ new_link_text = (link_text = link_text.$chop());
23832
+ if ($truthy(attrs)) {
23833
+ ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
23834
+ } else {
23835
+ attrs = $hash2(["window"], {"window": "_blank"})
23836
+ };};
23837
+ if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
23838
+
23839
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23840
+
23841
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
23842
+ } else {
23843
+ return target
23844
+ }; return nil; })();
23845
+ bare = true;};
23846
+ } else {
23784
23847
 
23785
23848
  link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
23786
23849
 
@@ -23788,37 +23851,29 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23788
23851
  } else {
23789
23852
  return target
23790
23853
  }; 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)) {
23854
+ bare = true;
23855
+ };
23856
+ if ($truthy(bare)) {
23857
+ if ($truthy(attrs)) {
23858
+
23859
+ $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
23860
+ return "" + "bare " + (attrs['$[]']("role"))
23861
+ } else {
23862
+ return "bare"
23863
+ }; return nil; })()];
23864
+ $send(attrs, '[]=', Opal.to_a($writer));
23865
+ $writer[$rb_minus($writer["length"], 1)];
23866
+ } else {
23867
+ attrs = $hash2(["role"], {"role": "bare"})
23868
+ }};
23869
+ doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
23803
23870
  if ($truthy(attrs)) {
23804
23871
 
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))};
23872
+ $writer = ["attributes", attrs];
23873
+ $send(link_opts, '[]=', Opal.to_a($writer));
23874
+ $writer[$rb_minus($writer["length"], 1)];};
23875
+ return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);
23876
+ }}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
23822
23877
  if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("link:")) ? $b : text['$include?']("ilto:")) : $a))) {
23823
23878
  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
23879
 
@@ -23956,7 +24011,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23956
24011
  };
23957
24012
  if ($truthy(doc.$compat_mode())) {
23958
24013
  fragment = refid
23959
- } else if ($truthy((hash_idx = refid.$index("#")))) {
24014
+ } else if ($truthy(($truthy($c = (hash_idx = refid.$index("#"))) ? refid['$[]']($rb_minus(hash_idx, 1))['$!=']("&") : $c))) {
23960
24015
  if ($truthy($rb_gt(hash_idx, 0))) {
23961
24016
 
23962
24017
  if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
@@ -24307,13 +24362,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24307
24362
  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
24363
  } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) {
24309
24364
  preceding = "" + "[" + (attrlist) + "]"
24310
- } else {
24311
-
24312
- if ($truthy((($c = boundary['$==']("++")) ? attrlist['$end_with?']("x-") : boundary['$==']("++")))) {
24365
+ } else if (boundary['$==']("++")) {
24366
+ if (attrlist['$==']("x-")) {
24367
+
24368
+ old_behavior = true;
24369
+ attributes = $hash2([], {});
24370
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
24313
24371
 
24314
24372
  old_behavior = true;
24315
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));};
24316
- attributes = self.$parse_quoted_text_attributes(attrlist);
24373
+ attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
24374
+ } else {
24375
+ attributes = self.$parse_quoted_text_attributes(attrlist)
24376
+ }
24377
+ } else {
24378
+ attributes = self.$parse_quoted_text_attributes(attrlist)
24317
24379
  }
24318
24380
  } else if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) {
24319
24381
  return "" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);};
@@ -24359,33 +24421,42 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24359
24421
  return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
24360
24422
  $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
24423
  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;
24424
+ 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
24425
 
24364
24426
 
24365
24427
  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));
24428
+ attrlist = ($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](4))) ? $c : (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)));
24429
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
24430
+ escaped = true};
24431
+ quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
24432
+ format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
24433
+ content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
24371
24434
  if ($truthy(compat_mode)) {
24372
24435
  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))};
24436
+ } else if ($truthy(($truthy($c = attrlist) ? ($truthy($d = attrlist['$==']("x-")) ? $d : attrlist['$end_with?'](" x-")) : $c))) {
24437
+ old_behavior = (old_behavior_forced = true)};
24375
24438
  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)) {
24439
+ if ($truthy(escaped)) {
24379
24440
  return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()));
24380
24441
  } else if (preceding['$==']($$($nesting, 'RS'))) {
24381
- preceding = "" + "[" + (attrlist) + "]"
24442
+
24443
+ if ($truthy(($truthy($c = old_behavior_forced) ? format_mark['$==']("`") : $c))) {
24444
+ return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text);};
24445
+ preceding = "" + "[" + (attrlist) + "]";
24446
+ } else if ($truthy(old_behavior_forced)) {
24447
+ attributes = (function() {if (attrlist['$==']("x-")) {
24448
+ return $hash2([], {})
24449
+ } else {
24450
+
24451
+ return self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
24452
+ }; return nil; })()
24382
24453
  } else {
24383
24454
  attributes = self.$parse_quoted_text_attributes(attrlist)
24384
24455
  }
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()));};
24456
+ } else if ($truthy(escaped)) {
24457
+ return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));
24458
+ } else if ($truthy(($truthy($c = compat_mode) ? preceding['$==']($$($nesting, 'RS')) : $c))) {
24459
+ return quoted_text;};
24389
24460
  if ($truthy(compat_mode)) {
24390
24461
 
24391
24462
  $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "monospaced"})];
@@ -24819,27 +24890,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24819
24890
  };}, $$71.$$s = self, $$71.$$arity = 1, $$71)).$join($$($nesting, 'LF')));
24820
24891
  }, $Substitutors_restore_callouts$70.$$arity = -3);
24821
24892
 
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) {
24893
+ Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
24843
24894
  var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
24844
24895
 
24845
24896
 
@@ -24870,9 +24921,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24870
24921
  type = "unquoted"};};
24871
24922
  return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
24872
24923
  };
24873
- }, $Substitutors_convert_quoted_text$74.$$arity = 3);
24924
+ }, $Substitutors_convert_quoted_text$73.$$arity = 3);
24874
24925
 
24875
- Opal.def(self, '$do_replacement', $Substitutors_do_replacement$75 = function $$do_replacement(m, replacement, restore) {
24926
+ Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
24876
24927
  var self = this, captured = nil, $case = nil;
24877
24928
 
24878
24929
  if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
@@ -24883,13 +24934,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24883
24934
  else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
24884
24935
  else {return $rb_plus(m['$[]'](1), replacement)}})()
24885
24936
  }
24886
- }, $Substitutors_do_replacement$75.$$arity = 3);
24937
+ }, $Substitutors_do_replacement$74.$$arity = 3);
24887
24938
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
24888
24939
  } else {
24889
24940
  nil
24890
24941
  };
24891
24942
 
24892
- Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$76 = function $$parse_quoted_text_attributes(str) {
24943
+ Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
24893
24944
  var $a, $b, self = this, before = nil, _ = nil, after = nil, attrs = nil, $writer = nil, id = nil, roles = nil;
24894
24945
 
24895
24946
 
@@ -24941,9 +24992,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24941
24992
  } else {
24942
24993
  return $hash2(["role"], {"role": str})
24943
24994
  };
24944
- }, $Substitutors_parse_quoted_text_attributes$76.$$arity = 1);
24995
+ }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
24945
24996
 
24946
- Opal.def(self, '$normalize_text', $Substitutors_normalize_text$77 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24997
+ Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
24947
24998
  var $a, self = this;
24948
24999
 
24949
25000
 
@@ -24964,10 +25015,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24964
25015
  text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
24965
25016
  };
24966
25017
  return text;
24967
- }, $Substitutors_normalize_text$77.$$arity = -2);
25018
+ }, $Substitutors_normalize_text$76.$$arity = -2);
24968
25019
 
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;
25020
+ Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
25021
+ var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
24971
25022
 
24972
25023
  if ($truthy(str['$empty?']())) {
24973
25024
  return []
@@ -24976,7 +25027,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24976
25027
  values = [];
24977
25028
  accum = "";
24978
25029
  quote_open = nil;
24979
- $send(str, 'each_char', [], ($$79 = function(c){var self = $$79.$$s || this, $case = nil;
25030
+ $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
24980
25031
 
24981
25032
 
24982
25033
 
@@ -24992,19 +25043,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
24992
25043
  return (accum = "");
24993
25044
  }}
24994
25045
  else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
24995
- else {return (accum = $rb_plus(accum, c))}})();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
25046
+ else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
24996
25047
  return values['$<<'](accum.$strip());
24997
25048
  } else {
24998
- return $send(str.$split(","), 'map', [], ($$80 = function(it){var self = $$80.$$s || this;
25049
+ return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
24999
25050
 
25000
25051
 
25001
25052
 
25002
25053
  if (it == null) {
25003
25054
  it = nil;
25004
25055
  };
25005
- return it.$strip();}, $$80.$$s = self, $$80.$$arity = 1, $$80))
25056
+ return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
25006
25057
  }
25007
- }, $Substitutors_split_simple_csv$78.$$arity = 1);
25058
+ }, $Substitutors_split_simple_csv$77.$$arity = 1);
25008
25059
  })($nesting[0], $nesting)
25009
25060
  })($nesting[0], $nesting)
25010
25061
  };
@@ -25018,7 +25069,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
25018
25069
 
25019
25070
  var $nesting = [self].concat($parent_nesting);
25020
25071
 
25021
- Opal.const_set($nesting[0], 'VERSION', "2.0.17")
25072
+ Opal.const_set($nesting[0], 'VERSION', "2.0.22")
25022
25073
  })($nesting[0], $nesting)
25023
25074
  };
25024
25075
 
@@ -25032,7 +25083,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25032
25083
  }
25033
25084
  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
25085
 
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']);
25086
+ 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
25087
  return (function($base, $parent_nesting) {
25037
25088
  var self = $module($base, 'Asciidoctor');
25038
25089
 
@@ -25437,7 +25488,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25437
25488
  image_path = self.$normalize_system_path(target_image)
25438
25489
  };
25439
25490
  if ($truthy($$$('::', 'File')['$readable?'](image_path))) {
25440
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64($$$('::', 'File').$binread(image_path)))
25491
+ return "" + "data:" + (mimetype) + ";base64," + ([$$$('::', 'File').$binread(image_path)].$pack("m0"))
25441
25492
  } else {
25442
25493
 
25443
25494
  self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
@@ -25468,7 +25519,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
25468
25519
  f = nil;
25469
25520
  };
25470
25521
  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));
25522
+ return "" + "data:" + (mimetype) + ";base64," + ([bindata].$pack("m0"));
25472
25523
  } catch ($err) {
25473
25524
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
25474
25525
  try {
@@ -26596,7 +26647,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
26596
26647
  else if ("verbatim"['$===']($case) || "raw"['$===']($case)) {
26597
26648
  result = self.$apply_subs(self.lines, self.subs);
26598
26649
  if ($truthy($rb_lt(result.$size(), 2))) {
26599
- return result['$[]'](0)
26650
+ return ($truthy($a = result['$[]'](0)) ? $a : "")
26600
26651
  } else {
26601
26652
 
26602
26653
  while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) {
@@ -26610,7 +26661,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
26610
26661
  else {
26611
26662
  if (self.content_model['$==']("empty")) {
26612
26663
  } else {
26613
- self.$logger().$warn("" + "Unknown content model '" + (self.content_model) + "' for block: " + (self))
26664
+ self.$logger().$warn("" + "unknown content model '" + (self.content_model) + "' for block: " + (self))
26614
26665
  };
26615
26666
  return nil;}})()
26616
26667
  }, $Block_content$2.$$arity = 0);
@@ -27452,6 +27503,11 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27452
27503
  $writer = ["catalog_assets", true];
27453
27504
  $send(options, '[]=', Opal.to_a($writer));
27454
27505
  $writer[$rb_minus($writer["length"], 1)];};
27506
+ if ($truthy(parent_doc.$options()['$[]']("to_dir"))) {
27507
+
27508
+ $writer = ["to_dir", parent_doc.$options()['$[]']("to_dir")];
27509
+ $send(options, '[]=', Opal.to_a($writer));
27510
+ $writer[$rb_minus($writer["length"], 1)];};
27455
27511
  self.catalog = parent_doc.$catalog().$merge($hash2(["footnotes"], {"footnotes": []}));
27456
27512
  self.attribute_overrides = (attr_overrides = parent_doc.$instance_variable_get("@attribute_overrides").$merge(parent_doc.$attributes()));
27457
27513
  attr_overrides.$delete("compat-mode");
@@ -29271,7 +29327,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29271
29327
  }
29272
29328
  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
29329
 
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', '$%']);
29330
+ 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?', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
29275
29331
  return (function($base, $parent_nesting) {
29276
29332
  var self = $module($base, 'Asciidoctor');
29277
29333
 
@@ -29313,6 +29369,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29313
29369
  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
29370
  Opal.const_set($nesting[0], 'NoOp', nil);
29315
29371
  Opal.const_set($nesting[0], 'AuthorKeys', ["author", "authorinitials", "firstname", "middlename", "lastname", "email"]);
29372
+ Opal.const_set($nesting[0], 'ListContinuationMarker', $$$('::', 'Module').$new());
29373
+ Opal.const_set($nesting[0], 'ListContinuationPlaceholder', $$$('::', 'String').$new().$extend($$($nesting, 'ListContinuationMarker')));
29374
+ Opal.const_set($nesting[0], 'ListContinuationString', $$$('::', 'String').$new($$($nesting, 'LIST_CONTINUATION')).$extend($$($nesting, 'ListContinuationMarker')));
29316
29375
  Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"}));
29317
29376
  Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"}));
29318
29377
  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 +29774,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29715
29774
  if ($truthy(part)) {
29716
29775
  if ($truthy(section['$blocks?']()['$!']())) {
29717
29776
  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)];;
29777
+ if ($truthy((($b = new_block.$style()['$==']("open")) ? new_block.$context()['$==']("open") : new_block.$style()['$==']("open")))) {
29724
29778
 
29725
29779
  $writer = ["partintro"];
29726
29780
  $send(new_block, 'style=', Opal.to_a($writer));
29727
- $writer[$rb_minus($writer["length"], 1)];;
29781
+ $writer[$rb_minus($writer["length"], 1)];
29728
29782
  } else {
29729
29783
 
29730
29784
 
@@ -29736,7 +29790,16 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29736
29790
  $send(intro, 'style=', Opal.to_a($writer));
29737
29791
  $writer[$rb_minus($writer["length"], 1)];;
29738
29792
  section.$blocks()['$<<'](intro);
29739
- }}
29793
+ }
29794
+ } else if (new_block.$content_model()['$==']("simple")) {
29795
+
29796
+
29797
+ $writer = ["compound"];
29798
+ $send(new_block, 'content_model=', Opal.to_a($writer));
29799
+ $writer[$rb_minus($writer["length"], 1)];;
29800
+ new_block['$<<']($$($nesting, 'Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
29801
+ new_block.$lines().$clear();
29802
+ new_block.$subs().$clear();}
29740
29803
  } else if (section.$blocks().$size()['$=='](1)) {
29741
29804
 
29742
29805
  first_block = section.$blocks()['$[]'](0);
@@ -29748,12 +29811,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29748
29811
  $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))];
29749
29812
  $send(new_block, 'parent=', Opal.to_a($writer));
29750
29813
  $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")) {
29814
+ if (first_block.$style()['$==']((($writer = ["partintro"]), $send(intro, 'style=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) {
29757
29815
 
29758
29816
 
29759
29817
  $writer = ["paragraph"];
@@ -29763,6 +29821,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29763
29821
  $writer = [nil];
29764
29822
  $send(first_block, 'style=', Opal.to_a($writer));
29765
29823
  $writer[$rb_minus($writer["length"], 1)];;};
29824
+ section.$blocks().$shift();
29766
29825
  intro['$<<'](first_block);
29767
29826
  section.$blocks()['$<<'](intro);};}};
29768
29827
  ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block);
@@ -29865,6 +29924,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29865
29924
  if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) {
29866
29925
 
29867
29926
  block_context = style.$to_sym();
29927
+ cloaked_context = "paragraph";
29868
29928
  reader.$unshift_line(this_line);
29869
29929
  break;;};
29870
29930
  if ($truthy(text_only)) {
@@ -30231,7 +30291,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30231
30291
  } else {
30232
30292
  $case = block_context;
30233
30293
  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)))) {
30294
+ if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : (language = (function() {if ($truthy(attributes['$[]'](1))) {
30295
+ return nil
30296
+ } else {
30297
+ return ($truthy($b = attributes['$[]'](2)) ? $b : doc_attrs['$[]']("source-language"))
30298
+ }; return nil; })())))) {
30235
30299
 
30236
30300
  if ($truthy(language)) {
30237
30301
 
@@ -30253,6 +30317,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30253
30317
  $writer = ["language", doc_attrs['$[]']("source-language")];
30254
30318
  $send(attributes, '[]=', Opal.to_a($writer));
30255
30319
  $writer[$rb_minus($writer["length"], 1)];};
30320
+ if (cloaked_context['$==']("listing")) {
30321
+ } else {
30322
+
30323
+ $writer = ["cloaked-context", cloaked_context];
30324
+ $send(attributes, '[]=', Opal.to_a($writer));
30325
+ $writer[$rb_minus($writer["length"], 1)];
30326
+ };
30256
30327
  };
30257
30328
  if ($truthy(attributes['$key?']("linenums"))) {
30258
30329
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
@@ -30302,6 +30373,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30302
30373
  $send(attributes, '[]=', Opal.to_a($writer));
30303
30374
  $writer[$rb_minus($writer["length"], 1)];
30304
30375
  };
30376
+
30377
+ $writer = ["cloaked-context", cloaked_context];
30378
+ $send(attributes, '[]=', Opal.to_a($writer));
30379
+ $writer[$rb_minus($writer["length"], 1)];;
30305
30380
  if ($truthy(attributes['$key?']("linenums"))) {
30306
30381
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
30307
30382
 
@@ -30696,8 +30771,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30696
30771
  reftext = reftext.$gsub("\\]", "]");
30697
30772
  if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30698
30773
  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;}};
30774
+ } else if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
30775
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
30776
+ reftext = nil}}};
30701
30777
  };
30702
30778
  if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
30703
30779
  return nil
@@ -30921,7 +30997,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30921
30997
  };
30922
30998
  }, $Parser_parse_list_item$27.$$arity = -5);
30923
30999
  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;
31000
+ 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
31001
 
30926
31002
 
30927
31003
 
@@ -30942,12 +31018,14 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30942
31018
  this_line = reader.$read_line();
30943
31019
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
30944
31020
  break;};
31021
+ if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31022
+ this_line = $$($nesting, 'ListContinuationString')};
30945
31023
  prev_line = (function() {if ($truthy(buffer['$empty?']())) {
30946
31024
  return nil
30947
31025
  } else {
30948
31026
  return buffer['$[]'](-1)
30949
31027
  }; return nil; })();
30950
- if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31028
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](prev_line))) {
30951
31029
 
30952
31030
  if (continuation['$==']("inactive")) {
30953
31031
 
@@ -30956,11 +31034,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30956
31034
  if ($truthy(within_nested_list)) {
30957
31035
  } else {
30958
31036
 
30959
- $writer = [-1, ""];
31037
+ $writer = [-1, $$($nesting, 'ListContinuationPlaceholder')];
30960
31038
  $send(buffer, '[]=', Opal.to_a($writer));
30961
31039
  $writer[$rb_minus($writer["length"], 1)];
30962
31040
  };};
30963
- if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31041
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
30964
31042
 
30965
31043
  if ($truthy(continuation['$!=']("frozen"))) {
30966
31044
 
@@ -30969,16 +31047,36 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30969
31047
  this_line = nil;
30970
31048
  continue;;};};
30971
31049
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
31050
+
30972
31051
  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
31052
  } else {
30978
31053
  break;
30979
- }
30980
- } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
30981
- break;
31054
+ };
31055
+ buffer['$<<'](this_line);
31056
+ buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
31057
+ continuation = "inactive";
31058
+ } else if ($truthy(($truthy($b = ($truthy($c = ($truthy($d = dlist) ? continuation['$!=']("active") : $d)) ? this_line['$start_with?']("[") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
31059
+
31060
+ block_attribute_lines = [this_line];
31061
+ while ($truthy((next_line = reader.$peek_line()))) {
31062
+
31063
+ if ($truthy(self['$is_delimited_block?'](next_line))) {
31064
+ interrupt = true
31065
+ } else if ($truthy(($truthy($c = next_line['$empty?']()) ? $c : ($truthy($d = next_line['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](next_line) : $d)))) {
31066
+
31067
+ block_attribute_lines['$<<'](reader.$read_line());
31068
+ continue;;
31069
+ } else if ($truthy(($truthy($c = $$($nesting, 'AnyListRx')['$match?'](next_line)) ? self['$is_sibling_list_item?'](next_line, list_type, sibling_trait)['$!']() : $c))) {
31070
+ buffer.$concat(block_attribute_lines)
31071
+ } else {
31072
+ interrupt = true
31073
+ };
31074
+ break;;
31075
+ };
31076
+ if ($truthy(interrupt)) {
31077
+
31078
+ reader.$unshift_lines(block_attribute_lines);
31079
+ break;;};
30982
31080
  } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) {
30983
31081
  if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) {
30984
31082
 
@@ -30996,7 +31094,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30996
31094
  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
31095
  };
30998
31096
  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)))) {
31097
+ } 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
31098
  buffer['$<<'](this_line)
31001
31099
  } else {
31002
31100
 
@@ -31011,7 +31109,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31011
31109
  if (ctx == null) {
31012
31110
  ctx = nil;
31013
31111
  };
31014
- return $$($nesting, 'ListRxMap')['$[]'](ctx)['$match?'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
31112
+ return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
31015
31113
 
31016
31114
  within_nested_list = true;
31017
31115
  if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) {
@@ -31032,7 +31130,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31032
31130
  if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31033
31131
 
31034
31132
  detached_continuation = buffer.$size();
31035
- buffer['$<<'](this_line);
31133
+ buffer['$<<']($$($nesting, 'ListContinuationString'));
31036
31134
  } else if ($truthy(has_text)) {
31037
31135
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
31038
31136
  break;
@@ -31076,6 +31174,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31076
31174
  buffer['$<<'](this_line);
31077
31175
  has_text = true;
31078
31176
  };
31177
+ } else if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
31178
+
31179
+ has_text = true;
31180
+ buffer['$<<'](this_line);
31079
31181
  } else {
31080
31182
 
31081
31183
  if ($truthy(this_line['$empty?']())) {
@@ -31106,17 +31208,18 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
31106
31208
  reader.$unshift_line(this_line)};
31107
31209
  if ($truthy(detached_continuation)) {
31108
31210
 
31109
- $writer = [detached_continuation, ""];
31211
+ $writer = [detached_continuation, $$($nesting, 'ListContinuationPlaceholder')];
31110
31212
  $send(buffer, '[]=', Opal.to_a($writer));
31111
31213
  $writer[$rb_minus($writer["length"], 1)];};
31112
31214
  while (!($truthy(buffer['$empty?']()))) {
31113
- if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
31114
- buffer.$pop()
31115
- } else {
31215
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$===']((last_line = buffer['$[]'](-1))))) {
31116
31216
 
31117
- if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
31118
- buffer.$pop()};
31217
+ buffer.$pop();
31119
31218
  break;;
31219
+ } else if ($truthy(last_line['$empty?']())) {
31220
+ buffer.$pop()
31221
+ } else {
31222
+ break;
31120
31223
  }
31121
31224
  };
31122
31225
  return buffer;
@@ -32603,7 +32706,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32603
32706
  (function($base, $super, $parent_nesting) {
32604
32707
  var self = $klass($base, $super, 'PathResolver');
32605
32708
 
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;
32709
+ 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
32710
 
32608
32711
  self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
32609
32712
 
@@ -32614,6 +32717,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32614
32717
  Opal.const_set($nesting[0], 'SLASH', "/");
32615
32718
  Opal.const_set($nesting[0], 'BACKSLASH', "\\");
32616
32719
  Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//");
32720
+ Opal.const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
32617
32721
  Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
32618
32722
  self.$attr_accessor("file_separator");
32619
32723
  self.$attr_accessor("working_dir");
@@ -32659,23 +32763,30 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32659
32763
 
32660
32764
  return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://"))
32661
32765
  }, $PathResolver_root$ques$3.$$arity = 1)
32766
+ } else if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
32767
+
32768
+ Opal.def(self, '$root?', $PathResolver_root$ques$4 = function(path) {
32769
+ var $a, self = this;
32770
+
32771
+ return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))
32772
+ }, $PathResolver_root$ques$4.$$arity = 1)
32662
32773
  } else {
32663
32774
  Opal.alias(self, "root?", "absolute_path?")
32664
32775
  };
32665
32776
 
32666
- Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) {
32777
+ Opal.def(self, '$unc?', $PathResolver_unc$ques$5 = function(path) {
32667
32778
  var self = this;
32668
32779
 
32669
32780
  return path['$start_with?']($$($nesting, 'DOUBLE_SLASH'))
32670
- }, $PathResolver_unc$ques$4.$$arity = 1);
32781
+ }, $PathResolver_unc$ques$5.$$arity = 1);
32671
32782
 
32672
- Opal.def(self, '$web_root?', $PathResolver_web_root$ques$5 = function(path) {
32783
+ Opal.def(self, '$web_root?', $PathResolver_web_root$ques$6 = function(path) {
32673
32784
  var self = this;
32674
32785
 
32675
32786
  return path['$start_with?']($$($nesting, 'SLASH'))
32676
- }, $PathResolver_web_root$ques$5.$$arity = 1);
32787
+ }, $PathResolver_web_root$ques$6.$$arity = 1);
32677
32788
 
32678
- Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$6 = function(path, base) {
32789
+ Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$7 = function(path, base) {
32679
32790
  var $a, self = this;
32680
32791
 
32681
32792
  if (base['$=='](path)) {
@@ -32685,9 +32796,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32685
32796
  } else {
32686
32797
  return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a)
32687
32798
  }
32688
- }, $PathResolver_descends_from$ques$6.$$arity = 2);
32799
+ }, $PathResolver_descends_from$ques$7.$$arity = 2);
32689
32800
 
32690
- Opal.def(self, '$relative_path', $PathResolver_relative_path$7 = function $$relative_path(path, base) {
32801
+ Opal.def(self, '$relative_path', $PathResolver_relative_path$8 = function $$relative_path(path, base) {
32691
32802
  var self = this, offset = nil;
32692
32803
 
32693
32804
  if ($truthy(self['$root?'](path))) {
@@ -32708,9 +32819,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32708
32819
  } else {
32709
32820
  return path
32710
32821
  }
32711
- }, $PathResolver_relative_path$7.$$arity = 2);
32822
+ }, $PathResolver_relative_path$8.$$arity = 2);
32712
32823
 
32713
- Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) {
32824
+ Opal.def(self, '$posixify', $PathResolver_posixify$9 = function $$posixify(path) {
32714
32825
  var $a, self = this;
32715
32826
 
32716
32827
  if ($truthy(path)) {
@@ -32723,18 +32834,18 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32723
32834
  } else {
32724
32835
  return ""
32725
32836
  }
32726
- }, $PathResolver_posixify$8.$$arity = 1);
32837
+ }, $PathResolver_posixify$9.$$arity = 1);
32727
32838
  Opal.alias(self, "posixfy", "posixify");
32728
32839
 
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;
32840
+ Opal.def(self, '$expand_path', $PathResolver_expand_path$10 = function $$expand_path(path) {
32841
+ var $a, $b, $$11, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
32731
32842
 
32732
32843
 
32733
32844
  $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
32845
  if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) {
32735
32846
 
32736
32847
  resolved_segments = [];
32737
- $send(path_segments, 'each', [], ($$10 = function(segment){var self = $$10.$$s || this;
32848
+ $send(path_segments, 'each', [], ($$11 = function(segment){var self = $$11.$$s || this;
32738
32849
 
32739
32850
 
32740
32851
 
@@ -32745,14 +32856,14 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32745
32856
  return resolved_segments.$pop()
32746
32857
  } else {
32747
32858
  return resolved_segments['$<<'](segment)
32748
- };}, $$10.$$s = self, $$10.$$arity = 1, $$10));
32859
+ };}, $$11.$$s = self, $$11.$$arity = 1, $$11));
32749
32860
  return self.$join_path(resolved_segments, path_root);
32750
32861
  } else {
32751
32862
  return self.$join_path(path_segments, path_root)
32752
32863
  };
32753
- }, $PathResolver_expand_path$9.$$arity = 1);
32864
+ }, $PathResolver_expand_path$10.$$arity = 1);
32754
32865
 
32755
- Opal.def(self, '$partition_path', $PathResolver_partition_path$11 = function $$partition_path(path, web) {
32866
+ Opal.def(self, '$partition_path', $PathResolver_partition_path$12 = function $$partition_path(path, web) {
32756
32867
  var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil;
32757
32868
 
32758
32869
 
@@ -32777,6 +32888,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32777
32888
  root = $$($nesting, 'DOUBLE_SLASH')
32778
32889
  } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) {
32779
32890
  root = $$($nesting, 'SLASH')
32891
+ } else if ($truthy(posix_path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))) {
32892
+ root = posix_path.$slice(0, $$($nesting, 'URI_CLASSLOADER').$length())
32780
32893
  } else {
32781
32894
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1))
32782
32895
  }
@@ -32793,9 +32906,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32793
32906
  $writer = [path, [path_segments, root]];
32794
32907
  $send(cache, '[]=', Opal.to_a($writer));
32795
32908
  return $writer[$rb_minus($writer["length"], 1)];;
32796
- }, $PathResolver_partition_path$11.$$arity = -2);
32909
+ }, $PathResolver_partition_path$12.$$arity = -2);
32797
32910
 
32798
- Opal.def(self, '$join_path', $PathResolver_join_path$12 = function $$join_path(segments, root) {
32911
+ Opal.def(self, '$join_path', $PathResolver_join_path$13 = function $$join_path(segments, root) {
32799
32912
  var self = this;
32800
32913
 
32801
32914
 
@@ -32809,10 +32922,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32809
32922
 
32810
32923
  return segments.$join($$($nesting, 'SLASH'));
32811
32924
  };
32812
- }, $PathResolver_join_path$12.$$arity = -2);
32925
+ }, $PathResolver_join_path$13.$$arity = -2);
32813
32926
 
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;
32927
+ Opal.def(self, '$system_path', $PathResolver_system_path$14 = function $$system_path(target, start, jail, opts) {
32928
+ 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
32929
 
32817
32930
 
32818
32931
 
@@ -32903,7 +33016,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32903
33016
  $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
32904
33017
  };
32905
33018
  warned = false;
32906
- $send(unresolved_segments, 'each', [], ($$14 = function(segment){var self = $$14.$$s || this, $c;
33019
+ $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this, $c;
32907
33020
 
32908
33021
 
32909
33022
 
@@ -32926,9 +33039,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32926
33039
  }
32927
33040
  } else {
32928
33041
  return resolved_segments['$<<'](segment)
32929
- };}, $$14.$$s = self, $$14.$$arity = 1, $$14));
33042
+ };}, $$15.$$s = self, $$15.$$arity = 1, $$15));
32930
33043
  } else {
32931
- $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this;
33044
+ $send(unresolved_segments, 'each', [], ($$16 = function(segment){var self = $$16.$$s || this;
32932
33045
 
32933
33046
 
32934
33047
 
@@ -32939,7 +33052,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32939
33052
  return resolved_segments.$pop()
32940
33053
  } else {
32941
33054
  return resolved_segments['$<<'](segment)
32942
- };}, $$15.$$s = self, $$15.$$arity = 1, $$15))
33055
+ };}, $$16.$$s = self, $$16.$$arity = 1, $$16))
32943
33056
  };};
32944
33057
  if ($truthy(recheck)) {
32945
33058
 
@@ -32960,10 +33073,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32960
33073
  } else {
32961
33074
  return self.$join_path(resolved_segments, jail_root)
32962
33075
  };
32963
- }, $PathResolver_system_path$13.$$arity = -2);
33076
+ }, $PathResolver_system_path$14.$$arity = -2);
32964
33077
 
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;
33078
+ Opal.def(self, '$web_path', $PathResolver_web_path$17 = function $$web_path(target, start) {
33079
+ var $a, $b, $$18, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
32967
33080
 
32968
33081
 
32969
33082
 
@@ -32982,7 +33095,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32982
33095
  };
32983
33096
  $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
33097
  resolved_segments = [];
32985
- $send(target_segments, 'each', [], ($$17 = function(segment){var self = $$17.$$s || this, $c;
33098
+ $send(target_segments, 'each', [], ($$18 = function(segment){var self = $$18.$$s || this, $c;
32986
33099
 
32987
33100
 
32988
33101
 
@@ -33003,7 +33116,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
33003
33116
  }
33004
33117
  } else {
33005
33118
  return resolved_segments['$<<'](segment)
33006
- };}, $$17.$$s = self, $$17.$$arity = 1, $$17));
33119
+ };}, $$18.$$s = self, $$18.$$arity = 1, $$18));
33007
33120
  if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) {
33008
33121
  resolved_path = resolved_path.$gsub(" ", "%20")};
33009
33122
  if ($truthy(uri_prefix)) {
@@ -33011,9 +33124,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
33011
33124
  } else {
33012
33125
  return resolved_path
33013
33126
  };
33014
- }, $PathResolver_web_path$16.$$arity = -2);
33127
+ }, $PathResolver_web_path$17.$$arity = -2);
33015
33128
  self.$private();
33016
- return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) {
33129
+ return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$19 = function $$extract_uri_prefix(str) {
33017
33130
  var $a, self = this;
33018
33131
 
33019
33132
  if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
@@ -33021,7 +33134,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
33021
33134
  } else {
33022
33135
  return str
33023
33136
  }
33024
- }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
33137
+ }, $PathResolver_extract_uri_prefix$19.$$arity = 1), nil) && 'extract_uri_prefix';
33025
33138
  })($nesting[0], null, $nesting)
33026
33139
  })($nesting[0], $nesting)
33027
33140
  };
@@ -33048,7 +33161,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33048
33161
  }
33049
33162
  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
33163
 
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']);
33164
+ 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
33165
  return (function($base, $parent_nesting) {
33053
33166
  var self = $module($base, 'Asciidoctor');
33054
33167
 
@@ -33193,26 +33306,31 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33193
33306
  }, $Reader_next_line_empty$ques$7.$$arity = 0);
33194
33307
 
33195
33308
  Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) {
33196
- var $a, self = this, line = nil;
33309
+ var $a, $b, self = this, next_line = nil, line = nil;
33197
33310
 
33198
33311
 
33199
33312
 
33200
33313
  if (direct == null) {
33201
33314
  direct = false;
33202
33315
  };
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?']())) {
33316
+ while ($truthy(true)) {
33211
33317
 
33212
- self.look_ahead = 0;
33213
- return nil;
33214
- } else {
33215
- return ($truthy($a = self.$process_line(self.lines['$[]'](-1))) ? $a : self.$peek_line())
33318
+ next_line = self.lines['$[]'](-1);
33319
+ if ($truthy(($truthy($b = direct) ? $b : $rb_gt(self.look_ahead, 0)))) {
33320
+ return (function() {if ($truthy(self.unescape_next_line)) {
33321
+
33322
+ return next_line.$slice(1, next_line.$length());
33323
+ } else {
33324
+ return next_line
33325
+ }; return nil; })()
33326
+ } else if ($truthy(next_line)) {
33327
+ if ($truthy((line = self.$process_line(next_line)))) {
33328
+ return line}
33329
+ } else {
33330
+
33331
+ self.look_ahead = 0;
33332
+ return nil;
33333
+ };
33216
33334
  };
33217
33335
  }, $Reader_peek_line$8.$$arity = -1);
33218
33336
 
@@ -33827,27 +33945,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33827
33945
  };
33828
33946
  self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
33829
33947
  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"))) {
33948
+ ($truthy($a = self.includes['$[]'](path.$slice(0, path.$rindex(".")))) ? $a : (($writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33832
33949
  return nil
33833
33950
  } else {
33834
33951
  return true
33835
- }; return nil; })()];
33836
- $send(self.includes, '[]=', Opal.to_a($writer));
33837
- $writer[$rb_minus($writer["length"], 1)];};
33952
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))};
33838
33953
  } else {
33839
33954
 
33840
33955
  self.dir = ".";
33841
33956
  self.process_lines = true;
33842
33957
  if ($truthy((self.path = path))) {
33843
-
33844
- $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33958
+ ($truthy($a = self.includes['$[]']($$($nesting, 'Helpers').$rootname(path))) ? $a : (($writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33845
33959
  return nil
33846
33960
  } else {
33847
33961
  return true
33848
- }; return nil; })()];
33849
- $send(self.includes, '[]=', Opal.to_a($writer));
33850
- $writer[$rb_minus($writer["length"], 1)];
33962
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
33851
33963
  } else {
33852
33964
  self.path = "<stdin>"
33853
33965
  };
@@ -34229,7 +34341,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34229
34341
  ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})));
34230
34342
  return true;
34231
34343
  } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) {
34232
- return self.$replace_next_line("" + "link:" + (expanded_target) + "[]")
34344
+
34345
+ if ($truthy(expanded_target['$include?'](" "))) {
34346
+ expanded_target = "" + "pass:c[" + (expanded_target) + "]"};
34347
+ return self.$replace_next_line("" + "link:" + (expanded_target) + "[role=include]");
34233
34348
  } else if ($truthy(self.maxdepth)) {
34234
34349
 
34235
34350
  if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) {
@@ -34541,6 +34656,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34541
34656
  self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);};
34542
34657
  } else {
34543
34658
 
34659
+ inc_content = nil;
34660
+
34544
34661
  try {
34545
34662
 
34546
34663
  inc_content = $send(reader, 'call', [inc_path, read_mode], ($$79 = function(f){var self = $$79.$$s || this;
@@ -34552,7 +34669,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34552
34669
  };
34553
34670
  return f.$read();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
34554
34671
  self.$shift();
34555
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
34556
34672
  } catch ($err) {
34557
34673
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
34558
34674
  try {
@@ -34561,7 +34677,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34561
34677
  return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
34562
34678
  } finally { Opal.pop_exception() }
34563
34679
  } else { throw $err; }
34564
- };
34680
+ };;
34681
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
34565
34682
  };
34566
34683
  return true;
34567
34684
  } else {
@@ -34583,7 +34700,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34583
34700
 
34584
34701
  if ($truthy(doc['$attr?']("allow-uri-read"))) {
34585
34702
  } else {
34586
- return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]")
34703
+
34704
+ if ($truthy(target['$include?'](" "))) {
34705
+ target = "" + "pass:c[" + (target) + "]"};
34706
+ return self.$replace_next_line("" + "link:" + (target) + "[role=include]");
34587
34707
  };
34588
34708
  if ($truthy(doc['$attr?']("cache-uri"))) {
34589
34709
  if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) {
@@ -34640,39 +34760,37 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
34640
34760
  }, $PreprocessorReader_split_delimited_value$83.$$arity = 1);
34641
34761
 
34642
34762
  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;
34763
+ var $a, $b, self = this, delim = nil, original_data = nil, front_matter = nil, eof = nil;
34644
34764
 
34645
34765
 
34646
34766
 
34647
34767
  if (increment_linenos == null) {
34648
34768
  increment_linenos = true;
34649
34769
  };
34650
- front_matter = nil;
34651
- if (data['$[]'](0)['$==']("---")) {
34770
+ if ((delim = data['$[]'](0))['$==']("---")) {
34771
+ } else {
34772
+ return nil
34773
+ };
34774
+ original_data = data.$drop(0);
34775
+ data.$shift();
34776
+ front_matter = [];
34777
+ if ($truthy(increment_linenos)) {
34778
+ self.lineno = $rb_plus(self.lineno, 1)};
34779
+ while (!($truthy(($truthy($b = (eof = data['$empty?']())) ? $b : data['$[]'](0)['$=='](delim))))) {
34652
34780
 
34653
- original_data = data.$drop(0);
34654
- data.$shift();
34655
- front_matter = [];
34781
+ front_matter['$<<'](data.$shift());
34656
34782
  if ($truthy(increment_linenos)) {
34657
34783
  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
- };};
34784
+ };
34785
+ if ($truthy(eof)) {
34786
+
34787
+ $send(data, 'unshift', Opal.to_a(original_data));
34788
+ if ($truthy(increment_linenos)) {
34789
+ self.lineno = $rb_minus(self.lineno, original_data.$size())};
34790
+ return nil;};
34791
+ data.$shift();
34792
+ if ($truthy(increment_linenos)) {
34793
+ self.lineno = $rb_plus(self.lineno, 1)};
34676
34794
  return front_matter;
34677
34795
  }, $PreprocessorReader_skip_front_matter$excl$84.$$arity = -2);
34678
34796
  return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$85 = function $$resolve_expr_val(val) {
@@ -36554,7 +36672,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
36554
36672
  return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
36555
36673
  } else {
36556
36674
  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>"
36675
+ }; 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
36676
  };
36559
36677
  }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
36560
36678
  })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
@@ -38122,7 +38240,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38122
38240
 
38123
38241
  return syntax_hl.$format(node, lang, opts);
38124
38242
  } else {
38125
- return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close)
38243
+ return $rb_plus($rb_plus(pre_open, node.$content()), pre_close)
38126
38244
  }; return nil; })()) + "\n" + "</div>\n" + "</div>";
38127
38245
  }, $Html5Converter_convert_listing$26.$$arity = 1);
38128
38246
 
@@ -38254,7 +38372,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
38254
38372
  if ((style = node.$style())['$==']("abstract")) {
38255
38373
  if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) {
38256
38374
 
38257
- self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content.");
38375
+ self.$logger().$warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content.");
38258
38376
  return "";
38259
38377
  } else {
38260
38378
 
@@ -39336,7 +39454,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
39336
39454
  }
39337
39455
  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
39456
 
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']);
39457
+ 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
39458
 
39341
39459
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
39342
39460
  } else {
@@ -40274,9 +40392,9 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40274
40392
  (function($base, $super, $parent_nesting) {
40275
40393
  var self = $klass($base, $super, 'Registry');
40276
40394
 
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;
40395
+ 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
40396
 
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;
40397
+ 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
40398
 
40281
40399
  self.$attr_reader("document");
40282
40400
  self.$attr_reader("groups");
@@ -40290,6 +40408,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40290
40408
  groups = $hash2([], {});
40291
40409
  };
40292
40410
  self.groups = groups;
40411
+ self.$reset();
40293
40412
  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
40413
  return (self.document = nil);
40295
40414
  }, $Registry_initialize$53.$$arity = -1);
@@ -40298,6 +40417,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40298
40417
  var $$55, self = this, ext_groups = nil;
40299
40418
 
40300
40419
 
40420
+ if ($truthy(self.document)) {
40421
+ self.$reset()};
40301
40422
  self.document = document;
40302
40423
  if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) {
40303
40424
  } else {
@@ -40668,7 +40789,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40668
40789
  };
40669
40790
  if ($truthy(processor['$process_block_given?']())) {
40670
40791
  } else {
40671
- self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
40792
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40672
40793
  };
40673
40794
  processor.$freeze();
40674
40795
  extension = $$($nesting, 'ProcessorExtension').$new(kind, processor);
@@ -40738,11 +40859,11 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40738
40859
  };
40739
40860
  if ($truthy((name = self.$as_symbol(processor.$name())))) {
40740
40861
  } else {
40741
- self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location()))
40862
+ self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40742
40863
  };
40743
40864
  if ($truthy(processor['$process_block_given?']())) {
40744
40865
  } else {
40745
- self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
40866
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
40746
40867
  };
40747
40868
  processor.$freeze();
40748
40869
 
@@ -40795,7 +40916,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40795
40916
  };
40796
40917
  }, $Registry_add_syntax_processor$89.$$arity = 2);
40797
40918
 
40798
- Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) {
40919
+ Opal.def(self, '$reset', $Registry_reset$91 = function $$reset() {
40920
+ var self = this;
40921
+
40922
+
40923
+ 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)))))));
40924
+ return (self.document = nil);
40925
+ }, $Registry_reset$91.$$arity = 0);
40926
+
40927
+ Opal.def(self, '$resolve_args', $Registry_resolve_args$92 = function $$resolve_args(args, expect) {
40799
40928
  var self = this, opts = nil, missing = nil;
40800
40929
 
40801
40930
 
@@ -40812,8 +40941,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40812
40941
  args.$pop(missing['$-@']())};
40813
40942
  args['$<<'](opts);
40814
40943
  return args;
40815
- }, $Registry_resolve_args$91.$$arity = 2);
40816
- return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) {
40944
+ }, $Registry_resolve_args$92.$$arity = 2);
40945
+ return (Opal.def(self, '$as_symbol', $Registry_as_symbol$93 = function $$as_symbol(name) {
40817
40946
  var self = this;
40818
40947
 
40819
40948
  if ($truthy(name)) {
@@ -40821,42 +40950,42 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40821
40950
  } else {
40822
40951
  return nil
40823
40952
  }
40824
- }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol';
40953
+ }, $Registry_as_symbol$93.$$arity = 1), nil) && 'as_symbol';
40825
40954
  })($nesting[0], null, $nesting);
40826
40955
  (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;
40956
+ 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
40957
 
40829
40958
 
40830
40959
 
40831
- Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() {
40960
+ Opal.def(self, '$generate_name', $generate_name$94 = function $$generate_name() {
40832
40961
  var self = this;
40833
40962
 
40834
40963
  return "" + "extgrp" + (self.$next_auto_id())
40835
- }, $generate_name$93.$$arity = 0);
40964
+ }, $generate_name$94.$$arity = 0);
40836
40965
 
40837
- Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() {
40966
+ Opal.def(self, '$next_auto_id', $next_auto_id$95 = function $$next_auto_id() {
40838
40967
  var $a, self = this;
40839
40968
  if (self.auto_id == null) self.auto_id = nil;
40840
40969
 
40841
40970
 
40842
40971
  self.auto_id = ($truthy($a = self.auto_id) ? $a : -1);
40843
40972
  return (self.auto_id = $rb_plus(self.auto_id, 1));
40844
- }, $next_auto_id$94.$$arity = 0);
40973
+ }, $next_auto_id$95.$$arity = 0);
40845
40974
 
40846
- Opal.def(self, '$groups', $groups$95 = function $$groups() {
40975
+ Opal.def(self, '$groups', $groups$96 = function $$groups() {
40847
40976
  var $a, self = this;
40848
40977
  if (self.groups == null) self.groups = nil;
40849
40978
 
40850
40979
  return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {})))
40851
- }, $groups$95.$$arity = 0);
40980
+ }, $groups$96.$$arity = 0);
40852
40981
 
40853
- Opal.def(self, '$create', $create$96 = function $$create(name) {
40854
- var $iter = $create$96.$$p, block = $iter || nil, $a, self = this;
40982
+ Opal.def(self, '$create', $create$97 = function $$create(name) {
40983
+ var $iter = $create$97.$$p, block = $iter || nil, $a, self = this;
40855
40984
 
40856
- if ($iter) $create$96.$$p = null;
40985
+ if ($iter) $create$97.$$p = null;
40857
40986
 
40858
40987
 
40859
- if ($iter) $create$96.$$p = null;;
40988
+ if ($iter) $create$97.$$p = null;;
40860
40989
 
40861
40990
  if (name == null) {
40862
40991
  name = nil;
@@ -40866,15 +40995,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40866
40995
  } else {
40867
40996
  return $$($nesting, 'Registry').$new()
40868
40997
  };
40869
- }, $create$96.$$arity = -1);
40998
+ }, $create$97.$$arity = -1);
40870
40999
 
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;
41000
+ Opal.def(self, '$register', $register$98 = function $$register($a) {
41001
+ 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
41002
 
40874
- if ($iter) $register$97.$$p = null;
41003
+ if ($iter) $register$98.$$p = null;
40875
41004
 
40876
41005
 
40877
- if ($iter) $register$97.$$p = null;;
41006
+ if ($iter) $register$98.$$p = null;;
40878
41007
 
40879
41008
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
40880
41009
 
@@ -40896,34 +41025,37 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
40896
41025
  $writer = [name.$to_sym(), resolved_group];
40897
41026
  $send(self.$groups(), '[]=', Opal.to_a($writer));
40898
41027
  return $writer[$rb_minus($writer["length"], 1)];;
40899
- }, $register$97.$$arity = -1);
41028
+ }, $register$98.$$arity = -1);
40900
41029
 
40901
- Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() {
41030
+ Opal.def(self, '$unregister_all', $unregister_all$99 = function $$unregister_all() {
40902
41031
  var self = this;
40903
41032
 
40904
41033
 
40905
41034
  self.groups = $hash2([], {});
40906
41035
  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;
41036
+ }, $unregister_all$99.$$arity = 0);
41037
+ return (Opal.def(self, '$unregister', $unregister$100 = function $$unregister($a) {
41038
+ var $post_args, names, $$101, self = this;
40910
41039
 
40911
41040
 
40912
41041
 
40913
41042
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
40914
41043
 
40915
41044
  names = $post_args;;
40916
- $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this;
40917
- if (self.groups == null) self.groups = nil;
41045
+ $send(names, 'each_with_object', [self.$groups()], ($$101 = function(group, catalog){var self = $$101.$$s || this;
40918
41046
 
40919
41047
 
40920
41048
 
40921
41049
  if (group == null) {
40922
41050
  group = nil;
40923
41051
  };
40924
- return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100));
41052
+
41053
+ if (catalog == null) {
41054
+ catalog = nil;
41055
+ };
41056
+ return catalog.$delete(group.$to_sym());}, $$101.$$s = self, $$101.$$arity = 2, $$101));
40925
41057
  return nil;
40926
- }, $unregister$99.$$arity = -1), nil) && 'unregister';
41058
+ }, $unregister$100.$$arity = -1), nil) && 'unregister';
40927
41059
  })(Opal.get_singleton_class(self), $nesting);
40928
41060
  })($nesting[0], $nesting)
40929
41061
  })($nesting[0], $nesting);
@@ -41279,7 +41411,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
41279
41411
  self.$require("asciidoctor/converter/html5");
41280
41412
  self.$require("asciidoctor/extensions");
41281
41413
  self.$require("asciidoctor/js/asciidoctor_ext");
41282
- return self.$require("asciidoctor/js/opal_ext/logger");
41414
+ self.$require("asciidoctor/js/opal_ext/logger");
41415
+ 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
41416
  };
41284
41417
 
41285
41418
  /* Generated by Opal 0.11.99.dev */
@@ -41414,13 +41547,13 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
41414
41547
  Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
41415
41548
  return "r"
41416
41549
  } else {
41417
- return "rb:utf-8:utf-8"
41550
+ return "rb:UTF-8:UTF-8"
41418
41551
  }; return nil; })());
41419
41552
  Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE'));
41420
41553
  Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
41421
41554
  return "w"
41422
41555
  } else {
41423
- return "w:utf-8"
41556
+ return "wb:UTF-8"
41424
41557
  }; return nil; })());
41425
41558
  Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article");
41426
41559
  Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5");
@@ -46906,7 +47039,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
46906
47039
  }
46907
47040
 
46908
47041
 
46909
- var ASCIIDOCTOR_JS_VERSION = '2.2.6';
47042
+ var ASCIIDOCTOR_JS_VERSION = '2.2.7';
46910
47043
 
46911
47044
  /**
46912
47045
  * Get Asciidoctor.js version number.