@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.
@@ -1295,6 +1295,30 @@ Opal.modules["asciidoctor/js/opal_ext/string"] = function(Opal) {
1295
1295
  })($nesting[0], null, $nesting)
1296
1296
  };
1297
1297
 
1298
+ /* Generated by Opal 0.11.99.dev */
1299
+ Opal.modules["asciidoctor/js/opal_ext/array"] = function(Opal) {
1300
+ 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;
1301
+
1302
+ Opal.add_stubs(['$==', '$strict_encode64', '$_original_pack']);
1303
+ return (function($base, $super, $parent_nesting) {
1304
+ var self = $klass($base, $super, 'Array');
1305
+
1306
+ var $nesting = [self].concat($parent_nesting), $Array_pack$1;
1307
+
1308
+
1309
+ Opal.alias(self, "_original_pack", "pack");
1310
+ return (Opal.def(self, '$pack', $Array_pack$1 = function $$pack(format) {
1311
+ var self = this;
1312
+
1313
+ if (format['$==']("m0")) {
1314
+ return $$$('::', 'Base64').$strict_encode64(self)
1315
+ } else {
1316
+ return self.$_original_pack(self)
1317
+ }
1318
+ }, $Array_pack$1.$$arity = 1), nil) && 'pack';
1319
+ })($nesting[0], null, $nesting)
1320
+ };
1321
+
1298
1322
  /* Generated by Opal 0.11.99.dev */
1299
1323
  Opal.modules["asciidoctor/js/opal_ext/uri"] = function(Opal) {
1300
1324
  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;
@@ -1434,6 +1458,7 @@ Opal.modules["asciidoctor/js/opal_ext"] = function(Opal) {
1434
1458
  self.$require("asciidoctor/js/opal_ext/file");
1435
1459
  self.$require("asciidoctor/js/opal_ext/match_data");
1436
1460
  self.$require("asciidoctor/js/opal_ext/string");
1461
+ self.$require("asciidoctor/js/opal_ext/array");
1437
1462
  self.$require("asciidoctor/js/opal_ext/uri");
1438
1463
  self.$require("asciidoctor/js/opal_ext/base64");
1439
1464
  self.$require("asciidoctor/js/opal_ext/number");
@@ -2043,7 +2068,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2043
2068
  }
2044
2069
  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;
2045
2070
 
2046
- 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']);
2071
+ 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']);
2047
2072
  return (function($base, $parent_nesting) {
2048
2073
  var self = $module($base, 'Asciidoctor');
2049
2074
 
@@ -2052,7 +2077,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2052
2077
  (function($base, $parent_nesting) {
2053
2078
  var self = $module($base, 'Helpers');
2054
2079
 
2055
- 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;
2080
+ 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;
2056
2081
 
2057
2082
 
2058
2083
  self.$module_function();
@@ -2281,15 +2306,24 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2281
2306
  return lines['$<<'](line.$chomp());}, $$15.$$s = self, $$15.$$arity = 1, $$15));}, $$14.$$s = self, $$14.$$arity = 1, $$14))
2282
2307
  };
2283
2308
  }, $Helpers_prepare_source_string$11.$$arity = -2);
2284
-
2285
- Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) {
2286
- var $a, self = this;
2309
+ if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
2310
+
2311
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$16 = function(str) {
2312
+ var $a, $b, self = this;
2313
+
2314
+ return ($truthy($a = ($truthy($b = str['$include?'](":")) ? str['$start_with?']("uri:classloader:")['$!']() : $b)) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
2315
+ }, $Helpers_uriish$ques$16.$$arity = 1)
2316
+ } else {
2317
+
2318
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$17 = function(str) {
2319
+ var $a, self = this;
2287
2320
 
2288
- return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
2289
- }, $Helpers_uriish$ques$16.$$arity = 1);
2321
+ return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
2322
+ }, $Helpers_uriish$ques$17.$$arity = 1)
2323
+ };
2290
2324
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
2291
2325
 
2292
- Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$17 = function $$encode_uri_component(str) {
2326
+ Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$18 = function $$encode_uri_component(str) {
2293
2327
  var self = this;
2294
2328
 
2295
2329
 
@@ -2297,12 +2331,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2297
2331
  return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16)
2298
2332
  })
2299
2333
 
2300
- }, $Helpers_encode_uri_component$17.$$arity = 1)
2334
+ }, $Helpers_encode_uri_component$18.$$arity = 1)
2301
2335
  } else {
2302
2336
  nil
2303
2337
  };
2304
2338
 
2305
- Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$18 = function $$encode_spaces_in_uri(str) {
2339
+ Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$19 = function $$encode_spaces_in_uri(str) {
2306
2340
  var self = this;
2307
2341
 
2308
2342
  if ($truthy(str['$include?'](" "))) {
@@ -2311,9 +2345,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2311
2345
  } else {
2312
2346
  return str
2313
2347
  }
2314
- }, $Helpers_encode_spaces_in_uri$18.$$arity = 1);
2348
+ }, $Helpers_encode_spaces_in_uri$19.$$arity = 1);
2315
2349
 
2316
- Opal.def(self, '$rootname', $Helpers_rootname$19 = function $$rootname(filename) {
2350
+ Opal.def(self, '$rootname', $Helpers_rootname$20 = function $$rootname(filename) {
2317
2351
  var self = this, last_dot_idx = nil;
2318
2352
 
2319
2353
  if ($truthy((last_dot_idx = filename.$rindex(".")))) {
@@ -2326,9 +2360,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2326
2360
  } else {
2327
2361
  return filename
2328
2362
  }
2329
- }, $Helpers_rootname$19.$$arity = 1);
2363
+ }, $Helpers_rootname$20.$$arity = 1);
2330
2364
 
2331
- Opal.def(self, '$basename', $Helpers_basename$20 = function $$basename(filename, drop_ext) {
2365
+ Opal.def(self, '$basename', $Helpers_basename$21 = function $$basename(filename, drop_ext) {
2332
2366
  var self = this;
2333
2367
 
2334
2368
 
@@ -2346,16 +2380,16 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2346
2380
  } else {
2347
2381
  return $$$('::', 'File').$basename(filename)
2348
2382
  };
2349
- }, $Helpers_basename$20.$$arity = -2);
2383
+ }, $Helpers_basename$21.$$arity = -2);
2350
2384
 
2351
- Opal.def(self, '$extname?', $Helpers_extname$ques$21 = function(path) {
2385
+ Opal.def(self, '$extname?', $Helpers_extname$ques$22 = function(path) {
2352
2386
  var $a, self = this, last_dot_idx = nil;
2353
2387
 
2354
2388
  return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a)
2355
- }, $Helpers_extname$ques$21.$$arity = 1);
2389
+ }, $Helpers_extname$ques$22.$$arity = 1);
2356
2390
  if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) {
2357
2391
 
2358
- Opal.def(self, '$extname', $Helpers_extname$22 = function $$extname(path, fallback) {
2392
+ Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) {
2359
2393
  var $a, self = this, last_dot_idx = nil;
2360
2394
 
2361
2395
 
@@ -2373,10 +2407,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2373
2407
  } else {
2374
2408
  return fallback
2375
2409
  };
2376
- }, $Helpers_extname$22.$$arity = -2)
2410
+ }, $Helpers_extname$23.$$arity = -2)
2377
2411
  } else {
2378
2412
 
2379
- Opal.def(self, '$extname', $Helpers_extname$23 = function $$extname(path, fallback) {
2413
+ Opal.def(self, '$extname', $Helpers_extname$24 = function $$extname(path, fallback) {
2380
2414
  var self = this, last_dot_idx = nil;
2381
2415
 
2382
2416
 
@@ -2394,10 +2428,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2394
2428
  } else {
2395
2429
  return fallback
2396
2430
  };
2397
- }, $Helpers_extname$23.$$arity = -2)
2431
+ }, $Helpers_extname$24.$$arity = -2)
2398
2432
  };
2399
2433
 
2400
- Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$24 = function $$mkdir_p(dir) {
2434
+ Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$25 = function $$mkdir_p(dir) {
2401
2435
  var self = this, parent_dir = nil;
2402
2436
 
2403
2437
  if ($truthy($$$('::', 'File')['$directory?'](dir))) {
@@ -2423,14 +2457,14 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2423
2457
  } else { throw $err; }
2424
2458
  };;
2425
2459
  }
2426
- }, $Helpers_mkdir_p$24.$$arity = 1);
2460
+ }, $Helpers_mkdir_p$25.$$arity = 1);
2427
2461
  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}));
2428
2462
  self.$private_constant("ROMAN_NUMERALS");
2429
2463
 
2430
- Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$25 = function $$int_to_roman(val) {
2431
- var $$26, self = this;
2464
+ Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$26 = function $$int_to_roman(val) {
2465
+ var $$27, self = this;
2432
2466
 
2433
- return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$26 = function(l, i){var self = $$26.$$s || this, $a, $b, repeat = nil;
2467
+ return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$27 = function(l, i){var self = $$27.$$s || this, $a, $b, repeat = nil;
2434
2468
 
2435
2469
 
2436
2470
 
@@ -2442,10 +2476,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2442
2476
  i = nil;
2443
2477
  };
2444
2478
  $b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b;
2445
- return $rb_times(l, repeat);}, $$26.$$s = self, $$26.$$arity = 2, $$26)).$join()
2446
- }, $Helpers_int_to_roman$25.$$arity = 1);
2479
+ return $rb_times(l, repeat);}, $$27.$$s = self, $$27.$$arity = 2, $$27)).$join()
2480
+ }, $Helpers_int_to_roman$26.$$arity = 1);
2447
2481
 
2448
- Opal.def(self, '$nextval', $Helpers_nextval$27 = function $$nextval(current) {
2482
+ Opal.def(self, '$nextval', $Helpers_nextval$28 = function $$nextval(current) {
2449
2483
  var self = this, intval = nil;
2450
2484
 
2451
2485
  if ($truthy($$$('::', 'Integer')['$==='](current))) {
@@ -2455,9 +2489,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2455
2489
  } else {
2456
2490
  return current.$succ()
2457
2491
  }
2458
- }, $Helpers_nextval$27.$$arity = 1);
2492
+ }, $Helpers_nextval$28.$$arity = 1);
2459
2493
 
2460
- Opal.def(self, '$resolve_class', $Helpers_resolve_class$28 = function $$resolve_class(object) {
2494
+ Opal.def(self, '$resolve_class', $Helpers_resolve_class$29 = function $$resolve_class(object) {
2461
2495
  var self = this;
2462
2496
 
2463
2497
  if ($truthy($$$('::', 'Class')['$==='](object))) {
@@ -2471,9 +2505,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2471
2505
  return nil
2472
2506
  };
2473
2507
  }
2474
- }, $Helpers_resolve_class$28.$$arity = 1);
2508
+ }, $Helpers_resolve_class$29.$$arity = 1);
2475
2509
 
2476
- Opal.def(self, '$class_for_name', $Helpers_class_for_name$29 = function $$class_for_name(qualified_name) {
2510
+ Opal.def(self, '$class_for_name', $Helpers_class_for_name$30 = function $$class_for_name(qualified_name) {
2477
2511
  var self = this, resolved = nil;
2478
2512
 
2479
2513
  try {
@@ -2490,7 +2524,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
2490
2524
  } finally { Opal.pop_exception() }
2491
2525
  } else { throw $err; }
2492
2526
  }
2493
- }, $Helpers_class_for_name$29.$$arity = 1);
2527
+ }, $Helpers_class_for_name$30.$$arity = 1);
2494
2528
  })($nesting[0], $nesting)
2495
2529
  })($nesting[0], $nesting)
2496
2530
  };
@@ -2860,9 +2894,11 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
2860
2894
  self.$attr_reader("messages");
2861
2895
 
2862
2896
  Opal.def(self, '$initialize', $MemoryLogger_initialize$6 = function $$initialize() {
2863
- var self = this, $writer = nil;
2897
+ var $iter = $MemoryLogger_initialize$6.$$p, $yield = $iter || nil, self = this, $writer = nil;
2864
2898
 
2899
+ if ($iter) $MemoryLogger_initialize$6.$$p = null;
2865
2900
 
2901
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $MemoryLogger_initialize$6, false), [nil], null);
2866
2902
 
2867
2903
  $writer = [$$($nesting, 'WARN')];
2868
2904
  $send(self, 'level=', Opal.to_a($writer));
@@ -2930,12 +2966,15 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
2930
2966
  self.$attr_reader("max_severity");
2931
2967
 
2932
2968
  Opal.def(self, '$initialize', $NullLogger_initialize$12 = function $$initialize() {
2933
- var self = this, $writer = nil;
2969
+ var $iter = $NullLogger_initialize$12.$$p, $yield = $iter || nil, self = this, $writer = nil;
2934
2970
 
2971
+ if ($iter) $NullLogger_initialize$12.$$p = null;
2972
+
2973
+ $send(self, Opal.find_super_dispatcher(self, 'initialize', $NullLogger_initialize$12, false), [nil], null);
2935
2974
 
2936
2975
  $writer = [$$($nesting, 'WARN')];
2937
2976
  $send(self, 'level=', Opal.to_a($writer));
2938
- return $writer[$rb_minus($writer["length"], 1)];
2977
+ return $writer[$rb_minus($writer["length"], 1)];;
2939
2978
  }, $NullLogger_initialize$12.$$arity = 0);
2940
2979
  return (Opal.def(self, '$add', $NullLogger_add$13 = function $$add(severity, message, progname) {
2941
2980
  var $a, self = this;
@@ -3064,7 +3103,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
3064
3103
  Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
3065
3104
  Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
3066
3105
  Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
3067
- Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
3106
+ Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\s\\[](?:[^\\[]*[^\\s\\[])?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
3068
3107
  Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
3069
3108
  Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
3070
3109
  Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]"));
@@ -3150,14 +3189,13 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
3150
3189
  Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
3151
3190
  Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
3152
3191
  Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
3153
- Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
3192
+ 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'));
3154
3193
  Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
3155
3194
  Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
3156
3195
  Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
3157
3196
  Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
3158
3197
  Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""));
3159
- 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')]));
3160
- Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
3198
+ 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')]));
3161
3199
  Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
3162
3200
  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'));
3163
3201
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
@@ -3173,7 +3211,11 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
3173
3211
  Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
3174
3212
  Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
3175
3213
  Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
3176
- Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
3214
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
3215
+ Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"))
3216
+ } else {
3217
+ nil
3218
+ };
3177
3219
  Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
3178
3220
  })($nesting[0], $nesting)
3179
3221
  };
@@ -3197,7 +3239,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
3197
3239
  }
3198
3240
  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;
3199
3241
 
3200
- 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']);
3242
+ 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']);
3201
3243
  return (function($base, $parent_nesting) {
3202
3244
  var self = $module($base, 'Asciidoctor');
3203
3245
 
@@ -3206,7 +3248,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
3206
3248
  (function($base, $parent_nesting) {
3207
3249
  var self = $module($base, 'Substitutors');
3208
3250
 
3209
- 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;
3251
+ 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;
3210
3252
 
3211
3253
 
3212
3254
  Opal.const_set($nesting[0], 'SpecialCharsRx', /[<&>]/);
@@ -3702,7 +3744,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
3702
3744
  ($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)]));
3703
3745
  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))};
3704
3746
  if ($truthy(($truthy($a = ($truthy($b = text['$include?']("((")) ? text['$include?']("))") : $b)) ? $a : ($truthy($b = found_macroish_short) ? text['$include?']("dexterm") : $b)))) {
3705
- 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;
3747
+ 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;
3706
3748
 
3707
3749
  return (function() {$case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
3708
3750
  if ("indexterm"['$===']($case)) {
@@ -3711,8 +3753,14 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
3711
3753
  if ($truthy((attrlist = self.$normalize_text((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), true, true))['$include?']("="))) {
3712
3754
  if ($truthy((primary = (attrs = $$($nesting, 'AttributeList').$new(attrlist, self).$parse())['$[]'](1)))) {
3713
3755
 
3756
+ terms = [primary];
3757
+ if ($truthy((secondary = attrs['$[]'](2)))) {
3758
+
3759
+ terms['$<<'](secondary);
3760
+ if ($truthy((tertiary = attrs['$[]'](3)))) {
3761
+ terms['$<<'](tertiary)};};
3714
3762
 
3715
- $writer = ["terms", [primary]];
3763
+ $writer = ["terms", terms];
3716
3764
  $send(attrs, '[]=', Opal.to_a($writer));
3717
3765
  $writer[$rb_minus($writer["length"], 1)];;
3718
3766
  if ($truthy((see_also = attrs['$[]']("see-also")))) {
@@ -3825,78 +3873,93 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
3825
3873
  return subbed_term
3826
3874
  };}})()}, $$31.$$s = self, $$31.$$arity = 0, $$31))};
3827
3875
  if ($truthy(($truthy($a = found_colon) ? text['$include?']("://") : $a))) {
3828
- 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;
3876
+ 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;
3829
3877
 
3830
-
3831
- if ($truthy((target = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2)))['$start_with?']($$($nesting, 'RS')))) {
3832
- return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + (target.$slice(1, target.$length())) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)));};
3833
- $c = [(($d = $gvars['~']) === nil ? nil : $d['$[]'](1)), ""], (prefix = $c[0]), (suffix = $c[1]), $c;
3834
- if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) {
3878
+ if ($truthy(($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](2))) ? (($d = $gvars['~']) === nil ? nil : $d['$[]'](5))['$!']() : $c))) {
3835
3879
 
3836
- if (prefix['$==']("link:")) {
3837
- prefix = ""};
3838
- if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))['$empty?']())) {
3839
- link_text = nil};
3880
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$start_with?']($$($nesting, 'RS')))) {
3881
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());};
3882
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
3883
+ 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()));};
3884
+ target = $rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](6)));
3885
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
3886
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
3887
+ doc.$register("links", target);
3888
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
3889
+
3890
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
3891
+ } else {
3892
+ return target
3893
+ }; return nil; })();
3894
+ return $$($nesting, 'Inline').$new(self, "anchor", link_text, $hash2(["type", "target", "attributes"], {"type": "link", "target": target, "attributes": $hash2(["role"], {"role": "bare"})})).$convert();
3840
3895
  } else {
3841
3896
 
3842
- $case = prefix;
3843
- if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
3844
- $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3));
3845
- if (")"['$===']($case) || "?"['$===']($case) || "!"['$===']($case)) {
3846
- target = target.$chop();
3847
- if ($truthy((($c = (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")) ? target['$end_with?'](".", "?", "!") : (suffix = (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)))['$=='](")")))) {
3897
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
3898
+ 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()));};
3899
+ $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;
3900
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
3848
3901
 
3849
- suffix = $rb_plus(target['$[]'](-1), suffix);
3850
- target = target.$chop();};
3851
- if ($truthy(target['$end_with?']("://"))) {
3852
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
3853
- else if (";"['$===']($case)) {
3854
- if ($truthy(($truthy($c = prefix['$start_with?']("&lt;")) ? target['$end_with?']("&gt;") : $c))) {
3855
-
3856
- prefix = prefix.$slice(4, prefix.$length());
3857
- target = target.$slice(0, $rb_minus(target.$length(), 4));
3858
- } else if ($truthy((target = target.$chop())['$end_with?'](")"))) {
3859
-
3860
- target = target.$chop();
3861
- suffix = ");";
3902
+ if (prefix['$==']("link:")) {
3903
+ prefix = ""};
3904
+ if ($truthy((link_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))['$empty?']())) {
3905
+ link_text = nil};
3862
3906
  } else {
3863
- suffix = ";"
3864
- };
3865
- if ($truthy(target['$end_with?']("://"))) {
3866
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
3867
- else if (":"['$===']($case)) {
3868
- if ($truthy((target = target.$chop())['$end_with?'](")"))) {
3869
3907
 
3870
- target = target.$chop();
3871
- suffix = "):";
3872
- } else {
3873
- suffix = ":"
3908
+ $case = prefix;
3909
+ if ("link:"['$===']($case) || "\""['$===']($case) || "'"['$===']($case)) {return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};
3910
+ $case = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
3911
+ if (";"['$===']($case)) {
3912
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
3913
+
3914
+ target = target.$chop();
3915
+ suffix = ");";
3916
+ } else {
3917
+ suffix = ";"
3918
+ };
3919
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
3920
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};}
3921
+ else if (":"['$===']($case)) {
3922
+ if ($truthy((target = target.$chop())['$end_with?'](")"))) {
3923
+
3924
+ target = target.$chop();
3925
+ suffix = "):";
3926
+ } else {
3927
+ suffix = ":"
3928
+ };
3929
+ if (target['$==']((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))) {
3930
+ return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
3874
3931
  };
3875
- if ($truthy(target['$end_with?']("://"))) {
3876
- return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));};};
3877
- };
3878
- $c = [nil, $hash2(["type"], {"type": "link"})], (attrs = $c[0]), (link_opts = $c[1]), $c;
3879
- if ($truthy(link_text)) {
3880
-
3881
- if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
3882
- new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
3883
- if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
3884
-
3885
- $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;
3886
- new_link_text = link_text;
3887
-
3888
- $writer = ["id", attrs['$[]']("id")];
3889
- $send(link_opts, '[]=', Opal.to_a($writer));
3890
- $writer[$rb_minus($writer["length"], 1)];;};
3891
- if ($truthy(link_text['$end_with?']("^"))) {
3932
+ link_opts = $hash2(["type"], {"type": "link"});
3933
+ if ($truthy(link_text)) {
3892
3934
 
3893
- new_link_text = (link_text = link_text.$chop());
3894
- if ($truthy(attrs)) {
3895
- ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
3896
- } else {
3897
- attrs = $hash2(["window"], {"window": "_blank"})
3898
- };};
3899
- if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
3935
+ if ($truthy(link_text['$include?']($$($nesting, 'R_SB')))) {
3936
+ new_link_text = (link_text = link_text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB')))};
3937
+ if ($truthy(($truthy($c = doc.$compat_mode()['$!']()) ? link_text['$include?']("=") : $c))) {
3938
+
3939
+ $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;
3940
+ new_link_text = link_text;
3941
+
3942
+ $writer = ["id", attrs['$[]']("id")];
3943
+ $send(link_opts, '[]=', Opal.to_a($writer));
3944
+ $writer[$rb_minus($writer["length"], 1)];;};
3945
+ if ($truthy(link_text['$end_with?']("^"))) {
3946
+
3947
+ new_link_text = (link_text = link_text.$chop());
3948
+ if ($truthy(attrs)) {
3949
+ ($truthy($c = attrs['$[]']("window")) ? $c : (($writer = ["window", "_blank"]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
3950
+ } else {
3951
+ attrs = $hash2(["window"], {"window": "_blank"})
3952
+ };};
3953
+ if ($truthy(($truthy($c = new_link_text) ? new_link_text['$empty?']() : $c))) {
3954
+
3955
+ link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
3956
+
3957
+ return target.$sub($$($nesting, 'UriSniffRx'), "");
3958
+ } else {
3959
+ return target
3960
+ }; return nil; })();
3961
+ bare = true;};
3962
+ } else {
3900
3963
 
3901
3964
  link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
3902
3965
 
@@ -3904,37 +3967,29 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
3904
3967
  } else {
3905
3968
  return target
3906
3969
  }; return nil; })();
3907
- bare = true;};
3908
- } else {
3909
-
3910
- link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
3911
-
3912
- return target.$sub($$($nesting, 'UriSniffRx'), "");
3913
- } else {
3914
- return target
3915
- }; return nil; })();
3916
- bare = true;
3917
- };
3918
- if ($truthy(bare)) {
3970
+ bare = true;
3971
+ };
3972
+ if ($truthy(bare)) {
3973
+ if ($truthy(attrs)) {
3974
+
3975
+ $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
3976
+ return "" + "bare " + (attrs['$[]']("role"))
3977
+ } else {
3978
+ return "bare"
3979
+ }; return nil; })()];
3980
+ $send(attrs, '[]=', Opal.to_a($writer));
3981
+ $writer[$rb_minus($writer["length"], 1)];
3982
+ } else {
3983
+ attrs = $hash2(["role"], {"role": "bare"})
3984
+ }};
3985
+ doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
3919
3986
  if ($truthy(attrs)) {
3920
3987
 
3921
- $writer = ["role", (function() {if ($truthy(attrs['$key?']("role"))) {
3922
- return "" + "bare " + (attrs['$[]']("role"))
3923
- } else {
3924
- return "bare"
3925
- }; return nil; })()];
3926
- $send(attrs, '[]=', Opal.to_a($writer));
3927
- $writer[$rb_minus($writer["length"], 1)];
3928
- } else {
3929
- attrs = $hash2(["role"], {"role": "bare"})
3930
- }};
3931
- doc.$register("links", (($writer = ["target", target]), $send(link_opts, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
3932
- if ($truthy(attrs)) {
3933
-
3934
- $writer = ["attributes", attrs];
3935
- $send(link_opts, '[]=', Opal.to_a($writer));
3936
- $writer[$rb_minus($writer["length"], 1)];};
3937
- return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
3988
+ $writer = ["attributes", attrs];
3989
+ $send(link_opts, '[]=', Opal.to_a($writer));
3990
+ $writer[$rb_minus($writer["length"], 1)];};
3991
+ return "" + (prefix) + ($$($nesting, 'Inline').$new(self, "anchor", link_text, link_opts).$convert()) + (suffix);
3992
+ }}, $$34.$$s = self, $$34.$$arity = 0, $$34))};
3938
3993
  if ($truthy(($truthy($a = found_macroish) ? ($truthy($b = text['$include?']("link:")) ? $b : text['$include?']("ilto:")) : $a))) {
3939
3994
  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;
3940
3995
 
@@ -4072,7 +4127,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
4072
4127
  };
4073
4128
  if ($truthy(doc.$compat_mode())) {
4074
4129
  fragment = refid
4075
- } else if ($truthy((hash_idx = refid.$index("#")))) {
4130
+ } else if ($truthy(($truthy($c = (hash_idx = refid.$index("#"))) ? refid['$[]']($rb_minus(hash_idx, 1))['$!=']("&") : $c))) {
4076
4131
  if ($truthy($rb_gt(hash_idx, 0))) {
4077
4132
 
4078
4133
  if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
@@ -4423,13 +4478,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
4423
4478
  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);
4424
4479
  } else if ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))['$==']($$($nesting, 'RS'))) {
4425
4480
  preceding = "" + "[" + (attrlist) + "]"
4426
- } else {
4427
-
4428
- if ($truthy((($c = boundary['$==']("++")) ? attrlist['$end_with?']("x-") : boundary['$==']("++")))) {
4481
+ } else if (boundary['$==']("++")) {
4482
+ if (attrlist['$==']("x-")) {
4483
+
4484
+ old_behavior = true;
4485
+ attributes = $hash2([], {});
4486
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
4429
4487
 
4430
4488
  old_behavior = true;
4431
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));};
4432
- attributes = self.$parse_quoted_text_attributes(attrlist);
4489
+ attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
4490
+ } else {
4491
+ attributes = self.$parse_quoted_text_attributes(attrlist)
4492
+ }
4493
+ } else {
4494
+ attributes = self.$parse_quoted_text_attributes(attrlist)
4433
4495
  }
4434
4496
  } else if ($truthy($rb_gt((escape_count = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)).$length()), 0))) {
4435
4497
  return "" + ($rb_times($$($nesting, 'RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](5))) + (boundary);};
@@ -4475,33 +4537,42 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
4475
4537
  return "" + (($truthy($c = preceding) ? $c : "")) + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END'));}, $$53.$$s = self, $$53.$$arity = 0, $$53))};
4476
4538
  $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;
4477
4539
  if ($truthy(($truthy($a = text['$include?'](pass_inline_char1)) ? $a : ($truthy($b = pass_inline_char2) ? text['$include?'](pass_inline_char2) : $b)))) {
4478
- 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;
4540
+ 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;
4479
4541
 
4480
4542
 
4481
4543
  preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
4482
- attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2));
4483
- if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$($nesting, 'RS')))) {
4484
- escape_mark = $$($nesting, 'RS')};
4485
- format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
4486
- content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5));
4544
+ attrlist = ($truthy($c = (($d = $gvars['~']) === nil ? nil : $d['$[]'](4))) ? $c : (($d = $gvars['~']) === nil ? nil : $d['$[]'](3)));
4545
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
4546
+ escaped = true};
4547
+ quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
4548
+ format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
4549
+ content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
4487
4550
  if ($truthy(compat_mode)) {
4488
4551
  old_behavior = true
4489
- } else if ($truthy((old_behavior = ($truthy($c = attrlist) ? attrlist['$end_with?']("x-") : $c)))) {
4490
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))};
4552
+ } else if ($truthy(($truthy($c = attrlist) ? ($truthy($d = attrlist['$==']("x-")) ? $d : attrlist['$end_with?'](" x-")) : $c))) {
4553
+ old_behavior = (old_behavior_forced = true)};
4491
4554
  if ($truthy(attrlist)) {
4492
- if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) {
4493
- return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark));
4494
- } else if ($truthy(escape_mark)) {
4555
+ if ($truthy(escaped)) {
4495
4556
  return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()));
4496
4557
  } else if (preceding['$==']($$($nesting, 'RS'))) {
4497
- preceding = "" + "[" + (attrlist) + "]"
4558
+
4559
+ if ($truthy(($truthy($c = old_behavior_forced) ? format_mark['$==']("`") : $c))) {
4560
+ return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text);};
4561
+ preceding = "" + "[" + (attrlist) + "]";
4562
+ } else if ($truthy(old_behavior_forced)) {
4563
+ attributes = (function() {if (attrlist['$==']("x-")) {
4564
+ return $hash2([], {})
4565
+ } else {
4566
+
4567
+ return self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
4568
+ }; return nil; })()
4498
4569
  } else {
4499
4570
  attributes = self.$parse_quoted_text_attributes(attrlist)
4500
4571
  }
4501
- } else if ($truthy((($c = format_mark['$==']("`")) ? old_behavior['$!']() : format_mark['$==']("`")))) {
4502
- return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark));
4503
- } else if ($truthy(escape_mark)) {
4504
- return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));};
4572
+ } else if ($truthy(escaped)) {
4573
+ return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()));
4574
+ } else if ($truthy(($truthy($c = compat_mode) ? preceding['$==']($$($nesting, 'RS')) : $c))) {
4575
+ return quoted_text;};
4505
4576
  if ($truthy(compat_mode)) {
4506
4577
 
4507
4578
  $writer = [(passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$($nesting, 'BASIC_SUBS'), "attributes": attributes, "type": "monospaced"})];
@@ -4935,27 +5006,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
4935
5006
  };}, $$71.$$s = self, $$71.$$arity = 1, $$71)).$join($$($nesting, 'LF')));
4936
5007
  }, $Substitutors_restore_callouts$70.$$arity = -3);
4937
5008
 
4938
- Opal.def(self, '$extract_inner_passthrough', $Substitutors_extract_inner_passthrough$73 = function $$extract_inner_passthrough(text, pre) {
4939
- var $a, $b, self = this, $writer = nil, passthru_key = nil;
4940
- if (self.passthroughs == null) self.passthroughs = nil;
4941
-
4942
- if ($truthy(($truthy($a = ($truthy($b = text['$end_with?']("+")) ? text['$start_with?']("+", "\\+") : $b)) ? $$($nesting, 'SinglePlusInlinePassRx')['$=~'](text) : $a))) {
4943
- if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) {
4944
- return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`"
4945
- } else {
4946
-
4947
-
4948
- $writer = [(passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$($nesting, 'BASIC_SUBS')})];
4949
- $send(self.passthroughs, '[]=', Opal.to_a($writer));
4950
- $writer[$rb_minus($writer["length"], 1)];;
4951
- return "" + (pre) + "`" + ($$($nesting, 'PASS_START')) + (passthru_key) + ($$($nesting, 'PASS_END')) + "`";
4952
- }
4953
- } else {
4954
- return "" + (pre) + "`" + (text) + "`"
4955
- }
4956
- }, $Substitutors_extract_inner_passthrough$73.$$arity = 2);
4957
-
4958
- Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$74 = function $$convert_quoted_text(match, type, scope) {
5009
+ Opal.def(self, '$convert_quoted_text', $Substitutors_convert_quoted_text$73 = function $$convert_quoted_text(match, type, scope) {
4959
5010
  var $a, self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
4960
5011
 
4961
5012
 
@@ -4986,9 +5037,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
4986
5037
  type = "unquoted"};};
4987
5038
  return $$($nesting, 'Inline').$new(self, "quoted", match['$[]'](2), $hash2(["type", "id", "attributes"], {"type": type, "id": id, "attributes": attributes})).$convert();
4988
5039
  };
4989
- }, $Substitutors_convert_quoted_text$74.$$arity = 3);
5040
+ }, $Substitutors_convert_quoted_text$73.$$arity = 3);
4990
5041
 
4991
- Opal.def(self, '$do_replacement', $Substitutors_do_replacement$75 = function $$do_replacement(m, replacement, restore) {
5042
+ Opal.def(self, '$do_replacement', $Substitutors_do_replacement$74 = function $$do_replacement(m, replacement, restore) {
4992
5043
  var self = this, captured = nil, $case = nil;
4993
5044
 
4994
5045
  if ($truthy((captured = m['$[]'](0))['$include?']($$($nesting, 'RS')))) {
@@ -4999,13 +5050,13 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
4999
5050
  else if ("bounding"['$===']($case)) {return $rb_plus($rb_plus(m['$[]'](1), replacement), m['$[]'](2))}
5000
5051
  else {return $rb_plus(m['$[]'](1), replacement)}})()
5001
5052
  }
5002
- }, $Substitutors_do_replacement$75.$$arity = 3);
5053
+ }, $Substitutors_do_replacement$74.$$arity = 3);
5003
5054
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
5004
5055
  } else {
5005
5056
  nil
5006
5057
  };
5007
5058
 
5008
- Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$76 = function $$parse_quoted_text_attributes(str) {
5059
+ Opal.def(self, '$parse_quoted_text_attributes', $Substitutors_parse_quoted_text_attributes$75 = function $$parse_quoted_text_attributes(str) {
5009
5060
  var $a, $b, self = this, before = nil, _ = nil, after = nil, attrs = nil, $writer = nil, id = nil, roles = nil;
5010
5061
 
5011
5062
 
@@ -5057,9 +5108,9 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
5057
5108
  } else {
5058
5109
  return $hash2(["role"], {"role": str})
5059
5110
  };
5060
- }, $Substitutors_parse_quoted_text_attributes$76.$$arity = 1);
5111
+ }, $Substitutors_parse_quoted_text_attributes$75.$$arity = 1);
5061
5112
 
5062
- Opal.def(self, '$normalize_text', $Substitutors_normalize_text$77 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
5113
+ Opal.def(self, '$normalize_text', $Substitutors_normalize_text$76 = function $$normalize_text(text, normalize_whitespace, unescape_closing_square_brackets) {
5063
5114
  var $a, self = this;
5064
5115
 
5065
5116
 
@@ -5080,10 +5131,10 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
5080
5131
  text = text.$gsub($$($nesting, 'ESC_R_SB'), $$($nesting, 'R_SB'))};
5081
5132
  };
5082
5133
  return text;
5083
- }, $Substitutors_normalize_text$77.$$arity = -2);
5134
+ }, $Substitutors_normalize_text$76.$$arity = -2);
5084
5135
 
5085
- Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$78 = function $$split_simple_csv(str) {
5086
- var $$79, $$80, self = this, values = nil, accum = nil, quote_open = nil;
5136
+ Opal.def(self, '$split_simple_csv', $Substitutors_split_simple_csv$77 = function $$split_simple_csv(str) {
5137
+ var $$78, $$79, self = this, values = nil, accum = nil, quote_open = nil;
5087
5138
 
5088
5139
  if ($truthy(str['$empty?']())) {
5089
5140
  return []
@@ -5092,7 +5143,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
5092
5143
  values = [];
5093
5144
  accum = "";
5094
5145
  quote_open = nil;
5095
- $send(str, 'each_char', [], ($$79 = function(c){var self = $$79.$$s || this, $case = nil;
5146
+ $send(str, 'each_char', [], ($$78 = function(c){var self = $$78.$$s || this, $case = nil;
5096
5147
 
5097
5148
 
5098
5149
 
@@ -5108,19 +5159,19 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
5108
5159
  return (accum = "");
5109
5160
  }}
5110
5161
  else if ("\""['$===']($case)) {return (quote_open = quote_open['$!']())}
5111
- else {return (accum = $rb_plus(accum, c))}})();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
5162
+ else {return (accum = $rb_plus(accum, c))}})();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
5112
5163
  return values['$<<'](accum.$strip());
5113
5164
  } else {
5114
- return $send(str.$split(","), 'map', [], ($$80 = function(it){var self = $$80.$$s || this;
5165
+ return $send(str.$split(","), 'map', [], ($$79 = function(it){var self = $$79.$$s || this;
5115
5166
 
5116
5167
 
5117
5168
 
5118
5169
  if (it == null) {
5119
5170
  it = nil;
5120
5171
  };
5121
- return it.$strip();}, $$80.$$s = self, $$80.$$arity = 1, $$80))
5172
+ return it.$strip();}, $$79.$$s = self, $$79.$$arity = 1, $$79))
5122
5173
  }
5123
- }, $Substitutors_split_simple_csv$78.$$arity = 1);
5174
+ }, $Substitutors_split_simple_csv$77.$$arity = 1);
5124
5175
  })($nesting[0], $nesting)
5125
5176
  })($nesting[0], $nesting)
5126
5177
  };
@@ -5134,7 +5185,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
5134
5185
 
5135
5186
  var $nesting = [self].concat($parent_nesting);
5136
5187
 
5137
- Opal.const_set($nesting[0], 'VERSION', "2.0.17")
5188
+ Opal.const_set($nesting[0], 'VERSION', "2.0.22")
5138
5189
  })($nesting[0], $nesting)
5139
5190
  };
5140
5191
 
@@ -5148,7 +5199,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
5148
5199
  }
5149
5200
  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;
5150
5201
 
5151
- 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']);
5202
+ 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']);
5152
5203
  return (function($base, $parent_nesting) {
5153
5204
  var self = $module($base, 'Asciidoctor');
5154
5205
 
@@ -5553,7 +5604,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
5553
5604
  image_path = self.$normalize_system_path(target_image)
5554
5605
  };
5555
5606
  if ($truthy($$$('::', 'File')['$readable?'](image_path))) {
5556
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64($$$('::', 'File').$binread(image_path)))
5607
+ return "" + "data:" + (mimetype) + ";base64," + ([$$$('::', 'File').$binread(image_path)].$pack("m0"))
5557
5608
  } else {
5558
5609
 
5559
5610
  self.$logger().$warn("" + "image to embed not found or not readable: " + (image_path));
@@ -5584,7 +5635,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
5584
5635
  f = nil;
5585
5636
  };
5586
5637
  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;
5587
- return "" + "data:" + (mimetype) + ";base64," + ($$$('::', 'Base64').$strict_encode64(bindata));
5638
+ return "" + "data:" + (mimetype) + ";base64," + ([bindata].$pack("m0"));
5588
5639
  } catch ($err) {
5589
5640
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
5590
5641
  try {
@@ -6712,7 +6763,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
6712
6763
  else if ("verbatim"['$===']($case) || "raw"['$===']($case)) {
6713
6764
  result = self.$apply_subs(self.lines, self.subs);
6714
6765
  if ($truthy($rb_lt(result.$size(), 2))) {
6715
- return result['$[]'](0)
6766
+ return ($truthy($a = result['$[]'](0)) ? $a : "")
6716
6767
  } else {
6717
6768
 
6718
6769
  while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) {
@@ -6726,7 +6777,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
6726
6777
  else {
6727
6778
  if (self.content_model['$==']("empty")) {
6728
6779
  } else {
6729
- self.$logger().$warn("" + "Unknown content model '" + (self.content_model) + "' for block: " + (self))
6780
+ self.$logger().$warn("" + "unknown content model '" + (self.content_model) + "' for block: " + (self))
6730
6781
  };
6731
6782
  return nil;}})()
6732
6783
  }, $Block_content$2.$$arity = 0);
@@ -7568,6 +7619,11 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
7568
7619
  $writer = ["catalog_assets", true];
7569
7620
  $send(options, '[]=', Opal.to_a($writer));
7570
7621
  $writer[$rb_minus($writer["length"], 1)];};
7622
+ if ($truthy(parent_doc.$options()['$[]']("to_dir"))) {
7623
+
7624
+ $writer = ["to_dir", parent_doc.$options()['$[]']("to_dir")];
7625
+ $send(options, '[]=', Opal.to_a($writer));
7626
+ $writer[$rb_minus($writer["length"], 1)];};
7571
7627
  self.catalog = parent_doc.$catalog().$merge($hash2(["footnotes"], {"footnotes": []}));
7572
7628
  self.attribute_overrides = (attr_overrides = parent_doc.$instance_variable_get("@attribute_overrides").$merge(parent_doc.$attributes()));
7573
7629
  attr_overrides.$delete("compat-mode");
@@ -9387,7 +9443,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9387
9443
  }
9388
9444
  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;
9389
9445
 
9390
- 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', '$%']);
9446
+ 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', '$%']);
9391
9447
  return (function($base, $parent_nesting) {
9392
9448
  var self = $module($base, 'Asciidoctor');
9393
9449
 
@@ -9429,6 +9485,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9429
9485
  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)));
9430
9486
  Opal.const_set($nesting[0], 'NoOp', nil);
9431
9487
  Opal.const_set($nesting[0], 'AuthorKeys', ["author", "authorinitials", "firstname", "middlename", "lastname", "email"]);
9488
+ Opal.const_set($nesting[0], 'ListContinuationMarker', $$$('::', 'Module').$new());
9489
+ Opal.const_set($nesting[0], 'ListContinuationPlaceholder', $$$('::', 'String').$new().$extend($$($nesting, 'ListContinuationMarker')));
9490
+ Opal.const_set($nesting[0], 'ListContinuationString', $$$('::', 'String').$new($$($nesting, 'LIST_CONTINUATION')).$extend($$($nesting, 'ListContinuationMarker')));
9432
9491
  Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"}));
9433
9492
  Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"}));
9434
9493
  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"}));
@@ -9831,16 +9890,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9831
9890
  if ($truthy(part)) {
9832
9891
  if ($truthy(section['$blocks?']()['$!']())) {
9833
9892
  if ($truthy(new_block.$style()['$!=']("partintro"))) {
9834
- if (new_block.$context()['$==']("paragraph")) {
9835
-
9836
-
9837
- $writer = ["open"];
9838
- $send(new_block, 'context=', Opal.to_a($writer));
9839
- $writer[$rb_minus($writer["length"], 1)];;
9893
+ if ($truthy((($b = new_block.$style()['$==']("open")) ? new_block.$context()['$==']("open") : new_block.$style()['$==']("open")))) {
9840
9894
 
9841
9895
  $writer = ["partintro"];
9842
9896
  $send(new_block, 'style=', Opal.to_a($writer));
9843
- $writer[$rb_minus($writer["length"], 1)];;
9897
+ $writer[$rb_minus($writer["length"], 1)];
9844
9898
  } else {
9845
9899
 
9846
9900
 
@@ -9852,7 +9906,16 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9852
9906
  $send(intro, 'style=', Opal.to_a($writer));
9853
9907
  $writer[$rb_minus($writer["length"], 1)];;
9854
9908
  section.$blocks()['$<<'](intro);
9855
- }}
9909
+ }
9910
+ } else if (new_block.$content_model()['$==']("simple")) {
9911
+
9912
+
9913
+ $writer = ["compound"];
9914
+ $send(new_block, 'content_model=', Opal.to_a($writer));
9915
+ $writer[$rb_minus($writer["length"], 1)];;
9916
+ new_block['$<<']($$($nesting, 'Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
9917
+ new_block.$lines().$clear();
9918
+ new_block.$subs().$clear();}
9856
9919
  } else if (section.$blocks().$size()['$=='](1)) {
9857
9920
 
9858
9921
  first_block = section.$blocks()['$[]'](0);
@@ -9864,12 +9927,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9864
9927
  $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))];
9865
9928
  $send(new_block, 'parent=', Opal.to_a($writer));
9866
9929
  $writer[$rb_minus($writer["length"], 1)];;
9867
-
9868
- $writer = ["partintro"];
9869
- $send(intro, 'style=', Opal.to_a($writer));
9870
- $writer[$rb_minus($writer["length"], 1)];;
9871
- section.$blocks().$shift();
9872
- if (first_block.$style()['$==']("partintro")) {
9930
+ if (first_block.$style()['$==']((($writer = ["partintro"]), $send(intro, 'style=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))) {
9873
9931
 
9874
9932
 
9875
9933
  $writer = ["paragraph"];
@@ -9879,6 +9937,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9879
9937
  $writer = [nil];
9880
9938
  $send(first_block, 'style=', Opal.to_a($writer));
9881
9939
  $writer[$rb_minus($writer["length"], 1)];;};
9940
+ section.$blocks().$shift();
9882
9941
  intro['$<<'](first_block);
9883
9942
  section.$blocks()['$<<'](intro);};}};
9884
9943
  ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block);
@@ -9981,6 +10040,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9981
10040
  if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) {
9982
10041
 
9983
10042
  block_context = style.$to_sym();
10043
+ cloaked_context = "paragraph";
9984
10044
  reader.$unshift_line(this_line);
9985
10045
  break;;};
9986
10046
  if ($truthy(text_only)) {
@@ -10347,7 +10407,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10347
10407
  } else {
10348
10408
  $case = block_context;
10349
10409
  if ("listing"['$===']($case) || "source"['$===']($case)) {
10350
- if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : ($truthy($b = attributes['$[]'](1)['$!']()) ? (language = ($truthy($c = attributes['$[]'](2)) ? $c : doc_attrs['$[]']("source-language"))) : $b)))) {
10410
+ if ($truthy(($truthy($a = block_context['$==']("source")) ? $a : (language = (function() {if ($truthy(attributes['$[]'](1))) {
10411
+ return nil
10412
+ } else {
10413
+ return ($truthy($b = attributes['$[]'](2)) ? $b : doc_attrs['$[]']("source-language"))
10414
+ }; return nil; })())))) {
10351
10415
 
10352
10416
  if ($truthy(language)) {
10353
10417
 
@@ -10369,6 +10433,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10369
10433
  $writer = ["language", doc_attrs['$[]']("source-language")];
10370
10434
  $send(attributes, '[]=', Opal.to_a($writer));
10371
10435
  $writer[$rb_minus($writer["length"], 1)];};
10436
+ if (cloaked_context['$==']("listing")) {
10437
+ } else {
10438
+
10439
+ $writer = ["cloaked-context", cloaked_context];
10440
+ $send(attributes, '[]=', Opal.to_a($writer));
10441
+ $writer[$rb_minus($writer["length"], 1)];
10442
+ };
10372
10443
  };
10373
10444
  if ($truthy(attributes['$key?']("linenums"))) {
10374
10445
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
@@ -10418,6 +10489,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10418
10489
  $send(attributes, '[]=', Opal.to_a($writer));
10419
10490
  $writer[$rb_minus($writer["length"], 1)];
10420
10491
  };
10492
+
10493
+ $writer = ["cloaked-context", cloaked_context];
10494
+ $send(attributes, '[]=', Opal.to_a($writer));
10495
+ $writer[$rb_minus($writer["length"], 1)];;
10421
10496
  if ($truthy(attributes['$key?']("linenums"))) {
10422
10497
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
10423
10498
 
@@ -10812,8 +10887,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10812
10887
  reftext = reftext.$gsub("\\]", "]");
10813
10888
  if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
10814
10889
  reftext = document.$sub_attributes(reftext)};
10815
- } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
10816
- return nil;}};
10890
+ } else if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
10891
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
10892
+ reftext = nil}}};
10817
10893
  };
10818
10894
  if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
10819
10895
  return nil
@@ -11037,7 +11113,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11037
11113
  };
11038
11114
  }, $Parser_parse_list_item$27.$$arity = -5);
11039
11115
  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) {
11040
- 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;
11116
+ 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;
11041
11117
 
11042
11118
 
11043
11119
 
@@ -11058,12 +11134,14 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11058
11134
  this_line = reader.$read_line();
11059
11135
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
11060
11136
  break;};
11137
+ if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11138
+ this_line = $$($nesting, 'ListContinuationString')};
11061
11139
  prev_line = (function() {if ($truthy(buffer['$empty?']())) {
11062
11140
  return nil
11063
11141
  } else {
11064
11142
  return buffer['$[]'](-1)
11065
11143
  }; return nil; })();
11066
- if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11144
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](prev_line))) {
11067
11145
 
11068
11146
  if (continuation['$==']("inactive")) {
11069
11147
 
@@ -11072,11 +11150,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11072
11150
  if ($truthy(within_nested_list)) {
11073
11151
  } else {
11074
11152
 
11075
- $writer = [-1, ""];
11153
+ $writer = [-1, $$($nesting, 'ListContinuationPlaceholder')];
11076
11154
  $send(buffer, '[]=', Opal.to_a($writer));
11077
11155
  $writer[$rb_minus($writer["length"], 1)];
11078
11156
  };};
11079
- if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11157
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
11080
11158
 
11081
11159
  if ($truthy(continuation['$!=']("frozen"))) {
11082
11160
 
@@ -11085,16 +11163,36 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11085
11163
  this_line = nil;
11086
11164
  continue;;};};
11087
11165
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
11166
+
11088
11167
  if (continuation['$==']("active")) {
11089
-
11090
- buffer['$<<'](this_line);
11091
- buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
11092
- continuation = "inactive";
11093
11168
  } else {
11094
11169
  break;
11095
- }
11096
- } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
11097
- break;
11170
+ };
11171
+ buffer['$<<'](this_line);
11172
+ buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
11173
+ continuation = "inactive";
11174
+ } else if ($truthy(($truthy($b = ($truthy($c = ($truthy($d = dlist) ? continuation['$!=']("active") : $d)) ? this_line['$start_with?']("[") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
11175
+
11176
+ block_attribute_lines = [this_line];
11177
+ while ($truthy((next_line = reader.$peek_line()))) {
11178
+
11179
+ if ($truthy(self['$is_delimited_block?'](next_line))) {
11180
+ interrupt = true
11181
+ } else if ($truthy(($truthy($c = next_line['$empty?']()) ? $c : ($truthy($d = next_line['$start_with?']("[")) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](next_line) : $d)))) {
11182
+
11183
+ block_attribute_lines['$<<'](reader.$read_line());
11184
+ continue;;
11185
+ } else if ($truthy(($truthy($c = $$($nesting, 'AnyListRx')['$match?'](next_line)) ? self['$is_sibling_list_item?'](next_line, list_type, sibling_trait)['$!']() : $c))) {
11186
+ buffer.$concat(block_attribute_lines)
11187
+ } else {
11188
+ interrupt = true
11189
+ };
11190
+ break;;
11191
+ };
11192
+ if ($truthy(interrupt)) {
11193
+
11194
+ reader.$unshift_lines(block_attribute_lines);
11195
+ break;;};
11098
11196
  } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) {
11099
11197
  if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) {
11100
11198
 
@@ -11112,7 +11210,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11112
11210
  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})))
11113
11211
  };
11114
11212
  continuation = "inactive";
11115
- } else if ($truthy(($truthy($b = ($truthy($c = $$($nesting, 'BlockTitleRx')['$match?'](this_line)) ? $c : $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line))) ? $b : $$($nesting, 'AttributeEntryRx')['$match?'](this_line)))) {
11213
+ } 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['$=='](":"))))) {
11116
11214
  buffer['$<<'](this_line)
11117
11215
  } else {
11118
11216
 
@@ -11127,7 +11225,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11127
11225
  if (ctx == null) {
11128
11226
  ctx = nil;
11129
11227
  };
11130
- return $$($nesting, 'ListRxMap')['$[]'](ctx)['$match?'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
11228
+ return $$($nesting, 'ListRxMap')['$[]'](ctx)['$=~'](this_line);}, $$30.$$s = self, $$30.$$arity = 1, $$30))))) {
11131
11229
 
11132
11230
  within_nested_list = true;
11133
11231
  if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) {
@@ -11148,7 +11246,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11148
11246
  if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11149
11247
 
11150
11248
  detached_continuation = buffer.$size();
11151
- buffer['$<<'](this_line);
11249
+ buffer['$<<']($$($nesting, 'ListContinuationString'));
11152
11250
  } else if ($truthy(has_text)) {
11153
11251
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
11154
11252
  break;
@@ -11192,6 +11290,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11192
11290
  buffer['$<<'](this_line);
11193
11291
  has_text = true;
11194
11292
  };
11293
+ } else if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
11294
+
11295
+ has_text = true;
11296
+ buffer['$<<'](this_line);
11195
11297
  } else {
11196
11298
 
11197
11299
  if ($truthy(this_line['$empty?']())) {
@@ -11222,17 +11324,18 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11222
11324
  reader.$unshift_line(this_line)};
11223
11325
  if ($truthy(detached_continuation)) {
11224
11326
 
11225
- $writer = [detached_continuation, ""];
11327
+ $writer = [detached_continuation, $$($nesting, 'ListContinuationPlaceholder')];
11226
11328
  $send(buffer, '[]=', Opal.to_a($writer));
11227
11329
  $writer[$rb_minus($writer["length"], 1)];};
11228
11330
  while (!($truthy(buffer['$empty?']()))) {
11229
- if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
11230
- buffer.$pop()
11231
- } else {
11331
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$===']((last_line = buffer['$[]'](-1))))) {
11232
11332
 
11233
- if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11234
- buffer.$pop()};
11333
+ buffer.$pop();
11235
11334
  break;;
11335
+ } else if ($truthy(last_line['$empty?']())) {
11336
+ buffer.$pop()
11337
+ } else {
11338
+ break;
11236
11339
  }
11237
11340
  };
11238
11341
  return buffer;
@@ -12719,7 +12822,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12719
12822
  (function($base, $super, $parent_nesting) {
12720
12823
  var self = $klass($base, $super, 'PathResolver');
12721
12824
 
12722
- 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;
12825
+ 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;
12723
12826
 
12724
12827
  self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
12725
12828
 
@@ -12730,6 +12833,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12730
12833
  Opal.const_set($nesting[0], 'SLASH', "/");
12731
12834
  Opal.const_set($nesting[0], 'BACKSLASH', "\\");
12732
12835
  Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//");
12836
+ Opal.const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
12733
12837
  Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
12734
12838
  self.$attr_accessor("file_separator");
12735
12839
  self.$attr_accessor("working_dir");
@@ -12775,23 +12879,30 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12775
12879
 
12776
12880
  return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://"))
12777
12881
  }, $PathResolver_root$ques$3.$$arity = 1)
12882
+ } else if ($$$('::', 'RUBY_ENGINE')['$==']("jruby")) {
12883
+
12884
+ Opal.def(self, '$root?', $PathResolver_root$ques$4 = function(path) {
12885
+ var $a, self = this;
12886
+
12887
+ return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))
12888
+ }, $PathResolver_root$ques$4.$$arity = 1)
12778
12889
  } else {
12779
12890
  Opal.alias(self, "root?", "absolute_path?")
12780
12891
  };
12781
12892
 
12782
- Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) {
12893
+ Opal.def(self, '$unc?', $PathResolver_unc$ques$5 = function(path) {
12783
12894
  var self = this;
12784
12895
 
12785
12896
  return path['$start_with?']($$($nesting, 'DOUBLE_SLASH'))
12786
- }, $PathResolver_unc$ques$4.$$arity = 1);
12897
+ }, $PathResolver_unc$ques$5.$$arity = 1);
12787
12898
 
12788
- Opal.def(self, '$web_root?', $PathResolver_web_root$ques$5 = function(path) {
12899
+ Opal.def(self, '$web_root?', $PathResolver_web_root$ques$6 = function(path) {
12789
12900
  var self = this;
12790
12901
 
12791
12902
  return path['$start_with?']($$($nesting, 'SLASH'))
12792
- }, $PathResolver_web_root$ques$5.$$arity = 1);
12903
+ }, $PathResolver_web_root$ques$6.$$arity = 1);
12793
12904
 
12794
- Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$6 = function(path, base) {
12905
+ Opal.def(self, '$descends_from?', $PathResolver_descends_from$ques$7 = function(path, base) {
12795
12906
  var $a, self = this;
12796
12907
 
12797
12908
  if (base['$=='](path)) {
@@ -12801,9 +12912,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12801
12912
  } else {
12802
12913
  return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a)
12803
12914
  }
12804
- }, $PathResolver_descends_from$ques$6.$$arity = 2);
12915
+ }, $PathResolver_descends_from$ques$7.$$arity = 2);
12805
12916
 
12806
- Opal.def(self, '$relative_path', $PathResolver_relative_path$7 = function $$relative_path(path, base) {
12917
+ Opal.def(self, '$relative_path', $PathResolver_relative_path$8 = function $$relative_path(path, base) {
12807
12918
  var self = this, offset = nil;
12808
12919
 
12809
12920
  if ($truthy(self['$root?'](path))) {
@@ -12824,9 +12935,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12824
12935
  } else {
12825
12936
  return path
12826
12937
  }
12827
- }, $PathResolver_relative_path$7.$$arity = 2);
12938
+ }, $PathResolver_relative_path$8.$$arity = 2);
12828
12939
 
12829
- Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) {
12940
+ Opal.def(self, '$posixify', $PathResolver_posixify$9 = function $$posixify(path) {
12830
12941
  var $a, self = this;
12831
12942
 
12832
12943
  if ($truthy(path)) {
@@ -12839,18 +12950,18 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12839
12950
  } else {
12840
12951
  return ""
12841
12952
  }
12842
- }, $PathResolver_posixify$8.$$arity = 1);
12953
+ }, $PathResolver_posixify$9.$$arity = 1);
12843
12954
  Opal.alias(self, "posixfy", "posixify");
12844
12955
 
12845
- Opal.def(self, '$expand_path', $PathResolver_expand_path$9 = function $$expand_path(path) {
12846
- var $a, $b, $$10, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
12956
+ Opal.def(self, '$expand_path', $PathResolver_expand_path$10 = function $$expand_path(path) {
12957
+ var $a, $b, $$11, self = this, path_segments = nil, path_root = nil, resolved_segments = nil;
12847
12958
 
12848
12959
 
12849
12960
  $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;
12850
12961
  if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) {
12851
12962
 
12852
12963
  resolved_segments = [];
12853
- $send(path_segments, 'each', [], ($$10 = function(segment){var self = $$10.$$s || this;
12964
+ $send(path_segments, 'each', [], ($$11 = function(segment){var self = $$11.$$s || this;
12854
12965
 
12855
12966
 
12856
12967
 
@@ -12861,14 +12972,14 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12861
12972
  return resolved_segments.$pop()
12862
12973
  } else {
12863
12974
  return resolved_segments['$<<'](segment)
12864
- };}, $$10.$$s = self, $$10.$$arity = 1, $$10));
12975
+ };}, $$11.$$s = self, $$11.$$arity = 1, $$11));
12865
12976
  return self.$join_path(resolved_segments, path_root);
12866
12977
  } else {
12867
12978
  return self.$join_path(path_segments, path_root)
12868
12979
  };
12869
- }, $PathResolver_expand_path$9.$$arity = 1);
12980
+ }, $PathResolver_expand_path$10.$$arity = 1);
12870
12981
 
12871
- Opal.def(self, '$partition_path', $PathResolver_partition_path$11 = function $$partition_path(path, web) {
12982
+ Opal.def(self, '$partition_path', $PathResolver_partition_path$12 = function $$partition_path(path, web) {
12872
12983
  var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil;
12873
12984
 
12874
12985
 
@@ -12893,6 +13004,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12893
13004
  root = $$($nesting, 'DOUBLE_SLASH')
12894
13005
  } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) {
12895
13006
  root = $$($nesting, 'SLASH')
13007
+ } else if ($truthy(posix_path['$start_with?']($$($nesting, 'URI_CLASSLOADER')))) {
13008
+ root = posix_path.$slice(0, $$($nesting, 'URI_CLASSLOADER').$length())
12896
13009
  } else {
12897
13010
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1))
12898
13011
  }
@@ -12909,9 +13022,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12909
13022
  $writer = [path, [path_segments, root]];
12910
13023
  $send(cache, '[]=', Opal.to_a($writer));
12911
13024
  return $writer[$rb_minus($writer["length"], 1)];;
12912
- }, $PathResolver_partition_path$11.$$arity = -2);
13025
+ }, $PathResolver_partition_path$12.$$arity = -2);
12913
13026
 
12914
- Opal.def(self, '$join_path', $PathResolver_join_path$12 = function $$join_path(segments, root) {
13027
+ Opal.def(self, '$join_path', $PathResolver_join_path$13 = function $$join_path(segments, root) {
12915
13028
  var self = this;
12916
13029
 
12917
13030
 
@@ -12925,10 +13038,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12925
13038
 
12926
13039
  return segments.$join($$($nesting, 'SLASH'));
12927
13040
  };
12928
- }, $PathResolver_join_path$12.$$arity = -2);
13041
+ }, $PathResolver_join_path$13.$$arity = -2);
12929
13042
 
12930
- Opal.def(self, '$system_path', $PathResolver_system_path$13 = function $$system_path(target, start, jail, opts) {
12931
- 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;
13043
+ Opal.def(self, '$system_path', $PathResolver_system_path$14 = function $$system_path(target, start, jail, opts) {
13044
+ 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;
12932
13045
 
12933
13046
 
12934
13047
 
@@ -13019,7 +13132,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13019
13132
  $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
13020
13133
  };
13021
13134
  warned = false;
13022
- $send(unresolved_segments, 'each', [], ($$14 = function(segment){var self = $$14.$$s || this, $c;
13135
+ $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this, $c;
13023
13136
 
13024
13137
 
13025
13138
 
@@ -13042,9 +13155,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13042
13155
  }
13043
13156
  } else {
13044
13157
  return resolved_segments['$<<'](segment)
13045
- };}, $$14.$$s = self, $$14.$$arity = 1, $$14));
13158
+ };}, $$15.$$s = self, $$15.$$arity = 1, $$15));
13046
13159
  } else {
13047
- $send(unresolved_segments, 'each', [], ($$15 = function(segment){var self = $$15.$$s || this;
13160
+ $send(unresolved_segments, 'each', [], ($$16 = function(segment){var self = $$16.$$s || this;
13048
13161
 
13049
13162
 
13050
13163
 
@@ -13055,7 +13168,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13055
13168
  return resolved_segments.$pop()
13056
13169
  } else {
13057
13170
  return resolved_segments['$<<'](segment)
13058
- };}, $$15.$$s = self, $$15.$$arity = 1, $$15))
13171
+ };}, $$16.$$s = self, $$16.$$arity = 1, $$16))
13059
13172
  };};
13060
13173
  if ($truthy(recheck)) {
13061
13174
 
@@ -13076,10 +13189,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13076
13189
  } else {
13077
13190
  return self.$join_path(resolved_segments, jail_root)
13078
13191
  };
13079
- }, $PathResolver_system_path$13.$$arity = -2);
13192
+ }, $PathResolver_system_path$14.$$arity = -2);
13080
13193
 
13081
- Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
13082
- var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
13194
+ Opal.def(self, '$web_path', $PathResolver_web_path$17 = function $$web_path(target, start) {
13195
+ var $a, $b, $$18, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
13083
13196
 
13084
13197
 
13085
13198
 
@@ -13098,7 +13211,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13098
13211
  };
13099
13212
  $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;
13100
13213
  resolved_segments = [];
13101
- $send(target_segments, 'each', [], ($$17 = function(segment){var self = $$17.$$s || this, $c;
13214
+ $send(target_segments, 'each', [], ($$18 = function(segment){var self = $$18.$$s || this, $c;
13102
13215
 
13103
13216
 
13104
13217
 
@@ -13119,7 +13232,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13119
13232
  }
13120
13233
  } else {
13121
13234
  return resolved_segments['$<<'](segment)
13122
- };}, $$17.$$s = self, $$17.$$arity = 1, $$17));
13235
+ };}, $$18.$$s = self, $$18.$$arity = 1, $$18));
13123
13236
  if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) {
13124
13237
  resolved_path = resolved_path.$gsub(" ", "%20")};
13125
13238
  if ($truthy(uri_prefix)) {
@@ -13127,9 +13240,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13127
13240
  } else {
13128
13241
  return resolved_path
13129
13242
  };
13130
- }, $PathResolver_web_path$16.$$arity = -2);
13243
+ }, $PathResolver_web_path$17.$$arity = -2);
13131
13244
  self.$private();
13132
- return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) {
13245
+ return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$19 = function $$extract_uri_prefix(str) {
13133
13246
  var $a, self = this;
13134
13247
 
13135
13248
  if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
@@ -13137,7 +13250,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13137
13250
  } else {
13138
13251
  return str
13139
13252
  }
13140
- }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
13253
+ }, $PathResolver_extract_uri_prefix$19.$$arity = 1), nil) && 'extract_uri_prefix';
13141
13254
  })($nesting[0], null, $nesting)
13142
13255
  })($nesting[0], $nesting)
13143
13256
  };
@@ -13164,7 +13277,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13164
13277
  }
13165
13278
  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;
13166
13279
 
13167
- 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']);
13280
+ 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']);
13168
13281
  return (function($base, $parent_nesting) {
13169
13282
  var self = $module($base, 'Asciidoctor');
13170
13283
 
@@ -13309,26 +13422,31 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13309
13422
  }, $Reader_next_line_empty$ques$7.$$arity = 0);
13310
13423
 
13311
13424
  Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) {
13312
- var $a, self = this, line = nil;
13425
+ var $a, $b, self = this, next_line = nil, line = nil;
13313
13426
 
13314
13427
 
13315
13428
 
13316
13429
  if (direct == null) {
13317
13430
  direct = false;
13318
13431
  };
13319
- if ($truthy(($truthy($a = direct) ? $a : $rb_gt(self.look_ahead, 0)))) {
13320
- if ($truthy(self.unescape_next_line)) {
13321
-
13322
- return (line = self.lines['$[]'](-1)).$slice(1, line.$length());
13323
- } else {
13324
- return self.lines['$[]'](-1)
13325
- }
13326
- } else if ($truthy(self.lines['$empty?']())) {
13432
+ while ($truthy(true)) {
13327
13433
 
13328
- self.look_ahead = 0;
13329
- return nil;
13330
- } else {
13331
- return ($truthy($a = self.$process_line(self.lines['$[]'](-1))) ? $a : self.$peek_line())
13434
+ next_line = self.lines['$[]'](-1);
13435
+ if ($truthy(($truthy($b = direct) ? $b : $rb_gt(self.look_ahead, 0)))) {
13436
+ return (function() {if ($truthy(self.unescape_next_line)) {
13437
+
13438
+ return next_line.$slice(1, next_line.$length());
13439
+ } else {
13440
+ return next_line
13441
+ }; return nil; })()
13442
+ } else if ($truthy(next_line)) {
13443
+ if ($truthy((line = self.$process_line(next_line)))) {
13444
+ return line}
13445
+ } else {
13446
+
13447
+ self.look_ahead = 0;
13448
+ return nil;
13449
+ };
13332
13450
  };
13333
13451
  }, $Reader_peek_line$8.$$arity = -1);
13334
13452
 
@@ -13943,27 +14061,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13943
14061
  };
13944
14062
  self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
13945
14063
  if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) {
13946
-
13947
- $writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
14064
+ ($truthy($a = self.includes['$[]'](path.$slice(0, path.$rindex(".")))) ? $a : (($writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
13948
14065
  return nil
13949
14066
  } else {
13950
14067
  return true
13951
- }; return nil; })()];
13952
- $send(self.includes, '[]=', Opal.to_a($writer));
13953
- $writer[$rb_minus($writer["length"], 1)];};
14068
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))};
13954
14069
  } else {
13955
14070
 
13956
14071
  self.dir = ".";
13957
14072
  self.process_lines = true;
13958
14073
  if ($truthy((self.path = path))) {
13959
-
13960
- $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
14074
+ ($truthy($a = self.includes['$[]']($$($nesting, 'Helpers').$rootname(path))) ? $a : (($writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
13961
14075
  return nil
13962
14076
  } else {
13963
14077
  return true
13964
- }; return nil; })()];
13965
- $send(self.includes, '[]=', Opal.to_a($writer));
13966
- $writer[$rb_minus($writer["length"], 1)];
14078
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
13967
14079
  } else {
13968
14080
  self.path = "<stdin>"
13969
14081
  };
@@ -14345,7 +14457,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14345
14457
  ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})));
14346
14458
  return true;
14347
14459
  } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) {
14348
- return self.$replace_next_line("" + "link:" + (expanded_target) + "[]")
14460
+
14461
+ if ($truthy(expanded_target['$include?'](" "))) {
14462
+ expanded_target = "" + "pass:c[" + (expanded_target) + "]"};
14463
+ return self.$replace_next_line("" + "link:" + (expanded_target) + "[role=include]");
14349
14464
  } else if ($truthy(self.maxdepth)) {
14350
14465
 
14351
14466
  if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) {
@@ -14657,6 +14772,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14657
14772
  self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);};
14658
14773
  } else {
14659
14774
 
14775
+ inc_content = nil;
14776
+
14660
14777
  try {
14661
14778
 
14662
14779
  inc_content = $send(reader, 'call', [inc_path, read_mode], ($$79 = function(f){var self = $$79.$$s || this;
@@ -14668,7 +14785,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14668
14785
  };
14669
14786
  return f.$read();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
14670
14787
  self.$shift();
14671
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
14672
14788
  } catch ($err) {
14673
14789
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
14674
14790
  try {
@@ -14677,7 +14793,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14677
14793
  return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
14678
14794
  } finally { Opal.pop_exception() }
14679
14795
  } else { throw $err; }
14680
- };
14796
+ };;
14797
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
14681
14798
  };
14682
14799
  return true;
14683
14800
  } else {
@@ -14699,7 +14816,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14699
14816
 
14700
14817
  if ($truthy(doc['$attr?']("allow-uri-read"))) {
14701
14818
  } else {
14702
- return self.$replace_next_line("" + "link:" + (target) + "[" + (attrlist) + "]")
14819
+
14820
+ if ($truthy(target['$include?'](" "))) {
14821
+ target = "" + "pass:c[" + (target) + "]"};
14822
+ return self.$replace_next_line("" + "link:" + (target) + "[role=include]");
14703
14823
  };
14704
14824
  if ($truthy(doc['$attr?']("cache-uri"))) {
14705
14825
  if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) {
@@ -14756,39 +14876,37 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14756
14876
  }, $PreprocessorReader_split_delimited_value$83.$$arity = 1);
14757
14877
 
14758
14878
  Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$84 = function(data, increment_linenos) {
14759
- var $a, $b, self = this, front_matter = nil, original_data = nil;
14879
+ var $a, $b, self = this, delim = nil, original_data = nil, front_matter = nil, eof = nil;
14760
14880
 
14761
14881
 
14762
14882
 
14763
14883
  if (increment_linenos == null) {
14764
14884
  increment_linenos = true;
14765
14885
  };
14766
- front_matter = nil;
14767
- if (data['$[]'](0)['$==']("---")) {
14886
+ if ((delim = data['$[]'](0))['$==']("---")) {
14887
+ } else {
14888
+ return nil
14889
+ };
14890
+ original_data = data.$drop(0);
14891
+ data.$shift();
14892
+ front_matter = [];
14893
+ if ($truthy(increment_linenos)) {
14894
+ self.lineno = $rb_plus(self.lineno, 1)};
14895
+ while (!($truthy(($truthy($b = (eof = data['$empty?']())) ? $b : data['$[]'](0)['$=='](delim))))) {
14768
14896
 
14769
- original_data = data.$drop(0);
14770
- data.$shift();
14771
- front_matter = [];
14897
+ front_matter['$<<'](data.$shift());
14772
14898
  if ($truthy(increment_linenos)) {
14773
14899
  self.lineno = $rb_plus(self.lineno, 1)};
14774
- while ($truthy(($truthy($b = data['$empty?']()['$!']()) ? data['$[]'](0)['$!=']("---") : $b))) {
14775
-
14776
- front_matter['$<<'](data.$shift());
14777
- if ($truthy(increment_linenos)) {
14778
- self.lineno = $rb_plus(self.lineno, 1)};
14779
- };
14780
- if ($truthy(data['$empty?']())) {
14781
-
14782
- $send(data, 'unshift', Opal.to_a(original_data));
14783
- if ($truthy(increment_linenos)) {
14784
- self.lineno = 0};
14785
- front_matter = nil;
14786
- } else {
14787
-
14788
- data.$shift();
14789
- if ($truthy(increment_linenos)) {
14790
- self.lineno = $rb_plus(self.lineno, 1)};
14791
- };};
14900
+ };
14901
+ if ($truthy(eof)) {
14902
+
14903
+ $send(data, 'unshift', Opal.to_a(original_data));
14904
+ if ($truthy(increment_linenos)) {
14905
+ self.lineno = $rb_minus(self.lineno, original_data.$size())};
14906
+ return nil;};
14907
+ data.$shift();
14908
+ if ($truthy(increment_linenos)) {
14909
+ self.lineno = $rb_plus(self.lineno, 1)};
14792
14910
  return front_matter;
14793
14911
  }, $PreprocessorReader_skip_front_matter$excl$84.$$arity = -2);
14794
14912
  return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$85 = function $$resolve_expr_val(val) {
@@ -16670,7 +16788,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
16670
16788
  return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
16671
16789
  } else {
16672
16790
  return ""
16673
- }; 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>"
16791
+ }; 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>"
16674
16792
  };
16675
16793
  }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
16676
16794
  })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
@@ -18238,7 +18356,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18238
18356
 
18239
18357
  return syntax_hl.$format(node, lang, opts);
18240
18358
  } else {
18241
- return $rb_plus($rb_plus(pre_open, ($truthy($a = node.$content()) ? $a : "")), pre_close)
18359
+ return $rb_plus($rb_plus(pre_open, node.$content()), pre_close)
18242
18360
  }; return nil; })()) + "\n" + "</div>\n" + "</div>";
18243
18361
  }, $Html5Converter_convert_listing$26.$$arity = 1);
18244
18362
 
@@ -18370,7 +18488,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18370
18488
  if ((style = node.$style())['$==']("abstract")) {
18371
18489
  if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) {
18372
18490
 
18373
- self.$logger().$warn("abstract block cannot be used in a document without a title when doctype is book. Excluding block content.");
18491
+ self.$logger().$warn("abstract block cannot be used in a document without a doctitle when doctype is book. Excluding block content.");
18374
18492
  return "";
18375
18493
  } else {
18376
18494
 
@@ -19452,7 +19570,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
19452
19570
  }
19453
19571
  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;
19454
19572
 
19455
- 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']);
19573
+ 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']);
19456
19574
 
19457
19575
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
19458
19576
  } else {
@@ -20390,9 +20508,9 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20390
20508
  (function($base, $super, $parent_nesting) {
20391
20509
  var self = $klass($base, $super, 'Registry');
20392
20510
 
20393
- 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;
20511
+ 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;
20394
20512
 
20395
- 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;
20513
+ 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;
20396
20514
 
20397
20515
  self.$attr_reader("document");
20398
20516
  self.$attr_reader("groups");
@@ -20406,6 +20524,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20406
20524
  groups = $hash2([], {});
20407
20525
  };
20408
20526
  self.groups = groups;
20527
+ self.$reset();
20409
20528
  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)))))));
20410
20529
  return (self.document = nil);
20411
20530
  }, $Registry_initialize$53.$$arity = -1);
@@ -20414,6 +20533,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20414
20533
  var $$55, self = this, ext_groups = nil;
20415
20534
 
20416
20535
 
20536
+ if ($truthy(self.document)) {
20537
+ self.$reset()};
20417
20538
  self.document = document;
20418
20539
  if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) {
20419
20540
  } else {
@@ -20784,7 +20905,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20784
20905
  };
20785
20906
  if ($truthy(processor['$process_block_given?']())) {
20786
20907
  } else {
20787
- self.$raise($$$('::', 'ArgumentError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
20908
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
20788
20909
  };
20789
20910
  processor.$freeze();
20790
20911
  extension = $$($nesting, 'ProcessorExtension').$new(kind, processor);
@@ -20854,11 +20975,11 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20854
20975
  };
20855
20976
  if ($truthy((name = self.$as_symbol(processor.$name())))) {
20856
20977
  } else {
20857
- self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location()))
20978
+ self.$raise($$$('::', 'ArgumentError'), "" + "No name specified for " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
20858
20979
  };
20859
20980
  if ($truthy(processor['$process_block_given?']())) {
20860
20981
  } else {
20861
- self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location()))
20982
+ self.$raise($$$('::', 'NoMethodError'), "" + "No block specified to process " + (kind_name) + " extension at " + (block.$source_location().$join(":")))
20862
20983
  };
20863
20984
  processor.$freeze();
20864
20985
 
@@ -20911,7 +21032,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20911
21032
  };
20912
21033
  }, $Registry_add_syntax_processor$89.$$arity = 2);
20913
21034
 
20914
- Opal.def(self, '$resolve_args', $Registry_resolve_args$91 = function $$resolve_args(args, expect) {
21035
+ Opal.def(self, '$reset', $Registry_reset$91 = function $$reset() {
21036
+ var self = this;
21037
+
21038
+
21039
+ 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)))))));
21040
+ return (self.document = nil);
21041
+ }, $Registry_reset$91.$$arity = 0);
21042
+
21043
+ Opal.def(self, '$resolve_args', $Registry_resolve_args$92 = function $$resolve_args(args, expect) {
20915
21044
  var self = this, opts = nil, missing = nil;
20916
21045
 
20917
21046
 
@@ -20928,8 +21057,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20928
21057
  args.$pop(missing['$-@']())};
20929
21058
  args['$<<'](opts);
20930
21059
  return args;
20931
- }, $Registry_resolve_args$91.$$arity = 2);
20932
- return (Opal.def(self, '$as_symbol', $Registry_as_symbol$92 = function $$as_symbol(name) {
21060
+ }, $Registry_resolve_args$92.$$arity = 2);
21061
+ return (Opal.def(self, '$as_symbol', $Registry_as_symbol$93 = function $$as_symbol(name) {
20933
21062
  var self = this;
20934
21063
 
20935
21064
  if ($truthy(name)) {
@@ -20937,42 +21066,42 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20937
21066
  } else {
20938
21067
  return nil
20939
21068
  }
20940
- }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol';
21069
+ }, $Registry_as_symbol$93.$$arity = 1), nil) && 'as_symbol';
20941
21070
  })($nesting[0], null, $nesting);
20942
21071
  (function(self, $parent_nesting) {
20943
- var $nesting = [self].concat($parent_nesting), $generate_name$93, $next_auto_id$94, $groups$95, $create$96, $register$97, $unregister_all$98, $unregister$99;
21072
+ var $nesting = [self].concat($parent_nesting), $generate_name$94, $next_auto_id$95, $groups$96, $create$97, $register$98, $unregister_all$99, $unregister$100;
20944
21073
 
20945
21074
 
20946
21075
 
20947
- Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() {
21076
+ Opal.def(self, '$generate_name', $generate_name$94 = function $$generate_name() {
20948
21077
  var self = this;
20949
21078
 
20950
21079
  return "" + "extgrp" + (self.$next_auto_id())
20951
- }, $generate_name$93.$$arity = 0);
21080
+ }, $generate_name$94.$$arity = 0);
20952
21081
 
20953
- Opal.def(self, '$next_auto_id', $next_auto_id$94 = function $$next_auto_id() {
21082
+ Opal.def(self, '$next_auto_id', $next_auto_id$95 = function $$next_auto_id() {
20954
21083
  var $a, self = this;
20955
21084
  if (self.auto_id == null) self.auto_id = nil;
20956
21085
 
20957
21086
 
20958
21087
  self.auto_id = ($truthy($a = self.auto_id) ? $a : -1);
20959
21088
  return (self.auto_id = $rb_plus(self.auto_id, 1));
20960
- }, $next_auto_id$94.$$arity = 0);
21089
+ }, $next_auto_id$95.$$arity = 0);
20961
21090
 
20962
- Opal.def(self, '$groups', $groups$95 = function $$groups() {
21091
+ Opal.def(self, '$groups', $groups$96 = function $$groups() {
20963
21092
  var $a, self = this;
20964
21093
  if (self.groups == null) self.groups = nil;
20965
21094
 
20966
21095
  return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {})))
20967
- }, $groups$95.$$arity = 0);
21096
+ }, $groups$96.$$arity = 0);
20968
21097
 
20969
- Opal.def(self, '$create', $create$96 = function $$create(name) {
20970
- var $iter = $create$96.$$p, block = $iter || nil, $a, self = this;
21098
+ Opal.def(self, '$create', $create$97 = function $$create(name) {
21099
+ var $iter = $create$97.$$p, block = $iter || nil, $a, self = this;
20971
21100
 
20972
- if ($iter) $create$96.$$p = null;
21101
+ if ($iter) $create$97.$$p = null;
20973
21102
 
20974
21103
 
20975
- if ($iter) $create$96.$$p = null;;
21104
+ if ($iter) $create$97.$$p = null;;
20976
21105
 
20977
21106
  if (name == null) {
20978
21107
  name = nil;
@@ -20982,15 +21111,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20982
21111
  } else {
20983
21112
  return $$($nesting, 'Registry').$new()
20984
21113
  };
20985
- }, $create$96.$$arity = -1);
21114
+ }, $create$97.$$arity = -1);
20986
21115
 
20987
- Opal.def(self, '$register', $register$97 = function $$register($a) {
20988
- 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;
21116
+ Opal.def(self, '$register', $register$98 = function $$register($a) {
21117
+ 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;
20989
21118
 
20990
- if ($iter) $register$97.$$p = null;
21119
+ if ($iter) $register$98.$$p = null;
20991
21120
 
20992
21121
 
20993
- if ($iter) $register$97.$$p = null;;
21122
+ if ($iter) $register$98.$$p = null;;
20994
21123
 
20995
21124
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
20996
21125
 
@@ -21012,34 +21141,37 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
21012
21141
  $writer = [name.$to_sym(), resolved_group];
21013
21142
  $send(self.$groups(), '[]=', Opal.to_a($writer));
21014
21143
  return $writer[$rb_minus($writer["length"], 1)];;
21015
- }, $register$97.$$arity = -1);
21144
+ }, $register$98.$$arity = -1);
21016
21145
 
21017
- Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() {
21146
+ Opal.def(self, '$unregister_all', $unregister_all$99 = function $$unregister_all() {
21018
21147
  var self = this;
21019
21148
 
21020
21149
 
21021
21150
  self.groups = $hash2([], {});
21022
21151
  return nil;
21023
- }, $unregister_all$98.$$arity = 0);
21024
- return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) {
21025
- var $post_args, names, $$100, self = this;
21152
+ }, $unregister_all$99.$$arity = 0);
21153
+ return (Opal.def(self, '$unregister', $unregister$100 = function $$unregister($a) {
21154
+ var $post_args, names, $$101, self = this;
21026
21155
 
21027
21156
 
21028
21157
 
21029
21158
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
21030
21159
 
21031
21160
  names = $post_args;;
21032
- $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this;
21033
- if (self.groups == null) self.groups = nil;
21161
+ $send(names, 'each_with_object', [self.$groups()], ($$101 = function(group, catalog){var self = $$101.$$s || this;
21034
21162
 
21035
21163
 
21036
21164
 
21037
21165
  if (group == null) {
21038
21166
  group = nil;
21039
21167
  };
21040
- return self.groups.$delete(group.$to_sym());}, $$100.$$s = self, $$100.$$arity = 1, $$100));
21168
+
21169
+ if (catalog == null) {
21170
+ catalog = nil;
21171
+ };
21172
+ return catalog.$delete(group.$to_sym());}, $$101.$$s = self, $$101.$$arity = 2, $$101));
21041
21173
  return nil;
21042
- }, $unregister$99.$$arity = -1), nil) && 'unregister';
21174
+ }, $unregister$100.$$arity = -1), nil) && 'unregister';
21043
21175
  })(Opal.get_singleton_class(self), $nesting);
21044
21176
  })($nesting[0], $nesting)
21045
21177
  })($nesting[0], $nesting);
@@ -21395,7 +21527,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
21395
21527
  self.$require("asciidoctor/converter/html5");
21396
21528
  self.$require("asciidoctor/extensions");
21397
21529
  self.$require("asciidoctor/js/asciidoctor_ext");
21398
- return self.$require("asciidoctor/js/opal_ext/logger");
21530
+ self.$require("asciidoctor/js/opal_ext/logger");
21531
+ 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,.?!\\[\\]<\\)])))"));
21399
21532
  };
21400
21533
 
21401
21534
  /* Generated by Opal 0.11.99.dev */
@@ -21530,13 +21663,13 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
21530
21663
  Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
21531
21664
  return "r"
21532
21665
  } else {
21533
- return "rb:utf-8:utf-8"
21666
+ return "rb:UTF-8:UTF-8"
21534
21667
  }; return nil; })());
21535
21668
  Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE'));
21536
21669
  Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
21537
21670
  return "w"
21538
21671
  } else {
21539
- return "w:utf-8"
21672
+ return "wb:UTF-8"
21540
21673
  }; return nil; })());
21541
21674
  Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article");
21542
21675
  Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5");
@@ -27022,7 +27155,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
27022
27155
  }
27023
27156
 
27024
27157
 
27025
- var ASCIIDOCTOR_JS_VERSION = '2.2.6';
27158
+ var ASCIIDOCTOR_JS_VERSION = '2.2.7';
27026
27159
 
27027
27160
  /**
27028
27161
  * Get Asciidoctor.js version number.