@asciidoctor/core 2.2.5 → 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");
@@ -1950,9 +1975,9 @@ Opal.modules["asciidoctor/core_ext/hash/merge"] = function(Opal) {
1950
1975
  function $rb_gt(lhs, rhs) {
1951
1976
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
1952
1977
  }
1953
- var $$1, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2;
1978
+ var $$1, self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $send = Opal.send, $truthy = Opal.truthy;
1954
1979
 
1955
- Opal.add_stubs(['$==', '$arity', '$instance_method', '$send', '$new', '$<', '$length', '$>', '$inject', '$merge', '$[]']);
1980
+ Opal.add_stubs(['$==', '$arity', '$instance_method', '$send', '$new', '$<', '$length', '$dup', '$>', '$inject', '$merge', '$[]']);
1956
1981
  if ($$($nesting, 'Hash').$instance_method("merge").$arity()['$=='](1)) {
1957
1982
  return $$($nesting, 'Hash').$send("prepend", $send($$($nesting, 'Module'), 'new', [], ($$1 = function(){var self = $$1.$$s || this, $merge$2;
1958
1983
 
@@ -1966,7 +1991,7 @@ Opal.modules["asciidoctor/core_ext/hash/merge"] = function(Opal) {
1966
1991
 
1967
1992
  args = $post_args;;
1968
1993
  if ($truthy($rb_lt((len = args.$length()), 1))) {
1969
- return $send(self, Opal.find_super_dispatcher(self, 'merge', $merge$2, false), [$hash2([], {})], null)
1994
+ return self.$dup()
1970
1995
  } else {
1971
1996
 
1972
1997
  if ($truthy($rb_gt(len, 1))) {
@@ -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;
2287
2313
 
2288
- return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
2289
- }, $Helpers_uriish$ques$16.$$arity = 1);
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;
2320
+
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)))['$=='](")")))) {
3848
-
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))) {
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)))) {
3855
3901
 
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))) {
3932
+ link_opts = $hash2(["type"], {"type": "link"});
3933
+ if ($truthy(link_text)) {
3884
3934
 
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?']("^"))) {
3892
-
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-")) {
4429
4483
 
4430
4484
  old_behavior = true;
4431
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));};
4432
- attributes = self.$parse_quoted_text_attributes(attrlist);
4485
+ attributes = $hash2([], {});
4486
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
4487
+
4488
+ old_behavior = true;
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.16")
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 {
@@ -5760,15 +5811,12 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
5760
5811
  function $rb_minus(lhs, rhs) {
5761
5812
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
5762
5813
  }
5763
- function $rb_gt(lhs, rhs) {
5764
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
5765
- }
5766
5814
  function $rb_plus(lhs, rhs) {
5767
5815
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
5768
5816
  }
5769
5817
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy;
5770
5818
 
5771
- Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$==', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '$parent', '$parent=', '$-', '$<<', '$empty?', '$>', '$Integer', '$find_by_internal', '$to_proc', '$context', '$[]', '$items', '$+', '$find_index', '$include?', '$next_adjacent_block', '$blocks', '$select', '$sub_specialchars', '$match?', '$sub_replacements', '$title', '$apply_title_subs', '$delete', '$reftext', '$!', '$nil_or_empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$attributes', '$chomp', '$increment_and_store_counter', '$index=', '$numbered', '$sectname', '$counter', '$numeral=', '$numeral', '$caption=', '$int_to_roman', '$each', '$assign_numeral', '$reindex_sections', '$protected', '$has_role?', '$raise', '$header?', '$!=', '$flatten', '$head', '$rows', '$merge', '$body', '$foot', '$style', '$inner_document']);
5819
+ Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$==', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '$parent', '$parent=', '$-', '$<<', '$empty?', '$Integer', '$find_by_internal', '$to_proc', '$context', '$[]', '$items', '$+', '$find_index', '$include?', '$next_adjacent_block', '$blocks', '$select', '$sub_specialchars', '$match?', '$sub_replacements', '$title', '$apply_title_subs', '$delete', '$reftext', '$!', '$nil_or_empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$attributes', '$chomp', '$increment_and_store_counter', '$index=', '$numbered', '$sectname', '$counter', '$numeral=', '$numeral', '$caption=', '$int_to_roman', '$each', '$assign_numeral', '$reindex_sections', '$protected', '$has_role?', '$raise', '$header?', '$!=', '$flatten', '$head', '$rows', '$merge', '$body', '$foot', '$style', '$inner_document']);
5772
5820
  return (function($base, $parent_nesting) {
5773
5821
  var self = $module($base, 'Asciidoctor');
5774
5822
 
@@ -5779,7 +5827,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
5779
5827
 
5780
5828
  var $nesting = [self].concat($parent_nesting), $AbstractBlock_initialize$1, $AbstractBlock_block$ques$2, $AbstractBlock_inline$ques$3, $AbstractBlock_file$4, $AbstractBlock_lineno$5, $AbstractBlock_convert$6, $AbstractBlock_content$7, $AbstractBlock_context$eq$9, $AbstractBlock_$lt$lt$10, $AbstractBlock_blocks$ques$11, $AbstractBlock_sections$ques$12, $AbstractBlock_number$13, $AbstractBlock_number$eq$14, $AbstractBlock_find_by$15, $AbstractBlock_next_adjacent_block$16, $AbstractBlock_sections$18, $AbstractBlock_alt$20, $AbstractBlock_caption$21, $AbstractBlock_captioned_title$22, $AbstractBlock_list_marker_keyword$23, $AbstractBlock_title$24, $AbstractBlock_title$ques$25, $AbstractBlock_title$eq$26, $AbstractBlock_sub$ques$27, $AbstractBlock_remove_sub$28, $AbstractBlock_xreftext$29, $AbstractBlock_assign_caption$30, $AbstractBlock_assign_numeral$31, $AbstractBlock_reindex_sections$32, $AbstractBlock_find_by_internal$34;
5781
5829
 
5782
- self.$$prototype.source_location = self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.blocks = self.$$prototype.next_section_index = self.$$prototype.numeral = self.$$prototype.context = self.$$prototype.parent = self.$$prototype.caption = self.$$prototype.style = self.$$prototype.converted_title = self.$$prototype.title = self.$$prototype.subs = self.$$prototype.next_section_ordinal = self.$$prototype.id = self.$$prototype.header = nil;
5830
+ self.$$prototype.source_location = self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.blocks = self.$$prototype.numeral = self.$$prototype.context = self.$$prototype.parent = self.$$prototype.caption = self.$$prototype.style = self.$$prototype.converted_title = self.$$prototype.title = self.$$prototype.subs = self.$$prototype.next_section_index = self.$$prototype.next_section_ordinal = self.$$prototype.id = self.$$prototype.header = nil;
5783
5831
 
5784
5832
  self.$attr_reader("blocks");
5785
5833
  self.$attr_writer("caption");
@@ -5900,7 +5948,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
5900
5948
  Opal.def(self, '$sections?', $AbstractBlock_sections$ques$12 = function() {
5901
5949
  var self = this;
5902
5950
 
5903
- return $rb_gt(self.next_section_index, 0)
5951
+ return false
5904
5952
  }, $AbstractBlock_sections$ques$12.$$arity = 0);
5905
5953
 
5906
5954
  Opal.def(self, '$number', $AbstractBlock_number$13 = function $$number() {
@@ -6715,7 +6763,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
6715
6763
  else if ("verbatim"['$===']($case) || "raw"['$===']($case)) {
6716
6764
  result = self.$apply_subs(self.lines, self.subs);
6717
6765
  if ($truthy($rb_lt(result.$size(), 2))) {
6718
- return result['$[]'](0)
6766
+ return ($truthy($a = result['$[]'](0)) ? $a : "")
6719
6767
  } else {
6720
6768
 
6721
6769
  while ($truthy(($truthy($b = (first = result['$[]'](0))) ? first.$rstrip()['$empty?']() : $b))) {
@@ -6729,7 +6777,7 @@ Opal.modules["asciidoctor/block"] = function(Opal) {
6729
6777
  else {
6730
6778
  if (self.content_model['$==']("empty")) {
6731
6779
  } else {
6732
- 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))
6733
6781
  };
6734
6782
  return nil;}})()
6735
6783
  }, $Block_content$2.$$arity = 0);
@@ -6882,7 +6930,7 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
6882
6930
  }
6883
6931
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send, $klass = Opal.klass, $gvars = Opal.gvars;
6884
6932
 
6885
- Opal.add_stubs(['$autoload', '$__dir__', '$attr_reader', '$raise', '$class', '$[]', '$sub', '$slice', '$length', '$==', '$[]=', '$backend_traits', '$-', '$derive_backend_traits', '$register', '$map', '$to_s', '$new', '$create', '$default', '$each', '$default=', '$registry', '$for', '$===', '$supports_templates?', '$merge', '$private', '$include', '$delete', '$clear', '$send', '$extend', '$private_class_method', '$node_name', '$+', '$receiver', '$name', '$warn', '$logger', '$respond_to?', '$content']);
6933
+ Opal.add_stubs(['$autoload', '$__dir__', '$==', '$attr_reader', '$raise', '$class', '$[]', '$sub', '$slice', '$length', '$[]=', '$backend_traits', '$-', '$derive_backend_traits', '$register', '$map', '$to_s', '$new', '$create', '$default', '$each', '$default=', '$registry', '$for', '$===', '$supports_templates?', '$merge', '$private', '$include', '$delete', '$clear', '$send', '$extend', '$private_class_method', '$node_name', '$+', '$receiver', '$name', '$warn', '$logger', '$respond_to?', '$content']);
6886
6934
  return (function($base, $parent_nesting) {
6887
6935
  var self = $module($base, 'Asciidoctor');
6888
6936
 
@@ -6895,7 +6943,10 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
6895
6943
 
6896
6944
 
6897
6945
  self.$autoload("CompositeConverter", "" + (self.$__dir__()) + "/converter/composite");
6898
- self.$autoload("TemplateConverter", "" + (self.$__dir__()) + "/converter/template");
6946
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
6947
+ } else {
6948
+ nil
6949
+ };
6899
6950
  self.$attr_reader("backend");
6900
6951
 
6901
6952
  Opal.def(self, '$initialize', $Converter_initialize$1 = function $$initialize(backend, opts) {
@@ -7423,7 +7474,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
7423
7474
  }
7424
7475
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $hash = Opal.hash, $gvars = Opal.gvars;
7425
7476
 
7426
- Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$instance_variable_get', '$attributes', '$safe', '$compat_mode', '$outfilesuffix', '$sourcemap', '$path_resolver', '$converter', '$extensions', '$syntax_highlighter', '$each', '$end_with?', '$start_with?', '$slice', '$length', '$chop', '$==', '$downcase', '$===', '$extname', '$value_for_name', '$key?', '$freeze', '$attribute_undefined', '$attribute_missing', '$update', '$&', '$keys', '$name_for_value', '$expand_path', '$pwd', '$to_s', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$groups', '$create', '$to_proc', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$attribute_locked?', '$nil_or_empty?', '$nextval', '$value', '$save_to', '$register', '$tap', '$xreftext', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$>', '$<', '$find', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$apply_attribute_value_subs', '$delete?', '$start', '$doctype', '$content_model', '$warn', '$logger', '$content', '$convert', '$postprocessors?', '$postprocessors', '$record', '$write', '$respond_to?', '$chomp', '$class', '$write_alternate_pages', '$map', '$split', '$resolve_docinfo_subs', '$normalize_system_path', '$read_asset', '$apply_subs', '$docinfo_processors?', '$join', '$concat', '$compact', '$docinfo_processors', '$object_id', '$inspect', '$size', '$private', '$=~', '$resolve_pass_subs', '$apply_header_subs', '$limit_bytesize', '$bytesize', '$valid_encoding?', '$byteslice', '$resolve_subs', '$utc', '$at', '$Integer', '$now', '$index', '$strftime', '$year', '$utc_offset', '$partition', '$create_converter', '$basebackend', '$filetype', '$htmlsyntax', '$derive_backend_traits', '$raise']);
7477
+ Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$instance_variable_get', '$attributes', '$safe', '$compat_mode', '$outfilesuffix', '$sourcemap', '$path_resolver', '$converter', '$extensions', '$syntax_highlighter', '$each', '$end_with?', '$start_with?', '$slice', '$length', '$chop', '$==', '$downcase', '$===', '$extname', '$value_for_name', '$key?', '$freeze', '$attribute_undefined', '$attribute_missing', '$update', '$&', '$keys', '$name_for_value', '$expand_path', '$pwd', '$to_s', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$groups', '$create', '$to_proc', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$attribute_locked?', '$nil_or_empty?', '$nextval', '$value', '$save_to', '$register', '$tap', '$xreftext', '$>', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$<', '$find', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$apply_attribute_value_subs', '$delete?', '$start', '$doctype', '$content_model', '$warn', '$logger', '$content', '$convert', '$postprocessors?', '$postprocessors', '$record', '$write', '$respond_to?', '$chomp', '$class', '$write_alternate_pages', '$map', '$split', '$resolve_docinfo_subs', '$normalize_system_path', '$read_asset', '$apply_subs', '$docinfo_processors?', '$join', '$concat', '$compact', '$docinfo_processors', '$object_id', '$inspect', '$size', '$private', '$=~', '$resolve_pass_subs', '$apply_header_subs', '$limit_bytesize', '$bytesize', '$valid_encoding?', '$byteslice', '$resolve_subs', '$utc', '$at', '$Integer', '$now', '$index', '$strftime', '$year', '$utc_offset', '$partition', '$create_converter', '$basebackend', '$filetype', '$htmlsyntax', '$derive_backend_traits', '$raise']);
7427
7478
  return (function($base, $parent_nesting) {
7428
7479
  var self = $module($base, 'Asciidoctor');
7429
7480
 
@@ -7432,9 +7483,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
7432
7483
  (function($base, $super, $parent_nesting) {
7433
7484
  var self = $klass($base, $super, 'Document');
7434
7485
 
7435
- var $nesting = [self].concat($parent_nesting), $Document$1, $Document_initialize$8, $Document_parse$11, $Document_parsed$ques$14, $Document_counter$15, $Document_increment_and_store_counter$16, $Document_register$17, $Document_resolve_id$18, $Document_footnotes$ques$22, $Document_footnotes$23, $Document_callouts$24, $Document_nested$ques$25, $Document_embedded$ques$26, $Document_extensions$ques$27, $Document_source$28, $Document_source_lines$29, $Document_basebackend$ques$30, $Document_title$31, $Document_title$eq$32, $Document_doctitle$33, $Document_xreftext$34, $Document_author$35, $Document_authors$36, $Document_revdate$37, $Document_notitle$38, $Document_noheader$39, $Document_nofooter$40, $Document_first_section$41, $Document_header$ques$43, $Document_$lt$lt$44, $Document_finalize_header$45, $Document_playback_attributes$46, $Document_restore_attributes$48, $Document_set_attribute$49, $Document_delete_attribute$50, $Document_attribute_locked$ques$51, $Document_set_header_attribute$52, $Document_convert$53, $Document_write$55, $Document_content$56, $Document_docinfo$57, $Document_docinfo_processors$ques$60, $Document_to_s$61, $Document_apply_attribute_value_subs$62, $Document_limit_bytesize$63, $Document_resolve_docinfo_subs$64, $Document_create_converter$65, $Document_clear_playback_attributes$66, $Document_save_attributes$67, $Document_fill_datetime_attributes$69, $Document_update_backend_attributes$70, $Document_update_doctype_attributes$71;
7486
+ var $nesting = [self].concat($parent_nesting), $Document$1, $Document_initialize$8, $Document_parse$11, $Document_parsed$ques$14, $Document_counter$15, $Document_increment_and_store_counter$16, $Document_register$17, $Document_resolve_id$18, $Document_sections$ques$22, $Document_footnotes$ques$23, $Document_footnotes$24, $Document_callouts$25, $Document_nested$ques$26, $Document_embedded$ques$27, $Document_extensions$ques$28, $Document_source$29, $Document_source_lines$30, $Document_basebackend$ques$31, $Document_title$32, $Document_title$eq$33, $Document_doctitle$34, $Document_xreftext$35, $Document_author$36, $Document_authors$37, $Document_revdate$38, $Document_notitle$39, $Document_noheader$40, $Document_nofooter$41, $Document_first_section$42, $Document_header$ques$44, $Document_$lt$lt$45, $Document_finalize_header$46, $Document_playback_attributes$47, $Document_restore_attributes$49, $Document_set_attribute$50, $Document_delete_attribute$51, $Document_attribute_locked$ques$52, $Document_set_header_attribute$53, $Document_convert$54, $Document_write$56, $Document_content$57, $Document_docinfo$58, $Document_docinfo_processors$ques$61, $Document_to_s$62, $Document_apply_attribute_value_subs$63, $Document_limit_bytesize$64, $Document_resolve_docinfo_subs$65, $Document_create_converter$66, $Document_clear_playback_attributes$67, $Document_save_attributes$68, $Document_fill_datetime_attributes$70, $Document_update_backend_attributes$71, $Document_update_doctype_attributes$72;
7436
7487
 
7437
- self.$$prototype.attributes = self.$$prototype.safe = self.$$prototype.sourcemap = self.$$prototype.reader = self.$$prototype.base_dir = self.$$prototype.parsed = self.$$prototype.parent_document = self.$$prototype.extensions = self.$$prototype.options = self.$$prototype.counters = self.$$prototype.catalog = self.$$prototype.reftexts = self.$$prototype.header = self.$$prototype.blocks = self.$$prototype.header_attributes = self.$$prototype.attributes_modified = self.$$prototype.backend = self.$$prototype.attribute_overrides = self.$$prototype.timings = self.$$prototype.converter = self.$$prototype.outfilesuffix = self.$$prototype.docinfo_processor_extensions = self.$$prototype.document = self.$$prototype.max_attribute_value_size = self.$$prototype.id = self.$$prototype.doctype = nil;
7488
+ self.$$prototype.attributes = self.$$prototype.safe = self.$$prototype.sourcemap = self.$$prototype.reader = self.$$prototype.base_dir = self.$$prototype.parsed = self.$$prototype.parent_document = self.$$prototype.extensions = self.$$prototype.options = self.$$prototype.counters = self.$$prototype.catalog = self.$$prototype.reftexts = self.$$prototype.next_section_index = self.$$prototype.header = self.$$prototype.blocks = self.$$prototype.header_attributes = self.$$prototype.attributes_modified = self.$$prototype.backend = self.$$prototype.attribute_overrides = self.$$prototype.timings = self.$$prototype.converter = self.$$prototype.outfilesuffix = self.$$prototype.docinfo_processor_extensions = self.$$prototype.document = self.$$prototype.max_attribute_value_size = self.$$prototype.id = self.$$prototype.doctype = nil;
7438
7489
 
7439
7490
  Opal.const_set($nesting[0], 'ImageReference', $send($$$('::', 'Struct'), 'new', ["target", "imagesdir"], ($Document$1 = function(){var self = $Document$1.$$s || this;
7440
7491
 
@@ -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");
@@ -8068,7 +8124,13 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8068
8124
  }
8069
8125
  }, $Document_resolve_id$18.$$arity = 1);
8070
8126
 
8071
- Opal.def(self, '$footnotes?', $Document_footnotes$ques$22 = function() {
8127
+ Opal.def(self, '$sections?', $Document_sections$ques$22 = function() {
8128
+ var self = this;
8129
+
8130
+ return $rb_gt(self.next_section_index, 0)
8131
+ }, $Document_sections$ques$22.$$arity = 0);
8132
+
8133
+ Opal.def(self, '$footnotes?', $Document_footnotes$ques$23 = function() {
8072
8134
  var self = this;
8073
8135
 
8074
8136
  if ($truthy(self.catalog['$[]']("footnotes")['$empty?']())) {
@@ -8076,21 +8138,21 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8076
8138
  } else {
8077
8139
  return true
8078
8140
  }
8079
- }, $Document_footnotes$ques$22.$$arity = 0);
8141
+ }, $Document_footnotes$ques$23.$$arity = 0);
8080
8142
 
8081
- Opal.def(self, '$footnotes', $Document_footnotes$23 = function $$footnotes() {
8143
+ Opal.def(self, '$footnotes', $Document_footnotes$24 = function $$footnotes() {
8082
8144
  var self = this;
8083
8145
 
8084
8146
  return self.catalog['$[]']("footnotes")
8085
- }, $Document_footnotes$23.$$arity = 0);
8147
+ }, $Document_footnotes$24.$$arity = 0);
8086
8148
 
8087
- Opal.def(self, '$callouts', $Document_callouts$24 = function $$callouts() {
8149
+ Opal.def(self, '$callouts', $Document_callouts$25 = function $$callouts() {
8088
8150
  var self = this;
8089
8151
 
8090
8152
  return self.catalog['$[]']("callouts")
8091
- }, $Document_callouts$24.$$arity = 0);
8153
+ }, $Document_callouts$25.$$arity = 0);
8092
8154
 
8093
- Opal.def(self, '$nested?', $Document_nested$ques$25 = function() {
8155
+ Opal.def(self, '$nested?', $Document_nested$ques$26 = function() {
8094
8156
  var self = this;
8095
8157
 
8096
8158
  if ($truthy(self.parent_document)) {
@@ -8098,15 +8160,15 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8098
8160
  } else {
8099
8161
  return false
8100
8162
  }
8101
- }, $Document_nested$ques$25.$$arity = 0);
8163
+ }, $Document_nested$ques$26.$$arity = 0);
8102
8164
 
8103
- Opal.def(self, '$embedded?', $Document_embedded$ques$26 = function() {
8165
+ Opal.def(self, '$embedded?', $Document_embedded$ques$27 = function() {
8104
8166
  var self = this;
8105
8167
 
8106
8168
  return self.attributes['$key?']("embedded")
8107
- }, $Document_embedded$ques$26.$$arity = 0);
8169
+ }, $Document_embedded$ques$27.$$arity = 0);
8108
8170
 
8109
- Opal.def(self, '$extensions?', $Document_extensions$ques$27 = function() {
8171
+ Opal.def(self, '$extensions?', $Document_extensions$ques$28 = function() {
8110
8172
  var self = this;
8111
8173
 
8112
8174
  if ($truthy(self.extensions)) {
@@ -8114,9 +8176,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8114
8176
  } else {
8115
8177
  return false
8116
8178
  }
8117
- }, $Document_extensions$ques$27.$$arity = 0);
8179
+ }, $Document_extensions$ques$28.$$arity = 0);
8118
8180
 
8119
- Opal.def(self, '$source', $Document_source$28 = function $$source() {
8181
+ Opal.def(self, '$source', $Document_source$29 = function $$source() {
8120
8182
  var self = this;
8121
8183
 
8122
8184
  if ($truthy(self.reader)) {
@@ -8124,9 +8186,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8124
8186
  } else {
8125
8187
  return nil
8126
8188
  }
8127
- }, $Document_source$28.$$arity = 0);
8189
+ }, $Document_source$29.$$arity = 0);
8128
8190
 
8129
- Opal.def(self, '$source_lines', $Document_source_lines$29 = function $$source_lines() {
8191
+ Opal.def(self, '$source_lines', $Document_source_lines$30 = function $$source_lines() {
8130
8192
  var self = this;
8131
8193
 
8132
8194
  if ($truthy(self.reader)) {
@@ -8134,21 +8196,21 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8134
8196
  } else {
8135
8197
  return nil
8136
8198
  }
8137
- }, $Document_source_lines$29.$$arity = 0);
8199
+ }, $Document_source_lines$30.$$arity = 0);
8138
8200
 
8139
- Opal.def(self, '$basebackend?', $Document_basebackend$ques$30 = function(base) {
8201
+ Opal.def(self, '$basebackend?', $Document_basebackend$ques$31 = function(base) {
8140
8202
  var self = this;
8141
8203
 
8142
8204
  return self.attributes['$[]']("basebackend")['$=='](base)
8143
- }, $Document_basebackend$ques$30.$$arity = 1);
8205
+ }, $Document_basebackend$ques$31.$$arity = 1);
8144
8206
 
8145
- Opal.def(self, '$title', $Document_title$31 = function $$title() {
8207
+ Opal.def(self, '$title', $Document_title$32 = function $$title() {
8146
8208
  var self = this;
8147
8209
 
8148
8210
  return self.$doctitle()
8149
- }, $Document_title$31.$$arity = 0);
8211
+ }, $Document_title$32.$$arity = 0);
8150
8212
 
8151
- Opal.def(self, '$title=', $Document_title$eq$32 = function(title) {
8213
+ Opal.def(self, '$title=', $Document_title$eq$33 = function(title) {
8152
8214
  var self = this, sect = nil, $writer = nil;
8153
8215
 
8154
8216
 
@@ -8163,9 +8225,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8163
8225
  $writer = [title];
8164
8226
  $send(sect, 'title=', Opal.to_a($writer));
8165
8227
  return $writer[$rb_minus($writer["length"], 1)];;
8166
- }, $Document_title$eq$32.$$arity = 1);
8228
+ }, $Document_title$eq$33.$$arity = 1);
8167
8229
 
8168
- Opal.def(self, '$doctitle', $Document_doctitle$33 = function $$doctitle(opts) {
8230
+ Opal.def(self, '$doctitle', $Document_doctitle$34 = function $$doctitle(opts) {
8169
8231
  var $a, self = this, val = nil, sect = nil, separator = nil;
8170
8232
 
8171
8233
 
@@ -8189,10 +8251,10 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8189
8251
  } else {
8190
8252
  return val
8191
8253
  };
8192
- }, $Document_doctitle$33.$$arity = -1);
8254
+ }, $Document_doctitle$34.$$arity = -1);
8193
8255
  Opal.alias(self, "name", "doctitle");
8194
8256
 
8195
- Opal.def(self, '$xreftext', $Document_xreftext$34 = function $$xreftext(xrefstyle) {
8257
+ Opal.def(self, '$xreftext', $Document_xreftext$35 = function $$xreftext(xrefstyle) {
8196
8258
  var $a, self = this, val = nil;
8197
8259
 
8198
8260
 
@@ -8205,15 +8267,15 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8205
8267
  } else {
8206
8268
  return self.$title()
8207
8269
  };
8208
- }, $Document_xreftext$34.$$arity = -1);
8270
+ }, $Document_xreftext$35.$$arity = -1);
8209
8271
 
8210
- Opal.def(self, '$author', $Document_author$35 = function $$author() {
8272
+ Opal.def(self, '$author', $Document_author$36 = function $$author() {
8211
8273
  var self = this;
8212
8274
 
8213
8275
  return self.attributes['$[]']("author")
8214
- }, $Document_author$35.$$arity = 0);
8276
+ }, $Document_author$36.$$arity = 0);
8215
8277
 
8216
- Opal.def(self, '$authors', $Document_authors$36 = function $$authors() {
8278
+ Opal.def(self, '$authors', $Document_authors$37 = function $$authors() {
8217
8279
  var $a, self = this, attrs = nil, authors = nil, num_authors = nil, idx = nil;
8218
8280
 
8219
8281
  if ($truthy((attrs = self.attributes)['$key?']("author"))) {
@@ -8231,46 +8293,46 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8231
8293
  } else {
8232
8294
  return []
8233
8295
  }
8234
- }, $Document_authors$36.$$arity = 0);
8296
+ }, $Document_authors$37.$$arity = 0);
8235
8297
 
8236
- Opal.def(self, '$revdate', $Document_revdate$37 = function $$revdate() {
8298
+ Opal.def(self, '$revdate', $Document_revdate$38 = function $$revdate() {
8237
8299
  var self = this;
8238
8300
 
8239
8301
  return self.attributes['$[]']("revdate")
8240
- }, $Document_revdate$37.$$arity = 0);
8302
+ }, $Document_revdate$38.$$arity = 0);
8241
8303
 
8242
- Opal.def(self, '$notitle', $Document_notitle$38 = function $$notitle() {
8304
+ Opal.def(self, '$notitle', $Document_notitle$39 = function $$notitle() {
8243
8305
  var self = this;
8244
8306
 
8245
8307
  return self.attributes['$key?']("notitle")
8246
- }, $Document_notitle$38.$$arity = 0);
8308
+ }, $Document_notitle$39.$$arity = 0);
8247
8309
 
8248
- Opal.def(self, '$noheader', $Document_noheader$39 = function $$noheader() {
8310
+ Opal.def(self, '$noheader', $Document_noheader$40 = function $$noheader() {
8249
8311
  var self = this;
8250
8312
 
8251
8313
  return self.attributes['$key?']("noheader")
8252
- }, $Document_noheader$39.$$arity = 0);
8314
+ }, $Document_noheader$40.$$arity = 0);
8253
8315
 
8254
- Opal.def(self, '$nofooter', $Document_nofooter$40 = function $$nofooter() {
8316
+ Opal.def(self, '$nofooter', $Document_nofooter$41 = function $$nofooter() {
8255
8317
  var self = this;
8256
8318
 
8257
8319
  return self.attributes['$key?']("nofooter")
8258
- }, $Document_nofooter$40.$$arity = 0);
8320
+ }, $Document_nofooter$41.$$arity = 0);
8259
8321
 
8260
- Opal.def(self, '$first_section', $Document_first_section$41 = function $$first_section() {
8261
- var $a, $$42, self = this;
8322
+ Opal.def(self, '$first_section', $Document_first_section$42 = function $$first_section() {
8323
+ var $a, $$43, self = this;
8262
8324
 
8263
- return ($truthy($a = self.header) ? $a : $send(self.blocks, 'find', [], ($$42 = function(e){var self = $$42.$$s || this;
8325
+ return ($truthy($a = self.header) ? $a : $send(self.blocks, 'find', [], ($$43 = function(e){var self = $$43.$$s || this;
8264
8326
 
8265
8327
 
8266
8328
 
8267
8329
  if (e == null) {
8268
8330
  e = nil;
8269
8331
  };
8270
- return e.$context()['$==']("section");}, $$42.$$s = self, $$42.$$arity = 1, $$42)))
8271
- }, $Document_first_section$41.$$arity = 0);
8332
+ return e.$context()['$==']("section");}, $$43.$$s = self, $$43.$$arity = 1, $$43)))
8333
+ }, $Document_first_section$42.$$arity = 0);
8272
8334
 
8273
- Opal.def(self, '$header?', $Document_header$ques$43 = function() {
8335
+ Opal.def(self, '$header?', $Document_header$ques$44 = function() {
8274
8336
  var self = this;
8275
8337
 
8276
8338
  if ($truthy(self.header)) {
@@ -8278,13 +8340,13 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8278
8340
  } else {
8279
8341
  return false
8280
8342
  }
8281
- }, $Document_header$ques$43.$$arity = 0);
8343
+ }, $Document_header$ques$44.$$arity = 0);
8282
8344
  Opal.alias(self, "has_header?", "header?");
8283
8345
 
8284
- Opal.def(self, '$<<', $Document_$lt$lt$44 = function(block) {
8285
- var $iter = $Document_$lt$lt$44.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
8346
+ Opal.def(self, '$<<', $Document_$lt$lt$45 = function(block) {
8347
+ var $iter = $Document_$lt$lt$45.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
8286
8348
 
8287
- if ($iter) $Document_$lt$lt$44.$$p = null;
8349
+ if ($iter) $Document_$lt$lt$45.$$p = null;
8288
8350
  // Prepare super implicit arguments
8289
8351
  for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
8290
8352
  $zuper[$zuper_i] = arguments[$zuper_i];
@@ -8292,10 +8354,10 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8292
8354
 
8293
8355
  if (block.$context()['$==']("section")) {
8294
8356
  self.$assign_numeral(block)};
8295
- return $send(self, Opal.find_super_dispatcher(self, '<<', $Document_$lt$lt$44, false), $zuper, $iter);
8296
- }, $Document_$lt$lt$44.$$arity = 1);
8357
+ return $send(self, Opal.find_super_dispatcher(self, '<<', $Document_$lt$lt$45, false), $zuper, $iter);
8358
+ }, $Document_$lt$lt$45.$$arity = 1);
8297
8359
 
8298
- Opal.def(self, '$finalize_header', $Document_finalize_header$45 = function $$finalize_header(unrooted_attributes, header_valid) {
8360
+ Opal.def(self, '$finalize_header', $Document_finalize_header$46 = function $$finalize_header(unrooted_attributes, header_valid) {
8299
8361
  var self = this, $writer = nil;
8300
8362
 
8301
8363
 
@@ -8313,13 +8375,13 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8313
8375
  $writer[$rb_minus($writer["length"], 1)];
8314
8376
  };
8315
8377
  return unrooted_attributes;
8316
- }, $Document_finalize_header$45.$$arity = -2);
8378
+ }, $Document_finalize_header$46.$$arity = -2);
8317
8379
 
8318
- Opal.def(self, '$playback_attributes', $Document_playback_attributes$46 = function $$playback_attributes(block_attributes) {
8319
- var $$47, self = this;
8380
+ Opal.def(self, '$playback_attributes', $Document_playback_attributes$47 = function $$playback_attributes(block_attributes) {
8381
+ var $$48, self = this;
8320
8382
 
8321
8383
  if ($truthy(block_attributes['$key?']("attribute_entries"))) {
8322
- return $send(block_attributes['$[]']("attribute_entries"), 'each', [], ($$47 = function(entry){var self = $$47.$$s || this, name = nil, $writer = nil;
8384
+ return $send(block_attributes['$[]']("attribute_entries"), 'each', [], ($$48 = function(entry){var self = $$48.$$s || this, name = nil, $writer = nil;
8323
8385
  if (self.attributes == null) self.attributes = nil;
8324
8386
 
8325
8387
 
@@ -8347,13 +8409,13 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8347
8409
  } else {
8348
8410
  return nil
8349
8411
  };
8350
- };}, $$47.$$s = self, $$47.$$arity = 1, $$47))
8412
+ };}, $$48.$$s = self, $$48.$$arity = 1, $$48))
8351
8413
  } else {
8352
8414
  return nil
8353
8415
  }
8354
- }, $Document_playback_attributes$46.$$arity = 1);
8416
+ }, $Document_playback_attributes$47.$$arity = 1);
8355
8417
 
8356
- Opal.def(self, '$restore_attributes', $Document_restore_attributes$48 = function $$restore_attributes() {
8418
+ Opal.def(self, '$restore_attributes', $Document_restore_attributes$49 = function $$restore_attributes() {
8357
8419
  var self = this;
8358
8420
 
8359
8421
 
@@ -8362,9 +8424,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8362
8424
  self.catalog['$[]']("callouts").$rewind()
8363
8425
  };
8364
8426
  return self.attributes.$replace(self.header_attributes);
8365
- }, $Document_restore_attributes$48.$$arity = 0);
8427
+ }, $Document_restore_attributes$49.$$arity = 0);
8366
8428
 
8367
- Opal.def(self, '$set_attribute', $Document_set_attribute$49 = function $$set_attribute(name, value) {
8429
+ Opal.def(self, '$set_attribute', $Document_set_attribute$50 = function $$set_attribute(name, value) {
8368
8430
  var $a, self = this, $writer = nil, $case = nil;
8369
8431
 
8370
8432
 
@@ -8398,9 +8460,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8398
8460
  };
8399
8461
  return value;
8400
8462
  };
8401
- }, $Document_set_attribute$49.$$arity = -2);
8463
+ }, $Document_set_attribute$50.$$arity = -2);
8402
8464
 
8403
- Opal.def(self, '$delete_attribute', $Document_delete_attribute$50 = function $$delete_attribute(name) {
8465
+ Opal.def(self, '$delete_attribute', $Document_delete_attribute$51 = function $$delete_attribute(name) {
8404
8466
  var self = this;
8405
8467
 
8406
8468
  if ($truthy(self['$attribute_locked?'](name))) {
@@ -8411,15 +8473,15 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8411
8473
  self.attributes_modified['$<<'](name);
8412
8474
  return true;
8413
8475
  }
8414
- }, $Document_delete_attribute$50.$$arity = 1);
8476
+ }, $Document_delete_attribute$51.$$arity = 1);
8415
8477
 
8416
- Opal.def(self, '$attribute_locked?', $Document_attribute_locked$ques$51 = function(name) {
8478
+ Opal.def(self, '$attribute_locked?', $Document_attribute_locked$ques$52 = function(name) {
8417
8479
  var self = this;
8418
8480
 
8419
8481
  return self.attribute_overrides['$key?'](name)
8420
- }, $Document_attribute_locked$ques$51.$$arity = 1);
8482
+ }, $Document_attribute_locked$ques$52.$$arity = 1);
8421
8483
 
8422
- Opal.def(self, '$set_header_attribute', $Document_set_header_attribute$52 = function $$set_header_attribute(name, value, overwrite) {
8484
+ Opal.def(self, '$set_header_attribute', $Document_set_header_attribute$53 = function $$set_header_attribute(name, value, overwrite) {
8423
8485
  var $a, self = this, attrs = nil, $writer = nil;
8424
8486
 
8425
8487
 
@@ -8442,10 +8504,10 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8442
8504
  $writer[$rb_minus($writer["length"], 1)];;
8443
8505
  return true;
8444
8506
  };
8445
- }, $Document_set_header_attribute$52.$$arity = -2);
8507
+ }, $Document_set_header_attribute$53.$$arity = -2);
8446
8508
 
8447
- Opal.def(self, '$convert', $Document_convert$53 = function $$convert(opts) {
8448
- var $a, $$54, self = this, $writer = nil, block = nil, output = nil, transform = nil, exts = nil;
8509
+ Opal.def(self, '$convert', $Document_convert$54 = function $$convert(opts) {
8510
+ var $a, $$55, self = this, $writer = nil, block = nil, output = nil, transform = nil, exts = nil;
8449
8511
 
8450
8512
 
8451
8513
 
@@ -8502,21 +8564,21 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8502
8564
  };
8503
8565
  if ($truthy(self.parent_document)) {
8504
8566
  } else if ($truthy(($truthy($a = (exts = self.extensions)) ? exts['$postprocessors?']() : $a))) {
8505
- $send(exts.$postprocessors(), 'each', [], ($$54 = function(ext){var self = $$54.$$s || this;
8567
+ $send(exts.$postprocessors(), 'each', [], ($$55 = function(ext){var self = $$55.$$s || this;
8506
8568
 
8507
8569
 
8508
8570
 
8509
8571
  if (ext == null) {
8510
8572
  ext = nil;
8511
8573
  };
8512
- return (output = ext.$process_method()['$[]'](self, output));}, $$54.$$s = self, $$54.$$arity = 1, $$54))};
8574
+ return (output = ext.$process_method()['$[]'](self, output));}, $$55.$$s = self, $$55.$$arity = 1, $$55))};
8513
8575
  if ($truthy(self.timings)) {
8514
8576
  self.timings.$record("convert")};
8515
8577
  return output;
8516
- }, $Document_convert$53.$$arity = -1);
8578
+ }, $Document_convert$54.$$arity = -1);
8517
8579
  Opal.alias(self, "render", "convert");
8518
8580
 
8519
- Opal.def(self, '$write', $Document_write$55 = function $$write(output, target) {
8581
+ Opal.def(self, '$write', $Document_write$56 = function $$write(output, target) {
8520
8582
  var $a, $b, self = this;
8521
8583
 
8522
8584
 
@@ -8542,23 +8604,23 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8542
8604
  if ($truthy(self.timings)) {
8543
8605
  self.timings.$record("write")};
8544
8606
  return nil;
8545
- }, $Document_write$55.$$arity = 2);
8607
+ }, $Document_write$56.$$arity = 2);
8546
8608
 
8547
- Opal.def(self, '$content', $Document_content$56 = function $$content() {
8548
- var $iter = $Document_content$56.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
8609
+ Opal.def(self, '$content', $Document_content$57 = function $$content() {
8610
+ var $iter = $Document_content$57.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
8549
8611
 
8550
- if ($iter) $Document_content$56.$$p = null;
8612
+ if ($iter) $Document_content$57.$$p = null;
8551
8613
  // Prepare super implicit arguments
8552
8614
  for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
8553
8615
  $zuper[$zuper_i] = arguments[$zuper_i];
8554
8616
  }
8555
8617
 
8556
8618
  self.attributes.$delete("title");
8557
- return $send(self, Opal.find_super_dispatcher(self, 'content', $Document_content$56, false), $zuper, $iter);
8558
- }, $Document_content$56.$$arity = 0);
8619
+ return $send(self, Opal.find_super_dispatcher(self, 'content', $Document_content$57, false), $zuper, $iter);
8620
+ }, $Document_content$57.$$arity = 0);
8559
8621
 
8560
- Opal.def(self, '$docinfo', $Document_docinfo$57 = function $$docinfo(location, suffix) {
8561
- var $a, $$58, $$59, self = this, qualifier = nil, docinfo = nil, content = nil, docinfo_file = nil, docinfo_dir = nil, docinfo_subs = nil, docinfo_path = nil, shared_docinfo = nil, private_docinfo = nil;
8622
+ Opal.def(self, '$docinfo', $Document_docinfo$58 = function $$docinfo(location, suffix) {
8623
+ var $a, $$59, $$60, self = this, qualifier = nil, docinfo = nil, content = nil, docinfo_file = nil, docinfo_dir = nil, docinfo_subs = nil, docinfo_path = nil, shared_docinfo = nil, private_docinfo = nil;
8562
8624
 
8563
8625
 
8564
8626
 
@@ -8589,14 +8651,14 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8589
8651
  }; return nil; })()
8590
8652
  }
8591
8653
  } else {
8592
- docinfo = $send(docinfo.$split(","), 'map', [], ($$58 = function(it){var self = $$58.$$s || this;
8654
+ docinfo = $send(docinfo.$split(","), 'map', [], ($$59 = function(it){var self = $$59.$$s || this;
8593
8655
 
8594
8656
 
8595
8657
 
8596
8658
  if (it == null) {
8597
8659
  it = nil;
8598
8660
  };
8599
- return it.$strip();}, $$58.$$s = self, $$58.$$arity = 1, $$58))
8661
+ return it.$strip();}, $$59.$$s = self, $$59.$$arity = 1, $$59))
8600
8662
  };
8601
8663
  if ($truthy(docinfo)) {
8602
8664
 
@@ -8617,22 +8679,22 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8617
8679
  content['$<<'](self.$apply_subs(private_docinfo, docinfo_subs))};
8618
8680
  };};};
8619
8681
  if ($truthy(($truthy($a = self.extensions) ? self['$docinfo_processors?'](location) : $a))) {
8620
- return ($truthy($a = content) ? $a : []).$concat($send(self.docinfo_processor_extensions['$[]'](location), 'map', [], ($$59 = function(ext){var self = $$59.$$s || this;
8682
+ return ($truthy($a = content) ? $a : []).$concat($send(self.docinfo_processor_extensions['$[]'](location), 'map', [], ($$60 = function(ext){var self = $$60.$$s || this;
8621
8683
 
8622
8684
 
8623
8685
 
8624
8686
  if (ext == null) {
8625
8687
  ext = nil;
8626
8688
  };
8627
- return ext.$process_method()['$[]'](self);}, $$59.$$s = self, $$59.$$arity = 1, $$59)).$compact()).$join($$($nesting, 'LF'))
8689
+ return ext.$process_method()['$[]'](self);}, $$60.$$s = self, $$60.$$arity = 1, $$60)).$compact()).$join($$($nesting, 'LF'))
8628
8690
  } else if ($truthy(content)) {
8629
8691
  return content.$join($$($nesting, 'LF'))
8630
8692
  } else {
8631
8693
  return ""
8632
8694
  };
8633
- }, $Document_docinfo$57.$$arity = -1);
8695
+ }, $Document_docinfo$58.$$arity = -1);
8634
8696
 
8635
- Opal.def(self, '$docinfo_processors?', $Document_docinfo_processors$ques$60 = function(location) {
8697
+ Opal.def(self, '$docinfo_processors?', $Document_docinfo_processors$ques$61 = function(location) {
8636
8698
  var $a, self = this, $writer = nil;
8637
8699
 
8638
8700
 
@@ -8650,16 +8712,16 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8650
8712
  $send(self.docinfo_processor_extensions, '[]=', Opal.to_a($writer));
8651
8713
  return $writer[$rb_minus($writer["length"], 1)];
8652
8714
  };
8653
- }, $Document_docinfo_processors$ques$60.$$arity = -1);
8715
+ }, $Document_docinfo_processors$ques$61.$$arity = -1);
8654
8716
 
8655
- Opal.def(self, '$to_s', $Document_to_s$61 = function $$to_s() {
8717
+ Opal.def(self, '$to_s', $Document_to_s$62 = function $$to_s() {
8656
8718
  var $a, self = this;
8657
8719
 
8658
8720
  return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {doctype: " + (self.$doctype().$inspect()) + ", doctitle: " + (($truthy($a = self.header) ? self.header.$title() : $a).$inspect()) + ", blocks: " + (self.blocks.$size()) + "}>"
8659
- }, $Document_to_s$61.$$arity = 0);
8721
+ }, $Document_to_s$62.$$arity = 0);
8660
8722
  self.$private();
8661
8723
 
8662
- Opal.def(self, '$apply_attribute_value_subs', $Document_apply_attribute_value_subs$62 = function $$apply_attribute_value_subs(value) {
8724
+ Opal.def(self, '$apply_attribute_value_subs', $Document_apply_attribute_value_subs$63 = function $$apply_attribute_value_subs(value) {
8663
8725
  var $a, self = this;
8664
8726
 
8665
8727
 
@@ -8677,9 +8739,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8677
8739
  } else {
8678
8740
  return value
8679
8741
  };
8680
- }, $Document_apply_attribute_value_subs$62.$$arity = 1);
8742
+ }, $Document_apply_attribute_value_subs$63.$$arity = 1);
8681
8743
 
8682
- Opal.def(self, '$limit_bytesize', $Document_limit_bytesize$63 = function $$limit_bytesize(str, max) {
8744
+ Opal.def(self, '$limit_bytesize', $Document_limit_bytesize$64 = function $$limit_bytesize(str, max) {
8683
8745
  var $a, self = this;
8684
8746
 
8685
8747
 
@@ -8688,9 +8750,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8688
8750
  max = $rb_minus(max, 1)
8689
8751
  }};
8690
8752
  return str;
8691
- }, $Document_limit_bytesize$63.$$arity = 2);
8753
+ }, $Document_limit_bytesize$64.$$arity = 2);
8692
8754
 
8693
- Opal.def(self, '$resolve_docinfo_subs', $Document_resolve_docinfo_subs$64 = function $$resolve_docinfo_subs() {
8755
+ Opal.def(self, '$resolve_docinfo_subs', $Document_resolve_docinfo_subs$65 = function $$resolve_docinfo_subs() {
8694
8756
  var self = this;
8695
8757
 
8696
8758
  if ($truthy(self.attributes['$key?']("docinfosubs"))) {
@@ -8699,9 +8761,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8699
8761
  } else {
8700
8762
  return ["attributes"]
8701
8763
  }
8702
- }, $Document_resolve_docinfo_subs$64.$$arity = 0);
8764
+ }, $Document_resolve_docinfo_subs$65.$$arity = 0);
8703
8765
 
8704
- Opal.def(self, '$create_converter', $Document_create_converter$65 = function $$create_converter(backend, delegate_backend) {
8766
+ Opal.def(self, '$create_converter', $Document_create_converter$66 = function $$create_converter(backend, delegate_backend) {
8705
8767
  var $a, self = this, converter_opts = nil, template_dirs = nil, opts = nil, $writer = nil, converter = nil;
8706
8768
 
8707
8769
 
@@ -8742,16 +8804,16 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8742
8804
  } else {
8743
8805
  return opts.$fetch("converter_factory", $$($nesting, 'Converter')).$create(backend, converter_opts)
8744
8806
  };
8745
- }, $Document_create_converter$65.$$arity = 2);
8807
+ }, $Document_create_converter$66.$$arity = 2);
8746
8808
 
8747
- Opal.def(self, '$clear_playback_attributes', $Document_clear_playback_attributes$66 = function $$clear_playback_attributes(attributes) {
8809
+ Opal.def(self, '$clear_playback_attributes', $Document_clear_playback_attributes$67 = function $$clear_playback_attributes(attributes) {
8748
8810
  var self = this;
8749
8811
 
8750
8812
  return attributes.$delete("attribute_entries")
8751
- }, $Document_clear_playback_attributes$66.$$arity = 1);
8813
+ }, $Document_clear_playback_attributes$67.$$arity = 1);
8752
8814
 
8753
- Opal.def(self, '$save_attributes', $Document_save_attributes$67 = function $$save_attributes() {
8754
- var $a, $$68, self = this, attrs = nil, doctitle_val = nil, $writer = nil, toc_val = nil, toc_position_val = nil, toc_placement_val = nil, default_toc_position = nil, default_toc_class = nil, position = nil, $case = nil, icons_val = nil, basebackend = nil, syntax_hl_name = nil, syntax_hl_factory = nil, syntax_hls = nil;
8815
+ Opal.def(self, '$save_attributes', $Document_save_attributes$68 = function $$save_attributes() {
8816
+ var $a, $$69, self = this, attrs = nil, doctitle_val = nil, $writer = nil, toc_val = nil, toc_position_val = nil, toc_placement_val = nil, default_toc_position = nil, default_toc_class = nil, position = nil, $case = nil, icons_val = nil, basebackend = nil, syntax_hl_name = nil, syntax_hl_factory = nil, syntax_hls = nil;
8755
8817
 
8756
8818
 
8757
8819
  if ($truthy(($truthy($a = (attrs = self.attributes)['$key?']("doctitle")) ? $a : (doctitle_val = self.$doctitle())['$!']()))) {
@@ -8878,7 +8940,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8878
8940
  $writer[$rb_minus($writer["length"], 1)];
8879
8941
  };};
8880
8942
  self.outfilesuffix = attrs['$[]']("outfilesuffix");
8881
- $send($$($nesting, 'FLEXIBLE_ATTRIBUTES'), 'each', [], ($$68 = function(name){var self = $$68.$$s || this, $b;
8943
+ $send($$($nesting, 'FLEXIBLE_ATTRIBUTES'), 'each', [], ($$69 = function(name){var self = $$69.$$s || this, $b;
8882
8944
  if (self.attribute_overrides == null) self.attribute_overrides = nil;
8883
8945
 
8884
8946
 
@@ -8890,12 +8952,12 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8890
8952
  return self.attribute_overrides.$delete(name)
8891
8953
  } else {
8892
8954
  return nil
8893
- };}, $$68.$$s = self, $$68.$$arity = 1, $$68));
8955
+ };}, $$69.$$s = self, $$69.$$arity = 1, $$69));
8894
8956
  };
8895
8957
  return (self.header_attributes = attrs.$merge());
8896
- }, $Document_save_attributes$67.$$arity = 0);
8958
+ }, $Document_save_attributes$68.$$arity = 0);
8897
8959
 
8898
- Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$69 = function $$fill_datetime_attributes(attrs, input_mtime) {
8960
+ Opal.def(self, '$fill_datetime_attributes', $Document_fill_datetime_attributes$70 = function $$fill_datetime_attributes(attrs, input_mtime) {
8899
8961
  var $a, $b, self = this, now = nil, source_date_epoch = nil, localdate = nil, $writer = nil, localtime = nil, docdate = nil, doctime = nil;
8900
8962
 
8901
8963
 
@@ -8943,9 +9005,9 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
8943
9005
  }; return nil; })()))]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
8944
9006
  ($truthy($a = attrs['$[]']("docdatetime")) ? $a : (($writer = ["docdatetime", "" + (docdate) + " " + (doctime)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
8945
9007
  return nil;
8946
- }, $Document_fill_datetime_attributes$69.$$arity = 2);
9008
+ }, $Document_fill_datetime_attributes$70.$$arity = 2);
8947
9009
 
8948
- Opal.def(self, '$update_backend_attributes', $Document_update_backend_attributes$70 = function $$update_backend_attributes(new_backend, init) {
9010
+ Opal.def(self, '$update_backend_attributes', $Document_update_backend_attributes$71 = function $$update_backend_attributes(new_backend, init) {
8949
9011
  var $a, $b, self = this, current_backend = nil, current_basebackend = nil, attrs = nil, current_doctype = nil, actual_backend = nil, _ = nil, $writer = nil, delegate_backend = nil, converter = nil, new_basebackend = nil, new_filetype = nil, htmlsyntax = nil, backend_traits = nil, current_filetype = nil, page_width = nil;
8950
9012
 
8951
9013
 
@@ -9073,8 +9135,8 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
9073
9135
  } else {
9074
9136
  return nil
9075
9137
  };
9076
- }, $Document_update_backend_attributes$70.$$arity = -2);
9077
- return (Opal.def(self, '$update_doctype_attributes', $Document_update_doctype_attributes$71 = function $$update_doctype_attributes(new_doctype) {
9138
+ }, $Document_update_backend_attributes$71.$$arity = -2);
9139
+ return (Opal.def(self, '$update_doctype_attributes', $Document_update_doctype_attributes$72 = function $$update_doctype_attributes(new_doctype) {
9078
9140
  var $a, self = this, attrs = nil, current_backend = nil, current_basebackend = nil, current_doctype = nil, $writer = nil;
9079
9141
 
9080
9142
  if ($truthy(($truthy($a = new_doctype) ? new_doctype['$!='](self.doctype) : $a))) {
@@ -9118,7 +9180,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
9118
9180
  } else {
9119
9181
  return nil
9120
9182
  }
9121
- }, $Document_update_doctype_attributes$71.$$arity = 1), nil) && 'update_doctype_attributes';
9183
+ }, $Document_update_doctype_attributes$72.$$arity = 1), nil) && 'update_doctype_attributes';
9122
9184
  })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting)
9123
9185
  })($nesting[0], $nesting)
9124
9186
  };
@@ -9381,7 +9443,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9381
9443
  }
9382
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;
9383
9445
 
9384
- 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', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$save', '$update', '$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?', '$process_authors', '$apply_header_subs', '$rstrip', '$each_with_index', '$compact', '$squeeze', '$to_a', '$parse_style_attribute', '$process_attribute_entry', '$skip_comment_lines', '$store_attribute', '$sanitize_attribute_name', '$set_attribute', '$save_to', '$delete_attribute', '$ord', '$int_to_roman', '$resolve_list_marker', '$parse_colspecs', '$create_columns', '$has_header_option=', '$format', '$starts_with_delimiter?', '$close_open_cell', '$parse_cellspec', '$delimiter', '$match_delimiter', '$pre_match', '$post_match', '$buffer_has_unclosed_quotes?', '$skip_past_delimiter', '$buffer', '$buffer=', '$skip_past_escaped_delimiter', '$keep_cell_open', '$push_cellspec', '$close_cell', '$cell_open?', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
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', '$%']);
9385
9447
  return (function($base, $parent_nesting) {
9386
9448
  var self = $module($base, 'Asciidoctor');
9387
9449
 
@@ -9423,20 +9485,23 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9423
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)));
9424
9486
  Opal.const_set($nesting[0], 'NoOp', nil);
9425
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')));
9426
9491
  Opal.const_set($nesting[0], 'TableCellHorzAlignments', $hash2(["<", ">", "^"], {"<": "left", ">": "right", "^": "center"}));
9427
9492
  Opal.const_set($nesting[0], 'TableCellVertAlignments', $hash2(["<", ">", "^"], {"<": "top", ">": "bottom", "^": "middle"}));
9428
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"}));
9429
9494
  self.$private_class_method("new");
9430
9495
  Opal.defs(self, '$parse', $Parser_parse$4 = function $$parse(reader, document, options) {
9431
- var $a, $b, $c, self = this, block_attributes = nil, new_section = nil;
9496
+ var $a, $b, $c, self = this, block_attributes = nil, header_only = nil, new_section = nil;
9432
9497
 
9433
9498
 
9434
9499
 
9435
9500
  if (options == null) {
9436
9501
  options = $hash2([], {});
9437
9502
  };
9438
- block_attributes = self.$parse_document_header(reader, document);
9439
- if ($truthy(options['$[]']("header_only"))) {
9503
+ block_attributes = self.$parse_document_header(reader, document, (header_only = options['$[]']("header_only")));
9504
+ if ($truthy(header_only)) {
9440
9505
  } else {
9441
9506
  while ($truthy(reader['$has_more_lines?']())) {
9442
9507
 
@@ -9449,10 +9514,14 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9449
9514
  };
9450
9515
  return document;
9451
9516
  }, $Parser_parse$4.$$arity = -3);
9452
- Opal.defs(self, '$parse_document_header', $Parser_parse_document_header$5 = function $$parse_document_header(reader, document) {
9453
- var $a, $b, self = this, block_attrs = nil, doc_attrs = nil, implicit_doctitle = nil, val = nil, $writer = nil, doctitle_attr_val = nil, source_location = nil, _ = nil, l0_section_title = nil, atx = nil, separator = nil, doc_id = nil, role = nil, reftext = nil, modified_attrs = nil;
9517
+ Opal.defs(self, '$parse_document_header', $Parser_parse_document_header$5 = function $$parse_document_header(reader, document, header_only) {
9518
+ var $a, $b, self = this, block_attrs = nil, doc_attrs = nil, implicit_doctitle = nil, $writer = nil, val = nil, doctitle_attr_val = nil, source_location = nil, _ = nil, l0_section_title = nil, atx = nil, separator = nil, doc_id = nil, role = nil, reftext = nil, modified_attrs = nil, author = nil, author_metadata = nil;
9454
9519
 
9455
9520
 
9521
+
9522
+ if (header_only == null) {
9523
+ header_only = false;
9524
+ };
9456
9525
  block_attrs = (function() {if ($truthy(reader.$skip_blank_lines())) {
9457
9526
 
9458
9527
  return self.$parse_block_metadata_lines(reader, document);
@@ -9461,7 +9530,12 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9461
9530
  }; return nil; })();
9462
9531
  doc_attrs = document.$attributes();
9463
9532
  if ($truthy(($truthy($a = (implicit_doctitle = self['$is_next_line_doctitle?'](reader, block_attrs, doc_attrs['$[]']("leveloffset")))) ? block_attrs['$[]']("title") : $a))) {
9464
- return document.$finalize_header(block_attrs, false)};
9533
+
9534
+
9535
+ $writer = ["authorcount", 0];
9536
+ $send(doc_attrs, '[]=', Opal.to_a($writer));
9537
+ $writer[$rb_minus($writer["length"], 1)];;
9538
+ return document.$finalize_header(block_attrs, false);};
9465
9539
  if ($truthy((val = doc_attrs['$[]']("doctitle"))['$nil_or_empty?']())) {
9466
9540
  } else {
9467
9541
 
@@ -9528,7 +9602,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9528
9602
  $writer[$rb_minus($writer["length"], 1)];};
9529
9603
  block_attrs.$clear();
9530
9604
  (modified_attrs = document.$instance_variable_get("@attributes_modified")).$delete("doctitle");
9531
- self.$parse_header_metadata(reader, document);
9605
+ self.$parse_header_metadata(reader, document, nil);
9532
9606
  if ($truthy(modified_attrs['$include?']("doctitle"))) {
9533
9607
  if ($truthy(($truthy($a = (val = doc_attrs['$[]']("doctitle"))['$nil_or_empty?']()) ? $a : val['$=='](doctitle_attr_val)))) {
9534
9608
 
@@ -9544,15 +9618,35 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9544
9618
  } else if ($truthy(l0_section_title['$!']())) {
9545
9619
  modified_attrs['$<<']("doctitle")};
9546
9620
  if ($truthy(doc_id)) {
9547
- document.$register("refs", [doc_id, document])};};
9621
+ document.$register("refs", [doc_id, document])};
9622
+ } else if ($truthy((author = doc_attrs['$[]']("author")))) {
9623
+
9624
+ author_metadata = self.$process_authors(author, true, false);
9625
+ if ($truthy(doc_attrs['$[]']("authorinitials"))) {
9626
+ author_metadata.$delete("authorinitials")};
9627
+ doc_attrs.$update(author_metadata);
9628
+ } else if ($truthy((author = doc_attrs['$[]']("authors")))) {
9629
+
9630
+ author_metadata = self.$process_authors(author, true);
9631
+ doc_attrs.$update(author_metadata);
9632
+ } else {
9633
+
9634
+ $writer = ["authorcount", 0];
9635
+ $send(doc_attrs, '[]=', Opal.to_a($writer));
9636
+ $writer[$rb_minus($writer["length"], 1)];
9637
+ };
9548
9638
  if (document.$doctype()['$==']("manpage")) {
9549
- self.$parse_manpage_header(reader, document, block_attrs)};
9639
+ self.$parse_manpage_header(reader, document, block_attrs, header_only)};
9550
9640
  return document.$finalize_header(block_attrs);
9551
- }, $Parser_parse_document_header$5.$$arity = 2);
9552
- Opal.defs(self, '$parse_manpage_header', $Parser_parse_manpage_header$6 = function $$parse_manpage_header(reader, document, block_attributes) {
9641
+ }, $Parser_parse_document_header$5.$$arity = -3);
9642
+ Opal.defs(self, '$parse_manpage_header', $Parser_parse_manpage_header$6 = function $$parse_manpage_header(reader, document, block_attributes, header_only) {
9553
9643
  var $a, $b, $$7, $$8, self = this, doc_attrs = nil, $writer = nil, manvolnum = nil, mantitle = nil, manname = nil, name_section_level = nil, name_section = nil, name_section_buffer = nil, mannames = nil, manpurpose = nil, error_msg = nil;
9554
9644
 
9555
9645
 
9646
+
9647
+ if (header_only == null) {
9648
+ header_only = false;
9649
+ };
9556
9650
  if ($truthy($$($nesting, 'ManpageTitleVolnumRx')['$=~']((doc_attrs = document.$attributes())['$[]']("doctitle")))) {
9557
9651
 
9558
9652
 
@@ -9597,6 +9691,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9597
9691
  $writer = ["outfilesuffix", "" + "." + (manvolnum)];
9598
9692
  $send(doc_attrs, '[]=', Opal.to_a($writer));
9599
9693
  $writer[$rb_minus($writer["length"], 1)];;};
9694
+ } else if ($truthy(header_only)) {
9600
9695
  } else {
9601
9696
 
9602
9697
  reader.$skip_blank_lines();
@@ -9696,7 +9791,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9696
9791
  };
9697
9792
  };
9698
9793
  return nil;
9699
- }, $Parser_parse_manpage_header$6.$$arity = 3);
9794
+ }, $Parser_parse_manpage_header$6.$$arity = -4);
9700
9795
  Opal.defs(self, '$next_section', $Parser_next_section$9 = function $$next_section(reader, parent, attributes) {
9701
9796
  var $a, $b, $c, $d, self = this, preamble = nil, intro = nil, part = nil, has_header = nil, book = nil, document = nil, $writer = nil, section = nil, current_level = nil, expected_next_level = nil, expected_next_level_alt = nil, title = nil, sectname = nil, next_level = nil, expected_condition = nil, new_section = nil, block_cursor = nil, new_block = nil, first_block = nil, child_block = nil;
9702
9797
 
@@ -9795,16 +9890,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9795
9890
  if ($truthy(part)) {
9796
9891
  if ($truthy(section['$blocks?']()['$!']())) {
9797
9892
  if ($truthy(new_block.$style()['$!=']("partintro"))) {
9798
- if (new_block.$context()['$==']("paragraph")) {
9799
-
9800
-
9801
- $writer = ["open"];
9802
- $send(new_block, 'context=', Opal.to_a($writer));
9803
- $writer[$rb_minus($writer["length"], 1)];;
9893
+ if ($truthy((($b = new_block.$style()['$==']("open")) ? new_block.$context()['$==']("open") : new_block.$style()['$==']("open")))) {
9804
9894
 
9805
9895
  $writer = ["partintro"];
9806
9896
  $send(new_block, 'style=', Opal.to_a($writer));
9807
- $writer[$rb_minus($writer["length"], 1)];;
9897
+ $writer[$rb_minus($writer["length"], 1)];
9808
9898
  } else {
9809
9899
 
9810
9900
 
@@ -9816,7 +9906,16 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9816
9906
  $send(intro, 'style=', Opal.to_a($writer));
9817
9907
  $writer[$rb_minus($writer["length"], 1)];;
9818
9908
  section.$blocks()['$<<'](intro);
9819
- }}
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();}
9820
9919
  } else if (section.$blocks().$size()['$=='](1)) {
9821
9920
 
9822
9921
  first_block = section.$blocks()['$[]'](0);
@@ -9828,12 +9927,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9828
9927
  $writer = [(intro = $$($nesting, 'Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"})))];
9829
9928
  $send(new_block, 'parent=', Opal.to_a($writer));
9830
9929
  $writer[$rb_minus($writer["length"], 1)];;
9831
-
9832
- $writer = ["partintro"];
9833
- $send(intro, 'style=', Opal.to_a($writer));
9834
- $writer[$rb_minus($writer["length"], 1)];;
9835
- section.$blocks().$shift();
9836
- 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)]))) {
9837
9931
 
9838
9932
 
9839
9933
  $writer = ["paragraph"];
@@ -9843,6 +9937,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9843
9937
  $writer = [nil];
9844
9938
  $send(first_block, 'style=', Opal.to_a($writer));
9845
9939
  $writer[$rb_minus($writer["length"], 1)];;};
9940
+ section.$blocks().$shift();
9846
9941
  intro['$<<'](first_block);
9847
9942
  section.$blocks()['$<<'](intro);};}};
9848
9943
  ($truthy($b = intro) ? $b : section).$blocks()['$<<'](new_block);
@@ -9945,6 +10040,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
9945
10040
  if ($truthy(($truthy($b = ($truthy($c = style) ? $$($nesting, 'Compliance').$strict_verbatim_paragraphs() : $c)) ? $$($nesting, 'VERBATIM_STYLES')['$include?'](style) : $b))) {
9946
10041
 
9947
10042
  block_context = style.$to_sym();
10043
+ cloaked_context = "paragraph";
9948
10044
  reader.$unshift_line(this_line);
9949
10045
  break;;};
9950
10046
  if ($truthy(text_only)) {
@@ -10079,7 +10175,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10079
10175
  old_v = nil;
10080
10176
  };
10081
10177
  return old_v;}, $$11.$$s = self, $$11.$$arity = 2, $$11))};
10082
- if ($truthy((block = extension.$process_method()['$[]'](parent, target, attributes)))) {
10178
+ if ($truthy(($truthy($b = (block = extension.$process_method()['$[]'](parent, target, attributes))) ? block['$!='](parent) : $b))) {
10083
10179
 
10084
10180
  attributes.$replace(block.$attributes());
10085
10181
  break;;
@@ -10311,7 +10407,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10311
10407
  } else {
10312
10408
  $case = block_context;
10313
10409
  if ("listing"['$===']($case) || "source"['$===']($case)) {
10314
- 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; })())))) {
10315
10415
 
10316
10416
  if ($truthy(language)) {
10317
10417
 
@@ -10333,6 +10433,13 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10333
10433
  $writer = ["language", doc_attrs['$[]']("source-language")];
10334
10434
  $send(attributes, '[]=', Opal.to_a($writer));
10335
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
+ };
10336
10443
  };
10337
10444
  if ($truthy(attributes['$key?']("linenums"))) {
10338
10445
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
@@ -10382,6 +10489,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10382
10489
  $send(attributes, '[]=', Opal.to_a($writer));
10383
10490
  $writer[$rb_minus($writer["length"], 1)];
10384
10491
  };
10492
+
10493
+ $writer = ["cloaked-context", cloaked_context];
10494
+ $send(attributes, '[]=', Opal.to_a($writer));
10495
+ $writer[$rb_minus($writer["length"], 1)];;
10385
10496
  if ($truthy(attributes['$key?']("linenums"))) {
10386
10497
  } else if ($truthy(($truthy($a = attributes['$[]']("linenums-option")) ? $a : doc_attrs['$[]']("source-linenums-option")))) {
10387
10498
 
@@ -10614,7 +10725,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10614
10725
  };
10615
10726
  }, $Parser_is_delimited_block$ques$15.$$arity = -2);
10616
10727
  Opal.defs(self, '$build_block', $Parser_build_block$16 = function $$build_block(block_context, content_model, terminator, parent, reader, attributes, options) {
10617
- var $a, self = this, $case = nil, skip_processing = nil, parse_as_content_model = nil, lines = nil, block_reader = nil, block_cursor = nil, tab_size = nil, indent = nil, extension = nil, block = nil;
10728
+ var $a, $b, self = this, $case = nil, skip_processing = nil, parse_as_content_model = nil, lines = nil, block_reader = nil, block_cursor = nil, tab_size = nil, indent = nil, extension = nil, block = nil;
10618
10729
 
10619
10730
 
10620
10731
 
@@ -10661,10 +10772,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10661
10772
  if ($truthy((extension = options['$[]']("extension")))) {
10662
10773
 
10663
10774
  attributes.$delete("style");
10664
- if ($truthy((block = extension.$process_method()['$[]'](parent, ($truthy($a = block_reader) ? $a : $$($nesting, 'Reader').$new(lines)), attributes.$merge())))) {
10775
+ if ($truthy(($truthy($a = (block = extension.$process_method()['$[]'](parent, ($truthy($b = block_reader) ? $b : $$($nesting, 'Reader').$new(lines)), attributes.$merge()))) ? block['$!='](parent) : $a))) {
10665
10776
 
10666
10777
  attributes.$replace(block.$attributes());
10667
- if ($truthy((($a = block.$content_model()['$==']("compound")) ? (lines = block.$lines())['$empty?']()['$!']() : block.$content_model()['$==']("compound")))) {
10778
+ if ($truthy(($truthy($a = (($b = block.$content_model()['$==']("compound")) ? $$($nesting, 'Block')['$==='](block) : block.$content_model()['$==']("compound"))) ? (lines = block.$lines())['$empty?']()['$!']() : $a))) {
10668
10779
 
10669
10780
  content_model = "compound";
10670
10781
  block_reader = $$($nesting, 'Reader').$new(lines);};
@@ -10776,8 +10887,9 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
10776
10887
  reftext = reftext.$gsub("\\]", "]");
10777
10888
  if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
10778
10889
  reftext = document.$sub_attributes(reftext)};
10779
- } else if ($truthy(($truthy($b = reftext['$include?']($$($nesting, 'ATTR_REF_HEAD'))) ? (reftext = document.$sub_attributes(reftext))['$empty?']() : $b))) {
10780
- return nil;}};
10890
+ } else if ($truthy(reftext['$include?']($$($nesting, 'ATTR_REF_HEAD')))) {
10891
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
10892
+ reftext = nil}}};
10781
10893
  };
10782
10894
  if ($truthy(document.$register("refs", [id, $$($nesting, 'Inline').$new(block, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id}))]))) {
10783
10895
  return nil
@@ -11001,7 +11113,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11001
11113
  };
11002
11114
  }, $Parser_parse_list_item$27.$$arity = -5);
11003
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) {
11004
- 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;
11005
11117
 
11006
11118
 
11007
11119
 
@@ -11022,12 +11134,14 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11022
11134
  this_line = reader.$read_line();
11023
11135
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
11024
11136
  break;};
11137
+ if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11138
+ this_line = $$($nesting, 'ListContinuationString')};
11025
11139
  prev_line = (function() {if ($truthy(buffer['$empty?']())) {
11026
11140
  return nil
11027
11141
  } else {
11028
11142
  return buffer['$[]'](-1)
11029
11143
  }; return nil; })();
11030
- if (prev_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11144
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](prev_line))) {
11031
11145
 
11032
11146
  if (continuation['$==']("inactive")) {
11033
11147
 
@@ -11036,11 +11150,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11036
11150
  if ($truthy(within_nested_list)) {
11037
11151
  } else {
11038
11152
 
11039
- $writer = [-1, ""];
11153
+ $writer = [-1, $$($nesting, 'ListContinuationPlaceholder')];
11040
11154
  $send(buffer, '[]=', Opal.to_a($writer));
11041
11155
  $writer[$rb_minus($writer["length"], 1)];
11042
11156
  };};
11043
- if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11157
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
11044
11158
 
11045
11159
  if ($truthy(continuation['$!=']("frozen"))) {
11046
11160
 
@@ -11049,16 +11163,36 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11049
11163
  this_line = nil;
11050
11164
  continue;;};};
11051
11165
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
11166
+
11052
11167
  if (continuation['$==']("active")) {
11053
-
11054
- buffer['$<<'](this_line);
11055
- buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
11056
- continuation = "inactive";
11057
11168
  } else {
11058
11169
  break;
11059
- }
11060
- } else if ($truthy(($truthy($b = ($truthy($c = dlist) ? continuation['$!=']("active") : $c)) ? $$($nesting, 'BlockAttributeLineRx')['$match?'](this_line) : $b))) {
11061
- 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;;};
11062
11196
  } else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) {
11063
11197
  if ($truthy($$($nesting, 'LiteralParagraphRx')['$match?'](this_line))) {
11064
11198
 
@@ -11076,7 +11210,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11076
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})))
11077
11211
  };
11078
11212
  continuation = "inactive";
11079
- } 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['$=='](":"))))) {
11080
11214
  buffer['$<<'](this_line)
11081
11215
  } else {
11082
11216
 
@@ -11091,7 +11225,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11091
11225
  if (ctx == null) {
11092
11226
  ctx = nil;
11093
11227
  };
11094
- 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))))) {
11095
11229
 
11096
11230
  within_nested_list = true;
11097
11231
  if ($truthy((($b = nested_list_type['$==']("dlist")) ? (($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$nil_or_empty?']() : nested_list_type['$==']("dlist")))) {
@@ -11112,7 +11246,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11112
11246
  if (this_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11113
11247
 
11114
11248
  detached_continuation = buffer.$size();
11115
- buffer['$<<'](this_line);
11249
+ buffer['$<<']($$($nesting, 'ListContinuationString'));
11116
11250
  } else if ($truthy(has_text)) {
11117
11251
  if ($truthy(self['$is_sibling_list_item?'](this_line, list_type, sibling_trait))) {
11118
11252
  break;
@@ -11156,6 +11290,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11156
11290
  buffer['$<<'](this_line);
11157
11291
  has_text = true;
11158
11292
  };
11293
+ } else if ($truthy($$($nesting, 'ListContinuationMarker')['$==='](this_line))) {
11294
+
11295
+ has_text = true;
11296
+ buffer['$<<'](this_line);
11159
11297
  } else {
11160
11298
 
11161
11299
  if ($truthy(this_line['$empty?']())) {
@@ -11186,17 +11324,18 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11186
11324
  reader.$unshift_line(this_line)};
11187
11325
  if ($truthy(detached_continuation)) {
11188
11326
 
11189
- $writer = [detached_continuation, ""];
11327
+ $writer = [detached_continuation, $$($nesting, 'ListContinuationPlaceholder')];
11190
11328
  $send(buffer, '[]=', Opal.to_a($writer));
11191
11329
  $writer[$rb_minus($writer["length"], 1)];};
11192
11330
  while (!($truthy(buffer['$empty?']()))) {
11193
- if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
11194
- buffer.$pop()
11195
- } else {
11331
+ if ($truthy($$($nesting, 'ListContinuationMarker')['$===']((last_line = buffer['$[]'](-1))))) {
11196
11332
 
11197
- if (last_line['$==']($$($nesting, 'LIST_CONTINUATION'))) {
11198
- buffer.$pop()};
11333
+ buffer.$pop();
11199
11334
  break;;
11335
+ } else if ($truthy(last_line['$empty?']())) {
11336
+ buffer.$pop()
11337
+ } else {
11338
+ break;
11200
11339
  }
11201
11340
  };
11202
11341
  return buffer;
@@ -11407,60 +11546,58 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11407
11546
  sect_level = 0};};
11408
11547
  return [sect_id, sect_reftext, sect_title, sect_level, atx];
11409
11548
  }, $Parser_parse_section_title$40.$$arity = -3);
11410
- Opal.defs(self, '$parse_header_metadata', $Parser_parse_header_metadata$41 = function $$parse_header_metadata(reader, document) {
11411
- var $a, $$42, $$43, $$44, self = this, doc_attrs = nil, implicit_authors = nil, metadata = nil, implicit_author = nil, implicit_authorinitials = nil, author_metadata = nil, rev_metadata = nil, rev_line = nil, match = nil, $writer = nil, component = nil, author_line = nil, authors = nil, author_idx = nil, author_key = nil, explicit = nil, sparse = nil, author_override = nil;
11549
+ Opal.defs(self, '$parse_header_metadata', $Parser_parse_header_metadata$41 = function $$parse_header_metadata(reader, document, retrieve) {
11550
+ var $a, $$42, $$43, $$44, self = this, doc_attrs = nil, authorcount = nil, implicit_author_metadata = nil, $writer = nil, implicit_author = nil, implicit_authorinitials = nil, implicit_authors = nil, rev_line = nil, match = nil, rev_metadata = nil, component = nil, author_line = nil, author_metadata = nil, authors = nil, author_idx = nil, author_key = nil, explicit = nil, sparse = nil, author_override = nil;
11412
11551
 
11413
11552
 
11414
11553
 
11415
11554
  if (document == null) {
11416
11555
  document = nil;
11417
11556
  };
11557
+
11558
+ if (retrieve == null) {
11559
+ retrieve = true;
11560
+ };
11418
11561
  doc_attrs = ($truthy($a = document) ? document.$attributes() : $a);
11419
11562
  self.$process_attribute_entries(reader, document);
11420
- $a = [(implicit_authors = $hash2([], {})), nil, nil], (metadata = $a[0]), (implicit_author = $a[1]), (implicit_authorinitials = $a[2]), $a;
11421
11563
  if ($truthy(($truthy($a = reader['$has_more_lines?']()) ? reader['$next_line_empty?']()['$!']() : $a))) {
11422
11564
 
11423
- if ($truthy((author_metadata = self.$process_authors(reader.$read_line()))['$empty?']())) {
11424
- } else {
11565
+ authorcount = (implicit_author_metadata = self.$process_authors(reader.$read_line())).$delete("authorcount");
11566
+ if ($truthy(($truthy($a = document) ? $rb_gt((($writer = ["authorcount", authorcount]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]), 0) : $a))) {
11425
11567
 
11426
- if ($truthy(document)) {
11427
-
11428
- $send(author_metadata, 'each', [], ($$42 = function(key, val){var self = $$42.$$s || this, $writer = nil;
11568
+ $send(implicit_author_metadata, 'each', [], ($$42 = function(key, val){var self = $$42.$$s || this;
11429
11569
 
11570
+
11430
11571
 
11572
+ if (key == null) {
11573
+ key = nil;
11574
+ };
11575
+
11576
+ if (val == null) {
11577
+ val = nil;
11578
+ };
11579
+ if ($truthy(doc_attrs['$key?'](key))) {
11580
+ return nil
11581
+ } else {
11431
11582
 
11432
- if (key == null) {
11433
- key = nil;
11434
- };
11435
-
11436
- if (val == null) {
11437
- val = nil;
11438
- };
11439
- if ($truthy(doc_attrs['$key?'](key))) {
11440
- return nil
11441
- } else {
11442
-
11443
- $writer = [key, (function() {if ($truthy($$$('::', 'String')['$==='](val))) {
11444
-
11445
- return document.$apply_header_subs(val);
11446
- } else {
11447
- return val
11448
- }; return nil; })()];
11449
- $send(doc_attrs, '[]=', Opal.to_a($writer));
11450
- return $writer[$rb_minus($writer["length"], 1)];
11451
- };}, $$42.$$s = self, $$42.$$arity = 2, $$42));
11452
- implicit_author = doc_attrs['$[]']("author");
11453
- implicit_authorinitials = doc_attrs['$[]']("authorinitials");
11454
- implicit_authors = doc_attrs['$[]']("authors");};
11455
- metadata = author_metadata;
11456
- };
11583
+ $writer = [key, document.$apply_header_subs(val)];
11584
+ $send(doc_attrs, '[]=', Opal.to_a($writer));
11585
+ return $writer[$rb_minus($writer["length"], 1)];
11586
+ };}, $$42.$$s = self, $$42.$$arity = 2, $$42));
11587
+ implicit_author = doc_attrs['$[]']("author");
11588
+ implicit_authorinitials = doc_attrs['$[]']("authorinitials");
11589
+ implicit_authors = doc_attrs['$[]']("authors");};
11590
+
11591
+ $writer = ["authorcount", authorcount];
11592
+ $send(implicit_author_metadata, '[]=', Opal.to_a($writer));
11593
+ $writer[$rb_minus($writer["length"], 1)];;
11457
11594
  self.$process_attribute_entries(reader, document);
11458
- rev_metadata = $hash2([], {});
11459
11595
  if ($truthy(($truthy($a = reader['$has_more_lines?']()) ? reader['$next_line_empty?']()['$!']() : $a))) {
11460
11596
 
11461
11597
  rev_line = reader.$read_line();
11462
11598
  if ($truthy((match = $$($nesting, 'RevisionInfoLineRx').$match(rev_line)))) {
11463
11599
 
11600
+ rev_metadata = $hash2([], {});
11464
11601
  if ($truthy(match['$[]'](1))) {
11465
11602
 
11466
11603
  $writer = ["revnumber", match['$[]'](1).$rstrip()];
@@ -11483,38 +11620,33 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11483
11620
  $writer = ["revremark", match['$[]'](3).$rstrip()];
11484
11621
  $send(rev_metadata, '[]=', Opal.to_a($writer));
11485
11622
  $writer[$rb_minus($writer["length"], 1)];};
11486
- } else {
11487
- reader.$unshift_line(rev_line)
11488
- };};
11489
- if ($truthy(rev_metadata['$empty?']())) {
11490
- } else {
11491
-
11492
- if ($truthy(document)) {
11493
- $send(rev_metadata, 'each', [], ($$43 = function(key, val){var self = $$43.$$s || this;
11623
+ if ($truthy(($truthy($a = document) ? rev_metadata['$empty?']()['$!']() : $a))) {
11624
+ $send(rev_metadata, 'each', [], ($$43 = function(key, val){var self = $$43.$$s || this;
11494
11625
 
11495
-
11496
11626
 
11497
- if (key == null) {
11498
- key = nil;
11499
- };
11500
-
11501
- if (val == null) {
11502
- val = nil;
11503
- };
11504
- if ($truthy(doc_attrs['$key?'](key))) {
11505
- return nil
11506
- } else {
11507
11627
 
11508
- $writer = [key, document.$apply_header_subs(val)];
11509
- $send(doc_attrs, '[]=', Opal.to_a($writer));
11510
- return $writer[$rb_minus($writer["length"], 1)];
11511
- };}, $$43.$$s = self, $$43.$$arity = 2, $$43))};
11512
- metadata.$update(rev_metadata);
11513
- };
11628
+ if (key == null) {
11629
+ key = nil;
11630
+ };
11631
+
11632
+ if (val == null) {
11633
+ val = nil;
11634
+ };
11635
+ if ($truthy(doc_attrs['$key?'](key))) {
11636
+ return nil
11637
+ } else {
11638
+
11639
+ $writer = [key, document.$apply_header_subs(val)];
11640
+ $send(doc_attrs, '[]=', Opal.to_a($writer));
11641
+ return $writer[$rb_minus($writer["length"], 1)];
11642
+ };}, $$43.$$s = self, $$43.$$arity = 2, $$43))};
11643
+ } else {
11644
+ reader.$unshift_line(rev_line)
11645
+ };};
11514
11646
  self.$process_attribute_entries(reader, document);
11515
11647
  reader.$skip_blank_lines();
11516
11648
  } else {
11517
- author_metadata = $hash2([], {})
11649
+ implicit_author_metadata = $hash2([], {})
11518
11650
  };
11519
11651
  if ($truthy(document)) {
11520
11652
 
@@ -11530,7 +11662,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11530
11662
  $a = [[], 1, "author_1", false, false], (authors = $a[0]), (author_idx = $a[1]), (author_key = $a[2]), (explicit = $a[3]), (sparse = $a[4]), $a;
11531
11663
  while ($truthy(doc_attrs['$key?'](author_key))) {
11532
11664
 
11533
- if ((author_override = doc_attrs['$[]'](author_key))['$=='](author_metadata['$[]'](author_key))) {
11665
+ if ((author_override = doc_attrs['$[]'](author_key))['$=='](implicit_author_metadata['$[]'](author_key))) {
11534
11666
 
11535
11667
  authors['$<<'](nil);
11536
11668
  sparse = true;
@@ -11558,7 +11690,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11558
11690
  if ($truthy(author)) {
11559
11691
  return nil;};
11560
11692
 
11561
- $writer = [idx, $send([author_metadata['$[]']("" + "firstname_" + ((name_idx = $rb_plus(idx, 1)))), author_metadata['$[]']("" + "middlename_" + (name_idx)), author_metadata['$[]']("" + "lastname_" + (name_idx))].$compact(), 'map', [], ($$45 = function(it){var self = $$45.$$s || this;
11693
+ $writer = [idx, $send([implicit_author_metadata['$[]']("" + "firstname_" + ((name_idx = $rb_plus(idx, 1)))), implicit_author_metadata['$[]']("" + "middlename_" + (name_idx)), implicit_author_metadata['$[]']("" + "lastname_" + (name_idx))].$compact(), 'map', [], ($$45 = function(it){var self = $$45.$$s || this;
11562
11694
 
11563
11695
 
11564
11696
 
@@ -11570,11 +11702,18 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11570
11702
  return $writer[$rb_minus($writer["length"], 1)];;}, $$44.$$s = self, $$44.$$arity = 2, $$44))};
11571
11703
  author_metadata = self.$process_authors(authors, true, false);
11572
11704
  } else {
11573
- author_metadata = $hash2([], {})
11705
+ author_metadata = $hash2(["authorcount"], {"authorcount": 0})
11574
11706
  };
11575
11707
  };
11576
- if ($truthy(author_metadata['$empty?']())) {
11577
- ($truthy($a = metadata['$[]']("authorcount")) ? $a : (($writer = ["authorcount", (($writer = ["authorcount", 0]), $send(doc_attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]), $send(metadata, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
11708
+ if (author_metadata['$[]']("authorcount")['$=='](0)) {
11709
+ if ($truthy(authorcount)) {
11710
+ author_metadata = nil
11711
+ } else {
11712
+
11713
+ $writer = ["authorcount", 0];
11714
+ $send(doc_attrs, '[]=', Opal.to_a($writer));
11715
+ $writer[$rb_minus($writer["length"], 1)];
11716
+ }
11578
11717
  } else {
11579
11718
 
11580
11719
  doc_attrs.$update(author_metadata);
@@ -11584,7 +11723,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
11584
11723
  $send(doc_attrs, '[]=', Opal.to_a($writer));
11585
11724
  $writer[$rb_minus($writer["length"], 1)];};
11586
11725
  };};
11587
- return metadata;
11726
+ if ($truthy(retrieve)) {
11727
+ return implicit_author_metadata.$merge(rev_metadata.$to_h(), author_metadata.$to_h())
11728
+ } else {
11729
+ return nil
11730
+ };
11588
11731
  }, $Parser_parse_header_metadata$41.$$arity = -2);
11589
11732
  Opal.defs(self, '$process_authors', $Parser_process_authors$46 = function $$process_authors(author_line, names_only, multiple) {
11590
11733
  var $a, $$47, self = this, author_metadata = nil, author_idx = nil, $writer = nil;
@@ -12679,7 +12822,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12679
12822
  (function($base, $super, $parent_nesting) {
12680
12823
  var self = $klass($base, $super, 'PathResolver');
12681
12824
 
12682
- 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;
12683
12826
 
12684
12827
  self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
12685
12828
 
@@ -12690,6 +12833,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12690
12833
  Opal.const_set($nesting[0], 'SLASH', "/");
12691
12834
  Opal.const_set($nesting[0], 'BACKSLASH', "\\");
12692
12835
  Opal.const_set($nesting[0], 'DOUBLE_SLASH', "//");
12836
+ Opal.const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
12693
12837
  Opal.const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
12694
12838
  self.$attr_accessor("file_separator");
12695
12839
  self.$attr_accessor("working_dir");
@@ -12735,23 +12879,30 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12735
12879
 
12736
12880
  return ($truthy($a = self['$absolute_path?'](path)) ? $a : path['$start_with?']("file://", "http://", "https://"))
12737
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)
12738
12889
  } else {
12739
12890
  Opal.alias(self, "root?", "absolute_path?")
12740
12891
  };
12741
12892
 
12742
- Opal.def(self, '$unc?', $PathResolver_unc$ques$4 = function(path) {
12893
+ Opal.def(self, '$unc?', $PathResolver_unc$ques$5 = function(path) {
12743
12894
  var self = this;
12744
12895
 
12745
12896
  return path['$start_with?']($$($nesting, 'DOUBLE_SLASH'))
12746
- }, $PathResolver_unc$ques$4.$$arity = 1);
12897
+ }, $PathResolver_unc$ques$5.$$arity = 1);
12747
12898
 
12748
- 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) {
12749
12900
  var self = this;
12750
12901
 
12751
12902
  return path['$start_with?']($$($nesting, 'SLASH'))
12752
- }, $PathResolver_web_root$ques$5.$$arity = 1);
12903
+ }, $PathResolver_web_root$ques$6.$$arity = 1);
12753
12904
 
12754
- 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) {
12755
12906
  var $a, self = this;
12756
12907
 
12757
12908
  if (base['$=='](path)) {
@@ -12761,9 +12912,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12761
12912
  } else {
12762
12913
  return ($truthy($a = path['$start_with?']($rb_plus(base, $$($nesting, 'SLASH')))) ? $rb_plus(base.$length(), 1) : $a)
12763
12914
  }
12764
- }, $PathResolver_descends_from$ques$6.$$arity = 2);
12915
+ }, $PathResolver_descends_from$ques$7.$$arity = 2);
12765
12916
 
12766
- 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) {
12767
12918
  var self = this, offset = nil;
12768
12919
 
12769
12920
  if ($truthy(self['$root?'](path))) {
@@ -12784,9 +12935,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12784
12935
  } else {
12785
12936
  return path
12786
12937
  }
12787
- }, $PathResolver_relative_path$7.$$arity = 2);
12938
+ }, $PathResolver_relative_path$8.$$arity = 2);
12788
12939
 
12789
- Opal.def(self, '$posixify', $PathResolver_posixify$8 = function $$posixify(path) {
12940
+ Opal.def(self, '$posixify', $PathResolver_posixify$9 = function $$posixify(path) {
12790
12941
  var $a, self = this;
12791
12942
 
12792
12943
  if ($truthy(path)) {
@@ -12799,18 +12950,18 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12799
12950
  } else {
12800
12951
  return ""
12801
12952
  }
12802
- }, $PathResolver_posixify$8.$$arity = 1);
12953
+ }, $PathResolver_posixify$9.$$arity = 1);
12803
12954
  Opal.alias(self, "posixfy", "posixify");
12804
12955
 
12805
- Opal.def(self, '$expand_path', $PathResolver_expand_path$9 = function $$expand_path(path) {
12806
- 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;
12807
12958
 
12808
12959
 
12809
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;
12810
12961
  if ($truthy(path['$include?']($$($nesting, 'DOT_DOT')))) {
12811
12962
 
12812
12963
  resolved_segments = [];
12813
- $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;
12814
12965
 
12815
12966
 
12816
12967
 
@@ -12821,14 +12972,14 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12821
12972
  return resolved_segments.$pop()
12822
12973
  } else {
12823
12974
  return resolved_segments['$<<'](segment)
12824
- };}, $$10.$$s = self, $$10.$$arity = 1, $$10));
12975
+ };}, $$11.$$s = self, $$11.$$arity = 1, $$11));
12825
12976
  return self.$join_path(resolved_segments, path_root);
12826
12977
  } else {
12827
12978
  return self.$join_path(path_segments, path_root)
12828
12979
  };
12829
- }, $PathResolver_expand_path$9.$$arity = 1);
12980
+ }, $PathResolver_expand_path$10.$$arity = 1);
12830
12981
 
12831
- 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) {
12832
12983
  var self = this, result = nil, cache = nil, posix_path = nil, root = nil, path_segments = nil, $writer = nil;
12833
12984
 
12834
12985
 
@@ -12853,6 +13004,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12853
13004
  root = $$($nesting, 'DOUBLE_SLASH')
12854
13005
  } else if ($truthy(posix_path['$start_with?']($$($nesting, 'SLASH')))) {
12855
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())
12856
13009
  } else {
12857
13010
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$($nesting, 'SLASH')), 1))
12858
13011
  }
@@ -12869,9 +13022,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12869
13022
  $writer = [path, [path_segments, root]];
12870
13023
  $send(cache, '[]=', Opal.to_a($writer));
12871
13024
  return $writer[$rb_minus($writer["length"], 1)];;
12872
- }, $PathResolver_partition_path$11.$$arity = -2);
13025
+ }, $PathResolver_partition_path$12.$$arity = -2);
12873
13026
 
12874
- 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) {
12875
13028
  var self = this;
12876
13029
 
12877
13030
 
@@ -12885,10 +13038,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12885
13038
 
12886
13039
  return segments.$join($$($nesting, 'SLASH'));
12887
13040
  };
12888
- }, $PathResolver_join_path$12.$$arity = -2);
13041
+ }, $PathResolver_join_path$13.$$arity = -2);
12889
13042
 
12890
- Opal.def(self, '$system_path', $PathResolver_system_path$13 = function $$system_path(target, start, jail, opts) {
12891
- 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;
12892
13045
 
12893
13046
 
12894
13047
 
@@ -12979,7 +13132,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
12979
13132
  $b = self.$partition_path(jail), $a = Opal.to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
12980
13133
  };
12981
13134
  warned = false;
12982
- $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;
12983
13136
 
12984
13137
 
12985
13138
 
@@ -13002,9 +13155,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13002
13155
  }
13003
13156
  } else {
13004
13157
  return resolved_segments['$<<'](segment)
13005
- };}, $$14.$$s = self, $$14.$$arity = 1, $$14));
13158
+ };}, $$15.$$s = self, $$15.$$arity = 1, $$15));
13006
13159
  } else {
13007
- $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;
13008
13161
 
13009
13162
 
13010
13163
 
@@ -13015,7 +13168,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13015
13168
  return resolved_segments.$pop()
13016
13169
  } else {
13017
13170
  return resolved_segments['$<<'](segment)
13018
- };}, $$15.$$s = self, $$15.$$arity = 1, $$15))
13171
+ };}, $$16.$$s = self, $$16.$$arity = 1, $$16))
13019
13172
  };};
13020
13173
  if ($truthy(recheck)) {
13021
13174
 
@@ -13036,10 +13189,10 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13036
13189
  } else {
13037
13190
  return self.$join_path(resolved_segments, jail_root)
13038
13191
  };
13039
- }, $PathResolver_system_path$13.$$arity = -2);
13192
+ }, $PathResolver_system_path$14.$$arity = -2);
13040
13193
 
13041
- Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
13042
- 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;
13043
13196
 
13044
13197
 
13045
13198
 
@@ -13058,7 +13211,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13058
13211
  };
13059
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;
13060
13213
  resolved_segments = [];
13061
- $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;
13062
13215
 
13063
13216
 
13064
13217
 
@@ -13079,7 +13232,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13079
13232
  }
13080
13233
  } else {
13081
13234
  return resolved_segments['$<<'](segment)
13082
- };}, $$17.$$s = self, $$17.$$arity = 1, $$17));
13235
+ };}, $$18.$$s = self, $$18.$$arity = 1, $$18));
13083
13236
  if ($truthy((resolved_path = self.$join_path(resolved_segments, target_root))['$include?'](" "))) {
13084
13237
  resolved_path = resolved_path.$gsub(" ", "%20")};
13085
13238
  if ($truthy(uri_prefix)) {
@@ -13087,9 +13240,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13087
13240
  } else {
13088
13241
  return resolved_path
13089
13242
  };
13090
- }, $PathResolver_web_path$16.$$arity = -2);
13243
+ }, $PathResolver_web_path$17.$$arity = -2);
13091
13244
  self.$private();
13092
- 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) {
13093
13246
  var $a, self = this;
13094
13247
 
13095
13248
  if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
@@ -13097,7 +13250,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
13097
13250
  } else {
13098
13251
  return str
13099
13252
  }
13100
- }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
13253
+ }, $PathResolver_extract_uri_prefix$19.$$arity = 1), nil) && 'extract_uri_prefix';
13101
13254
  })($nesting[0], null, $nesting)
13102
13255
  })($nesting[0], $nesting)
13103
13256
  };
@@ -13124,7 +13277,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13124
13277
  }
13125
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;
13126
13279
 
13127
- 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', '$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']);
13128
13281
  return (function($base, $parent_nesting) {
13129
13282
  var self = $module($base, 'Asciidoctor');
13130
13283
 
@@ -13269,26 +13422,31 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13269
13422
  }, $Reader_next_line_empty$ques$7.$$arity = 0);
13270
13423
 
13271
13424
  Opal.def(self, '$peek_line', $Reader_peek_line$8 = function $$peek_line(direct) {
13272
- var $a, self = this, line = nil;
13425
+ var $a, $b, self = this, next_line = nil, line = nil;
13273
13426
 
13274
13427
 
13275
13428
 
13276
13429
  if (direct == null) {
13277
13430
  direct = false;
13278
13431
  };
13279
- if ($truthy(($truthy($a = direct) ? $a : $rb_gt(self.look_ahead, 0)))) {
13280
- if ($truthy(self.unescape_next_line)) {
13281
-
13282
- return (line = self.lines['$[]'](-1)).$slice(1, line.$length());
13283
- } else {
13284
- return self.lines['$[]'](-1)
13285
- }
13286
- } else if ($truthy(self.lines['$empty?']())) {
13432
+ while ($truthy(true)) {
13287
13433
 
13288
- self.look_ahead = 0;
13289
- return nil;
13290
- } else {
13291
- 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
+ };
13292
13450
  };
13293
13451
  }, $Reader_peek_line$8.$$arity = -1);
13294
13452
 
@@ -13780,7 +13938,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13780
13938
  (function($base, $super, $parent_nesting) {
13781
13939
  var self = $klass($base, $super, 'PreprocessorReader');
13782
13940
 
13783
- var $nesting = [self].concat($parent_nesting), $PreprocessorReader_initialize$47, $PreprocessorReader_has_more_lines$ques$48, $PreprocessorReader_empty$ques$49, $PreprocessorReader_peek_line$50, $PreprocessorReader_push_include$51, $PreprocessorReader_include_depth$52, $PreprocessorReader_exceeds_max_depth$ques$53, $PreprocessorReader_shift$54, $PreprocessorReader_include_processors$ques$55, $PreprocessorReader_create_include_cursor$56, $PreprocessorReader_to_s$57, $PreprocessorReader_prepare_lines$59, $PreprocessorReader_process_line$60, $PreprocessorReader_preprocess_conditional_directive$61, $PreprocessorReader_preprocess_include_directive$66, $PreprocessorReader_resolve_include_path$79, $PreprocessorReader_pop_include$81, $PreprocessorReader_split_delimited_value$82, $PreprocessorReader_skip_front_matter$excl$83, $PreprocessorReader_resolve_expr_val$84;
13941
+ var $nesting = [self].concat($parent_nesting), $PreprocessorReader_initialize$47, $PreprocessorReader_has_more_lines$ques$48, $PreprocessorReader_empty$ques$49, $PreprocessorReader_peek_line$50, $PreprocessorReader_push_include$51, $PreprocessorReader_include_depth$52, $PreprocessorReader_exceeds_max_depth$ques$53, $PreprocessorReader_shift$54, $PreprocessorReader_include_processors$ques$55, $PreprocessorReader_create_include_cursor$56, $PreprocessorReader_to_s$57, $PreprocessorReader_prepare_lines$59, $PreprocessorReader_process_line$60, $PreprocessorReader_preprocess_conditional_directive$61, $PreprocessorReader_preprocess_include_directive$66, $PreprocessorReader_resolve_include_path$80, $PreprocessorReader_pop_include$82, $PreprocessorReader_split_delimited_value$83, $PreprocessorReader_skip_front_matter$excl$84, $PreprocessorReader_resolve_expr_val$85;
13784
13942
 
13785
13943
  self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.look_ahead = self.$$prototype.skipping = self.$$prototype.conditional_stack = nil;
13786
13944
 
@@ -13903,27 +14061,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
13903
14061
  };
13904
14062
  self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
13905
14063
  if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) {
13906
-
13907
- $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"))) {
13908
14065
  return nil
13909
14066
  } else {
13910
14067
  return true
13911
- }; return nil; })()];
13912
- $send(self.includes, '[]=', Opal.to_a($writer));
13913
- $writer[$rb_minus($writer["length"], 1)];};
14068
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))};
13914
14069
  } else {
13915
14070
 
13916
14071
  self.dir = ".";
13917
14072
  self.process_lines = true;
13918
14073
  if ($truthy((self.path = path))) {
13919
-
13920
- $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"))) {
13921
14075
  return nil
13922
14076
  } else {
13923
14077
  return true
13924
- }; return nil; })()];
13925
- $send(self.includes, '[]=', Opal.to_a($writer));
13926
- $writer[$rb_minus($writer["length"], 1)];
14078
+ }; return nil; })()]), $send(self.includes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))
13927
14079
  } else {
13928
14080
  self.path = "<stdin>"
13929
14081
  };
@@ -14256,7 +14408,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14256
14408
  }, $PreprocessorReader_preprocess_conditional_directive$61.$$arity = 4);
14257
14409
 
14258
14410
  Opal.def(self, '$preprocess_include_directive', $PreprocessorReader_preprocess_include_directive$66 = function $$preprocess_include_directive(target, attrlist) {
14259
- var $a, $b, $$67, $$68, $$69, $$70, $$71, $$72, $$74, $$77, $$78, self = this, doc = nil, expanded_target = nil, attr_missing = nil, ext = nil, parsed_attrs = nil, inc_path = nil, target_type = nil, relpath = nil, $case = nil, reader = nil, read_mode = nil, enc = nil, $writer = nil, read_mode_params = nil, inc_linenos = nil, inc_tags = nil, tag = nil, inc_lines = nil, inc_offset = nil, inc_lineno = nil, tag_stack = nil, tags_used = nil, active_tag = nil, select = nil, base_select = nil, wildcard = nil, missing_tags = nil, inc_content = nil;
14411
+ var $a, $b, $$67, $$68, $$69, $$70, $$71, $$72, $$74, $$77, $$78, $$79, self = this, doc = nil, expanded_target = nil, attr_missing = nil, ext = nil, parsed_attrs = nil, inc_path = nil, target_type = nil, relpath = nil, $case = nil, reader = nil, read_mode = nil, enc = nil, $writer = nil, read_mode_params = nil, inc_linenos = nil, inc_tags = nil, tag = nil, inc_lines = nil, inc_offset = nil, inc_lineno = nil, tag_stack = nil, tags_selected = nil, active_tag = nil, select = nil, base_select = nil, wildcard = nil, missing_tags = nil, inc_content = nil;
14260
14412
 
14261
14413
 
14262
14414
  doc = self.document;
@@ -14305,7 +14457,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14305
14457
  ext.$process_method()['$[]'](doc, self, expanded_target, doc.$parse_attributes(attrlist, [], $hash2(["sub_input"], {"sub_input": true})));
14306
14458
  return true;
14307
14459
  } else if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')))) {
14308
- 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]");
14309
14464
  } else if ($truthy(self.maxdepth)) {
14310
14465
 
14311
14466
  if ($truthy($rb_ge(self.include_stack.$size(), self.maxdepth['$[]']("curr")))) {
@@ -14460,7 +14615,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14460
14615
  self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);};
14461
14616
  } else if ($truthy(inc_tags)) {
14462
14617
 
14463
- $a = [[], nil, 0, [], $$$('::', 'Set').$new(), nil], (inc_lines = $a[0]), (inc_offset = $a[1]), (inc_lineno = $a[2]), (tag_stack = $a[3]), (tags_used = $a[4]), (active_tag = $a[5]), $a;
14618
+ $a = [[], nil, 0, [], $$$('::', 'Set').$new(), nil], (inc_lines = $a[0]), (inc_offset = $a[1]), (inc_lineno = $a[2]), (tag_stack = $a[3]), (tags_selected = $a[4]), (active_tag = $a[5]), $a;
14464
14619
  if ($truthy(inc_tags['$key?']("**"))) {
14465
14620
 
14466
14621
  select = (base_select = inc_tags.$delete("**"));
@@ -14536,8 +14691,9 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14536
14691
  }
14537
14692
  } else if ($truthy(inc_tags['$key?'](this_tag))) {
14538
14693
 
14539
- tags_used['$<<'](this_tag);
14540
- return tag_stack['$<<']([(active_tag = this_tag), (select = inc_tags['$[]'](this_tag)), inc_lineno]);
14694
+ if ($truthy((select = inc_tags['$[]'](this_tag)))) {
14695
+ tags_selected['$<<'](this_tag)};
14696
+ return tag_stack['$<<']([(active_tag = this_tag), select, inc_lineno]);
14541
14697
  } else if ($truthy(wildcard['$nil?']()['$!']())) {
14542
14698
 
14543
14699
  select = (function() {if ($truthy(($truthy($d = active_tag) ? select['$!']() : $d))) {
@@ -14584,7 +14740,18 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14584
14740
  };
14585
14741
  return self.$logger().$warn(self.$message_with_context("" + "detected unclosed tag '" + (tag_name) + "' starting at line " + (tag_lineno) + " of include " + (target_type) + ": " + (inc_path), $hash2(["source_location", "include_location"], {"source_location": self.$cursor(), "include_location": self.$create_include_cursor(inc_path, expanded_target, tag_lineno)})));}, $$77.$$s = self, $$77.$$arity = 3, $$77))
14586
14742
  };
14587
- if ($truthy((missing_tags = $rb_minus(inc_tags.$keys(), tags_used.$to_a()))['$empty?']())) {
14743
+ if ($truthy((missing_tags = $rb_minus($send(inc_tags, 'keep_if', [], ($$78 = function(_, v){var self = $$78.$$s || this;
14744
+
14745
+
14746
+
14747
+ if (_ == null) {
14748
+ _ = nil;
14749
+ };
14750
+
14751
+ if (v == null) {
14752
+ v = nil;
14753
+ };
14754
+ return v;}, $$78.$$s = self, $$78.$$arity = 2, $$78)).$keys(), tags_selected.$to_a()))['$empty?']())) {
14588
14755
  } else {
14589
14756
  self.$logger().$warn(self.$message_with_context("" + "tag" + ((function() {if ($truthy($rb_gt(missing_tags.$size(), 1))) {
14590
14757
  return "s"
@@ -14605,18 +14772,19 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14605
14772
  self.$push_include(inc_lines, inc_path, relpath, inc_offset, parsed_attrs);};
14606
14773
  } else {
14607
14774
 
14775
+ inc_content = nil;
14776
+
14608
14777
  try {
14609
14778
 
14610
- inc_content = $send(reader, 'call', [inc_path, read_mode], ($$78 = function(f){var self = $$78.$$s || this;
14779
+ inc_content = $send(reader, 'call', [inc_path, read_mode], ($$79 = function(f){var self = $$79.$$s || this;
14611
14780
 
14612
14781
 
14613
14782
 
14614
14783
  if (f == null) {
14615
14784
  f = nil;
14616
14785
  };
14617
- return f.$read();}, $$78.$$s = self, $$78.$$arity = 1, $$78));
14786
+ return f.$read();}, $$79.$$s = self, $$79.$$arity = 1, $$79));
14618
14787
  self.$shift();
14619
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
14620
14788
  } catch ($err) {
14621
14789
  if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
14622
14790
  try {
@@ -14625,7 +14793,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14625
14793
  return self.$replace_next_line("" + "Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
14626
14794
  } finally { Opal.pop_exception() }
14627
14795
  } else { throw $err; }
14628
- };
14796
+ };;
14797
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
14629
14798
  };
14630
14799
  return true;
14631
14800
  } else {
@@ -14633,8 +14802,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14633
14802
  };
14634
14803
  }, $PreprocessorReader_preprocess_include_directive$66.$$arity = 2);
14635
14804
 
14636
- Opal.def(self, '$resolve_include_path', $PreprocessorReader_resolve_include_path$79 = function $$resolve_include_path(target, attrlist, attributes) {
14637
- var $a, $b, $$80, self = this, doc = nil, inc_path = nil, relpath = nil;
14805
+ Opal.def(self, '$resolve_include_path', $PreprocessorReader_resolve_include_path$80 = function $$resolve_include_path(target, attrlist, attributes) {
14806
+ var $a, $b, $$81, self = this, doc = nil, inc_path = nil, relpath = nil;
14638
14807
 
14639
14808
 
14640
14809
  doc = self.document;
@@ -14647,7 +14816,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14647
14816
 
14648
14817
  if ($truthy(doc['$attr?']("allow-uri-read"))) {
14649
14818
  } else {
14650
- 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]");
14651
14823
  };
14652
14824
  if ($truthy(doc['$attr?']("cache-uri"))) {
14653
14825
  if ($truthy((($b = $$$('::', 'OpenURI', 'skip_raise')) && ($a = $$$($b, 'Cache', 'skip_raise')) ? 'constant' : nil))) {
@@ -14663,9 +14835,9 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14663
14835
  if ($truthy($$$('::', 'File')['$file?'](inc_path))) {
14664
14836
  } else if ($truthy(attributes['$[]']("optional-option"))) {
14665
14837
 
14666
- $send(self.$logger(), 'info', [], ($$80 = function(){var self = $$80.$$s || this;
14838
+ $send(self.$logger(), 'info', [], ($$81 = function(){var self = $$81.$$s || this;
14667
14839
 
14668
- return self.$message_with_context("" + "optional include dropped because include file not found: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$80.$$s = self, $$80.$$arity = 0, $$80));
14840
+ return self.$message_with_context("" + "optional include dropped because include file not found: " + (inc_path), $hash2(["source_location"], {"source_location": self.$cursor()}))}, $$81.$$s = self, $$81.$$arity = 0, $$81));
14669
14841
  self.$shift();
14670
14842
  return true;
14671
14843
  } else {
@@ -14676,9 +14848,9 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14676
14848
  relpath = doc.$path_resolver().$relative_path(inc_path, doc.$base_dir());
14677
14849
  return [inc_path, "file", relpath];
14678
14850
  };
14679
- }, $PreprocessorReader_resolve_include_path$79.$$arity = 3);
14851
+ }, $PreprocessorReader_resolve_include_path$80.$$arity = 3);
14680
14852
 
14681
- Opal.def(self, '$pop_include', $PreprocessorReader_pop_include$81 = function $$pop_include() {
14853
+ Opal.def(self, '$pop_include', $PreprocessorReader_pop_include$82 = function $$pop_include() {
14682
14854
  var $a, $b, self = this;
14683
14855
 
14684
14856
  if ($truthy(self.include_stack['$empty?']())) {
@@ -14689,9 +14861,9 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14689
14861
  self.look_ahead = 0;
14690
14862
  return nil;
14691
14863
  }
14692
- }, $PreprocessorReader_pop_include$81.$$arity = 0);
14864
+ }, $PreprocessorReader_pop_include$82.$$arity = 0);
14693
14865
 
14694
- Opal.def(self, '$split_delimited_value', $PreprocessorReader_split_delimited_value$82 = function $$split_delimited_value(val) {
14866
+ Opal.def(self, '$split_delimited_value', $PreprocessorReader_split_delimited_value$83 = function $$split_delimited_value(val) {
14695
14867
  var self = this;
14696
14868
 
14697
14869
  if ($truthy(val['$include?'](","))) {
@@ -14701,45 +14873,43 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14701
14873
 
14702
14874
  return val.$split(";");
14703
14875
  }
14704
- }, $PreprocessorReader_split_delimited_value$82.$$arity = 1);
14876
+ }, $PreprocessorReader_split_delimited_value$83.$$arity = 1);
14705
14877
 
14706
- Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$83 = function(data, increment_linenos) {
14707
- var $a, $b, self = this, front_matter = nil, original_data = nil;
14878
+ Opal.def(self, '$skip_front_matter!', $PreprocessorReader_skip_front_matter$excl$84 = function(data, increment_linenos) {
14879
+ var $a, $b, self = this, delim = nil, original_data = nil, front_matter = nil, eof = nil;
14708
14880
 
14709
14881
 
14710
14882
 
14711
14883
  if (increment_linenos == null) {
14712
14884
  increment_linenos = true;
14713
14885
  };
14714
- front_matter = nil;
14715
- 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))))) {
14716
14896
 
14717
- original_data = data.$drop(0);
14718
- data.$shift();
14719
- front_matter = [];
14897
+ front_matter['$<<'](data.$shift());
14720
14898
  if ($truthy(increment_linenos)) {
14721
14899
  self.lineno = $rb_plus(self.lineno, 1)};
14722
- while ($truthy(($truthy($b = data['$empty?']()['$!']()) ? data['$[]'](0)['$!=']("---") : $b))) {
14723
-
14724
- front_matter['$<<'](data.$shift());
14725
- if ($truthy(increment_linenos)) {
14726
- self.lineno = $rb_plus(self.lineno, 1)};
14727
- };
14728
- if ($truthy(data['$empty?']())) {
14729
-
14730
- $send(data, 'unshift', Opal.to_a(original_data));
14731
- if ($truthy(increment_linenos)) {
14732
- self.lineno = 0};
14733
- front_matter = nil;
14734
- } else {
14735
-
14736
- data.$shift();
14737
- if ($truthy(increment_linenos)) {
14738
- self.lineno = $rb_plus(self.lineno, 1)};
14739
- };};
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)};
14740
14910
  return front_matter;
14741
- }, $PreprocessorReader_skip_front_matter$excl$83.$$arity = -2);
14742
- return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$84 = function $$resolve_expr_val(val) {
14911
+ }, $PreprocessorReader_skip_front_matter$excl$84.$$arity = -2);
14912
+ return (Opal.def(self, '$resolve_expr_val', $PreprocessorReader_resolve_expr_val$85 = function $$resolve_expr_val(val) {
14743
14913
  var $a, $b, self = this, quoted = nil;
14744
14914
 
14745
14915
 
@@ -14767,7 +14937,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
14767
14937
  } else {
14768
14938
  return val.$to_i()
14769
14939
  };
14770
- }, $PreprocessorReader_resolve_expr_val$84.$$arity = 1), nil) && 'resolve_expr_val';
14940
+ }, $PreprocessorReader_resolve_expr_val$85.$$arity = 1), nil) && 'resolve_expr_val';
14771
14941
  })($nesting[0], $$($nesting, 'Reader'), $nesting);
14772
14942
  })($nesting[0], $nesting)
14773
14943
  };
@@ -14785,7 +14955,7 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14785
14955
  }
14786
14956
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy;
14787
14957
 
14788
- Opal.add_stubs(['$attr_accessor', '$attr_reader', '$===', '$+', '$level', '$special', '$generate_id', '$title', '$==', '$>', '$sectnum', '$reftext', '$!', '$empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$[]', '$attributes', '$context', '$assign_numeral', '$class', '$object_id', '$inspect', '$size', '$length', '$chr', '$[]=', '$-', '$gsub', '$downcase', '$delete', '$tr_s', '$end_with?', '$chop', '$start_with?', '$slice', '$key?', '$catalog', '$unique_id_start_index']);
14958
+ Opal.add_stubs(['$attr_accessor', '$attr_reader', '$===', '$+', '$level', '$special', '$generate_id', '$title', '$>', '$==', '$sectnum', '$reftext', '$!', '$empty?', '$sub_placeholder', '$sub_quotes', '$compat_mode', '$[]', '$attributes', '$context', '$assign_numeral', '$class', '$object_id', '$inspect', '$size', '$length', '$chr', '$[]=', '$-', '$gsub', '$downcase', '$delete', '$tr_s', '$end_with?', '$chop', '$start_with?', '$slice', '$key?', '$catalog', '$unique_id_start_index']);
14789
14959
  return (function($base, $parent_nesting) {
14790
14960
  var self = $module($base, 'Asciidoctor');
14791
14961
 
@@ -14794,9 +14964,9 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14794
14964
  (function($base, $super, $parent_nesting) {
14795
14965
  var self = $klass($base, $super, 'Section');
14796
14966
 
14797
- var $nesting = [self].concat($parent_nesting), $Section_initialize$1, $Section_generate_id$2, $Section_sectnum$3, $Section_xreftext$4, $Section_$lt$lt$5, $Section_to_s$6, $Section_generate_id$7;
14967
+ var $nesting = [self].concat($parent_nesting), $Section_initialize$1, $Section_generate_id$2, $Section_sections$ques$3, $Section_sectnum$4, $Section_xreftext$5, $Section_$lt$lt$6, $Section_to_s$7, $Section_generate_id$8;
14798
14968
 
14799
- self.$$prototype.document = self.$$prototype.level = self.$$prototype.parent = self.$$prototype.numeral = self.$$prototype.numbered = self.$$prototype.sectname = self.$$prototype.title = self.$$prototype.blocks = nil;
14969
+ self.$$prototype.document = self.$$prototype.next_section_index = self.$$prototype.level = self.$$prototype.parent = self.$$prototype.numeral = self.$$prototype.numbered = self.$$prototype.sectname = self.$$prototype.title = self.$$prototype.blocks = nil;
14800
14970
 
14801
14971
  self.$attr_accessor("index");
14802
14972
  self.$attr_accessor("sectname");
@@ -14842,7 +15012,13 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14842
15012
  return $$($nesting, 'Section').$generate_id(self.$title(), self.document)
14843
15013
  }, $Section_generate_id$2.$$arity = 0);
14844
15014
 
14845
- Opal.def(self, '$sectnum', $Section_sectnum$3 = function $$sectnum(delimiter, append) {
15015
+ Opal.def(self, '$sections?', $Section_sections$ques$3 = function() {
15016
+ var self = this;
15017
+
15018
+ return $rb_gt(self.next_section_index, 0)
15019
+ }, $Section_sections$ques$3.$$arity = 0);
15020
+
15021
+ Opal.def(self, '$sectnum', $Section_sectnum$4 = function $$sectnum(delimiter, append) {
14846
15022
  var $a, self = this;
14847
15023
 
14848
15024
 
@@ -14864,9 +15040,9 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14864
15040
  } else {
14865
15041
  return "" + (self.numeral) + (append)
14866
15042
  };
14867
- }, $Section_sectnum$3.$$arity = -1);
15043
+ }, $Section_sectnum$4.$$arity = -1);
14868
15044
 
14869
- Opal.def(self, '$xreftext', $Section_xreftext$4 = function $$xreftext(xrefstyle) {
15045
+ Opal.def(self, '$xreftext', $Section_xreftext$5 = function $$xreftext(xrefstyle) {
14870
15046
  var $a, self = this, val = nil, $case = nil, type = nil, quoted_title = nil, signifier = nil;
14871
15047
 
14872
15048
 
@@ -14914,12 +15090,12 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14914
15090
  } else {
14915
15091
  return self.$title()
14916
15092
  };
14917
- }, $Section_xreftext$4.$$arity = -1);
15093
+ }, $Section_xreftext$5.$$arity = -1);
14918
15094
 
14919
- Opal.def(self, '$<<', $Section_$lt$lt$5 = function(block) {
14920
- var $iter = $Section_$lt$lt$5.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
15095
+ Opal.def(self, '$<<', $Section_$lt$lt$6 = function(block) {
15096
+ var $iter = $Section_$lt$lt$6.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
14921
15097
 
14922
- if ($iter) $Section_$lt$lt$5.$$p = null;
15098
+ if ($iter) $Section_$lt$lt$6.$$p = null;
14923
15099
  // Prepare super implicit arguments
14924
15100
  for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
14925
15101
  $zuper[$zuper_i] = arguments[$zuper_i];
@@ -14927,13 +15103,13 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14927
15103
 
14928
15104
  if (block.$context()['$==']("section")) {
14929
15105
  self.$assign_numeral(block)};
14930
- return $send(self, Opal.find_super_dispatcher(self, '<<', $Section_$lt$lt$5, false), $zuper, $iter);
14931
- }, $Section_$lt$lt$5.$$arity = 1);
15106
+ return $send(self, Opal.find_super_dispatcher(self, '<<', $Section_$lt$lt$6, false), $zuper, $iter);
15107
+ }, $Section_$lt$lt$6.$$arity = 1);
14932
15108
 
14933
- Opal.def(self, '$to_s', $Section_to_s$6 = function $$to_s() {
14934
- var $iter = $Section_to_s$6.$$p, $yield = $iter || nil, self = this, formal_title = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
15109
+ Opal.def(self, '$to_s', $Section_to_s$7 = function $$to_s() {
15110
+ var $iter = $Section_to_s$7.$$p, $yield = $iter || nil, self = this, formal_title = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
14935
15111
 
14936
- if ($iter) $Section_to_s$6.$$p = null;
15112
+ if ($iter) $Section_to_s$7.$$p = null;
14937
15113
  // Prepare super implicit arguments
14938
15114
  for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
14939
15115
  $zuper[$zuper_i] = arguments[$zuper_i];
@@ -14947,10 +15123,10 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14947
15123
  }; return nil; })();
14948
15124
  return "" + "#<" + (self.$class()) + "@" + (self.$object_id()) + " {level: " + (self.level) + ", title: " + (formal_title.$inspect()) + ", blocks: " + (self.blocks.$size()) + "}>";
14949
15125
  } else {
14950
- return $send(self, Opal.find_super_dispatcher(self, 'to_s', $Section_to_s$6, false), $zuper, $iter)
15126
+ return $send(self, Opal.find_super_dispatcher(self, 'to_s', $Section_to_s$7, false), $zuper, $iter)
14951
15127
  }
14952
- }, $Section_to_s$6.$$arity = 0);
14953
- return (Opal.defs(self, '$generate_id', $Section_generate_id$7 = function $$generate_id(title, document) {
15128
+ }, $Section_to_s$7.$$arity = 0);
15129
+ return (Opal.defs(self, '$generate_id', $Section_generate_id$8 = function $$generate_id(title, document) {
14954
15130
  var $a, $b, self = this, attrs = nil, pre = nil, sep = nil, no_sep = nil, $writer = nil, sep_sub = nil, gen_id = nil, ids = nil, cnt = nil, candidate_id = nil;
14955
15131
 
14956
15132
 
@@ -14988,7 +15164,7 @@ Opal.modules["asciidoctor/section"] = function(Opal) {
14988
15164
  } else {
14989
15165
  return gen_id
14990
15166
  };
14991
- }, $Section_generate_id$7.$$arity = 2), nil) && 'generate_id';
15167
+ }, $Section_generate_id$8.$$arity = 2), nil) && 'generate_id';
14992
15168
  })($nesting[0], $$($nesting, 'AbstractBlock'), $nesting)
14993
15169
  })($nesting[0], $nesting)
14994
15170
  };
@@ -16612,7 +16788,7 @@ Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
16612
16788
  return "" + "<script src=\"" + (base_url) + "/languages/" + (lang.$lstrip()) + ".min.js\"></script>\n";}, $$6.$$s = self, $$6.$$arity = 1, $$6)).$join()
16613
16789
  } else {
16614
16790
  return ""
16615
- }; 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>"
16616
16792
  };
16617
16793
  }, $HighlightJsAdapter_docinfo$5.$$arity = 3), nil) && 'docinfo';
16618
16794
  })($$($nesting, 'SyntaxHighlighter'), $$$($$($nesting, 'SyntaxHighlighter'), 'Base'), $nesting)
@@ -17221,7 +17397,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
17221
17397
  }
17222
17398
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $gvars = Opal.gvars;
17223
17399
 
17224
- Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$===', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$pop', '$split', '$nil_or_empty?', '$type', '$catalog', '$get_root_document', '$xreftext', '$target', '$reftext', '$chop', '$sub', '$match', '$private', '$upcase', '$nested?', '$parent_document', '$to_s', '$handles?', '$send']);
17400
+ Opal.add_stubs(['$register_for', '$default=', '$-', '$==', '$[]', '$init_backend_traits', '$node_name', '$===', '$convert_inline_quoted', '$convert_paragraph', '$convert_inline_anchor', '$convert_section', '$convert_listing', '$convert_literal', '$convert_ulist', '$convert_olist', '$convert_dlist', '$convert_admonition', '$convert_colist', '$convert_embedded', '$convert_example', '$convert_floating_title', '$convert_image', '$convert_inline_break', '$convert_inline_button', '$convert_inline_callout', '$convert_inline_footnote', '$convert_inline_image', '$convert_inline_indexterm', '$convert_inline_kbd', '$convert_inline_menu', '$convert_open', '$convert_page_break', '$convert_preamble', '$convert_quote', '$convert_sidebar', '$convert_stem', '$convert_table', '$convert_thematic_break', '$convert_verse', '$convert_video', '$convert_document', '$convert_toc', '$convert_pass', '$convert_audio', '$empty?', '$attr', '$attr?', '$<<', '$include?', '$sub_replacements', '$gsub', '$extname', '$slice', '$length', '$doctitle', '$normalize_web_path', '$primary_stylesheet_data', '$instance', '$read_contents', '$syntax_highlighter', '$size', '$docinfo', '$id', '$sections?', '$doctype', '$role?', '$role', '$join', '$noheader', '$convert', '$converter', '$generate_manname_section', '$header?', '$notitle', '$title', '$header', '$each', '$authors', '$>', '$name', '$email', '$sub_macros', '$+', '$downcase', '$concat', '$content', '$footnotes?', '$!', '$footnotes', '$index', '$text', '$nofooter', '$docinfo?', '$[]=', '$delete_at', '$inspect', '$!=', '$to_i', '$attributes', '$document', '$sections', '$level', '$caption', '$captioned_title', '$numbered', '$<=', '$<', '$sectname', '$sectnum', '$convert_outline', '$title?', '$icon_uri', '$compact', '$media_uri', '$option?', '$append_boolean_attribute', '$style', '$items', '$blocks?', '$text?', '$chomp', '$safe', '$read_svg_contents', '$alt', '$image_uri', '$encode_attribute_value', '$append_link_constraint_attrs', '$highlight?', '$to_sym', '$format', '$*', '$count', '$start_with?', '$end_with?', '$list_marker_keyword', '$parent', '$warn', '$logger', '$context', '$error', '$new', '$columns', '$to_h', '$rows', '$colspan', '$rowspan', '$unshift', '$shift', '$split', '$pop', '$nil_or_empty?', '$type', '$catalog', '$get_root_document', '$xreftext', '$target', '$reftext', '$chop', '$sub', '$match', '$private', '$upcase', '$nested?', '$parent_document', '$to_s', '$handles?', '$send']);
17225
17401
  return (function($base, $parent_nesting) {
17226
17402
  var self = $module($base, 'Asciidoctor');
17227
17403
 
@@ -17230,7 +17406,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
17230
17406
  (function($base, $super, $parent_nesting) {
17231
17407
  var self = $klass($base, $super, 'Html5Converter');
17232
17408
 
17233
- var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$56, $Html5Converter_convert_inline_kbd$57, $Html5Converter_convert_inline_menu$58, $Html5Converter_convert_inline_quoted$59, $Html5Converter_read_svg_contents$60, $Html5Converter_append_boolean_attribute$62, $Html5Converter_append_link_constraint_attrs$63, $Html5Converter_encode_attribute_value$64, $Html5Converter_generate_manname_section$65, $Html5Converter_get_root_document$66, $Html5Converter_method_missing$67, $Html5Converter_respond_to_missing$ques$68, $writer = nil;
17409
+ var $nesting = [self].concat($parent_nesting), $Html5Converter_initialize$1, $Html5Converter_convert$2, $Html5Converter_convert_document$3, $Html5Converter_convert_embedded$6, $Html5Converter_convert_outline$8, $Html5Converter_convert_section$10, $Html5Converter_convert_admonition$11, $Html5Converter_convert_audio$12, $Html5Converter_convert_colist$13, $Html5Converter_convert_dlist$16, $Html5Converter_convert_example$23, $Html5Converter_convert_floating_title$24, $Html5Converter_convert_image$25, $Html5Converter_convert_listing$26, $Html5Converter_convert_literal$27, $Html5Converter_convert_stem$28, $Html5Converter_convert_olist$30, $Html5Converter_convert_open$32, $Html5Converter_convert_page_break$33, $Html5Converter_convert_paragraph$34, $Html5Converter_convert_preamble$35, $Html5Converter_convert_quote$36, $Html5Converter_convert_thematic_break$37, $Html5Converter_convert_sidebar$38, $Html5Converter_convert_table$39, $Html5Converter_convert_toc$44, $Html5Converter_convert_ulist$45, $Html5Converter_convert_verse$47, $Html5Converter_convert_video$48, $Html5Converter_convert_inline_anchor$49, $Html5Converter_convert_inline_break$50, $Html5Converter_convert_inline_button$51, $Html5Converter_convert_inline_callout$52, $Html5Converter_convert_inline_footnote$53, $Html5Converter_convert_inline_image$54, $Html5Converter_convert_inline_indexterm$55, $Html5Converter_convert_inline_kbd$56, $Html5Converter_convert_inline_menu$57, $Html5Converter_convert_inline_quoted$58, $Html5Converter_read_svg_contents$59, $Html5Converter_append_boolean_attribute$61, $Html5Converter_append_link_constraint_attrs$62, $Html5Converter_encode_attribute_value$63, $Html5Converter_generate_manname_section$64, $Html5Converter_get_root_document$65, $Html5Converter_method_missing$66, $Html5Converter_respond_to_missing$ques$67, $writer = nil;
17234
17410
 
17235
17411
  self.$$prototype.void_element_slash = self.$$prototype.xml_mode = self.$$prototype.refs = self.$$prototype.resolving_xref = nil;
17236
17412
 
@@ -18067,7 +18243,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18067
18243
  }, $Html5Converter_convert_floating_title$24.$$arity = 1);
18068
18244
 
18069
18245
  Opal.def(self, '$convert_image', $Html5Converter_convert_image$25 = function $$convert_image(node) {
18070
- var $a, $b, $c, self = this, target = nil, width_attr = nil, height_attr = nil, svg = nil, obj = nil, img = nil, fallback = nil, id_attr = nil, classes = nil, class_attr = nil, title_el = nil;
18246
+ var $a, $b, self = this, target = nil, width_attr = nil, height_attr = nil, img = nil, fallback = nil, id_attr = nil, classes = nil, class_attr = nil, title_el = nil;
18071
18247
 
18072
18248
 
18073
18249
  target = node.$attr("target");
@@ -18081,18 +18257,23 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18081
18257
  } else {
18082
18258
  return ""
18083
18259
  }; return nil; })();
18084
- if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = node['$attr?']("format", "svg")) ? $c : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) {
18085
- if ($truthy(svg)) {
18260
+ if ($truthy(($truthy($a = ($truthy($b = node['$attr?']("format", "svg")) ? $b : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $a))) {
18261
+ if ($truthy(node['$option?']("inline"))) {
18086
18262
  img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "<span class=\"alt\">" + (node.$alt()) + "</span>")
18087
- } else if ($truthy(obj)) {
18263
+ } else if ($truthy(node['$option?']("interactive"))) {
18088
18264
 
18089
18265
  fallback = (function() {if ($truthy(node['$attr?']("fallback"))) {
18090
18266
  return "" + "<img src=\"" + (node.$image_uri(node.$attr("fallback"))) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (width_attr) + (height_attr) + (self.void_element_slash) + ">"
18091
18267
  } else {
18092
18268
  return "" + "<span class=\"alt\">" + (node.$alt()) + "</span>"
18093
18269
  }; return nil; })();
18094
- img = "" + "<object type=\"image/svg+xml\" data=\"" + (node.$image_uri(target)) + "\"" + (width_attr) + (height_attr) + ">" + (fallback) + "</object>";}};
18095
- img = ($truthy($a = img) ? $a : "" + "<img src=\"" + (node.$image_uri(target)) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (width_attr) + (height_attr) + (self.void_element_slash) + ">");
18270
+ img = "" + "<object type=\"image/svg+xml\" data=\"" + (node.$image_uri(target)) + "\"" + (width_attr) + (height_attr) + ">" + (fallback) + "</object>";
18271
+ } else {
18272
+ img = "" + "<img src=\"" + (node.$image_uri(target)) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (width_attr) + (height_attr) + (self.void_element_slash) + ">"
18273
+ }
18274
+ } else {
18275
+ img = "" + "<img src=\"" + (node.$image_uri(target)) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (width_attr) + (height_attr) + (self.void_element_slash) + ">"
18276
+ };
18096
18277
  if ($truthy(node['$attr?']("link"))) {
18097
18278
  img = "" + "<a class=\"image\" href=\"" + (node.$attr("link")) + "\"" + (self.$append_link_constraint_attrs(node).$join()) + ">" + (img) + "</a>"};
18098
18279
  id_attr = (function() {if ($truthy(node.$id())) {
@@ -18175,7 +18356,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18175
18356
 
18176
18357
  return syntax_hl.$format(node, lang, opts);
18177
18358
  } else {
18178
- 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)
18179
18360
  }; return nil; })()) + "\n" + "</div>\n" + "</div>";
18180
18361
  }, $Html5Converter_convert_listing$26.$$arity = 1);
18181
18362
 
@@ -18307,7 +18488,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18307
18488
  if ((style = node.$style())['$==']("abstract")) {
18308
18489
  if ($truthy((($a = node.$parent()['$=='](node.$document())) ? node.$document().$doctype()['$==']("book") : node.$parent()['$=='](node.$document())))) {
18309
18490
 
18310
- 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.");
18311
18492
  return "";
18312
18493
  } else {
18313
18494
 
@@ -18475,7 +18656,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18475
18656
  }, $Html5Converter_convert_sidebar$38.$$arity = 1);
18476
18657
 
18477
18658
  Opal.def(self, '$convert_table', $Html5Converter_convert_table$39 = function $$convert_table(node) {
18478
- var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, frame = nil, classes = nil, stripes = nil, styles = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, style_attribute = nil, slash = nil;
18659
+ var $a, $$40, $$41, self = this, result = nil, id_attribute = nil, frame = nil, classes = nil, stripes = nil, style_attribute = nil, autowidth = nil, tablewidth = nil, role = nil, class_attribute = nil, slash = nil;
18479
18660
 
18480
18661
 
18481
18662
  result = [];
@@ -18489,24 +18670,19 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18489
18670
  classes = ["tableblock", "" + "frame-" + (frame), "" + "grid-" + (node.$attr("grid", "all", "table-grid"))];
18490
18671
  if ($truthy((stripes = node.$attr("stripes", nil, "table-stripes")))) {
18491
18672
  classes['$<<']("" + "stripes-" + (stripes))};
18492
- styles = [];
18673
+ style_attribute = "";
18493
18674
  if ($truthy(($truthy($a = (autowidth = node['$option?']("autowidth"))) ? node['$attr?']("width")['$!']() : $a))) {
18494
18675
  classes['$<<']("fit-content")
18495
18676
  } else if ((tablewidth = node.$attr("tablepcwidth"))['$=='](100)) {
18496
18677
  classes['$<<']("stretch")
18497
18678
  } else {
18498
- styles['$<<']("" + "width: " + (tablewidth) + "%;")
18679
+ style_attribute = "" + " style=\"width: " + (tablewidth) + "%;\""
18499
18680
  };
18500
18681
  if ($truthy(node['$attr?']("float"))) {
18501
18682
  classes['$<<'](node.$attr("float"))};
18502
18683
  if ($truthy((role = node.$role()))) {
18503
18684
  classes['$<<'](role)};
18504
18685
  class_attribute = "" + " class=\"" + (classes.$join(" ")) + "\"";
18505
- style_attribute = (function() {if ($truthy(styles['$empty?']())) {
18506
- return ""
18507
- } else {
18508
- return "" + " style=\"" + (styles.$join(" ")) + "\""
18509
- }; return nil; })();
18510
18686
  result['$<<']("" + "<table" + (id_attribute) + (class_attribute) + (style_attribute) + ">");
18511
18687
  if ($truthy(node['$title?']())) {
18512
18688
  result['$<<']("" + "<caption class=\"title\">" + (node.$captioned_title()) + "</caption>")};
@@ -18770,7 +18946,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18770
18946
  }, $Html5Converter_convert_verse$47.$$arity = 1);
18771
18947
 
18772
18948
  Opal.def(self, '$convert_video', $Html5Converter_convert_video$48 = function $$convert_video(node) {
18773
- var $a, $b, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, width_attribute = nil, height_attribute = nil, $case = nil, asset_uri_scheme = nil, start_anchor = nil, delimiter = nil, autoplay_param = nil, loop_param = nil, muted_param = nil, rel_param_val = nil, start_param = nil, end_param = nil, has_loop_param = nil, mute_param = nil, controls_param = nil, fs_param = nil, fs_attribute = nil, modest_param = nil, theme_param = nil, hl_param = nil, target = nil, list = nil, list_param = nil, playlist = nil, poster_attribute = nil, val = nil, preload_attribute = nil, start_t = nil, end_t = nil, time_anchor = nil;
18949
+ var $a, $b, self = this, xml = nil, id_attribute = nil, classes = nil, class_attribute = nil, title_element = nil, width_attribute = nil, height_attribute = nil, $case = nil, asset_uri_scheme = nil, start_anchor = nil, delimiter = nil, target = nil, hash = nil, hash_param = nil, autoplay_param = nil, loop_param = nil, muted_param = nil, rel_param_val = nil, start_param = nil, end_param = nil, has_loop_param = nil, mute_param = nil, controls_param = nil, fs_param = nil, fs_attribute = nil, modest_param = nil, theme_param = nil, hl_param = nil, list = nil, list_param = nil, playlist = nil, poster_attribute = nil, val = nil, preload_attribute = nil, start_t = nil, end_t = nil, time_anchor = nil;
18774
18950
 
18775
18951
 
18776
18952
  xml = self.xml_mode;
@@ -18814,6 +18990,12 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18814
18990
  return ""
18815
18991
  }; return nil; })();
18816
18992
  delimiter = ["?"];
18993
+ $b = node.$attr("target").$split("/", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (hash = ($a[1] == null ? nil : $a[1])), $b;
18994
+ hash_param = (function() {if ($truthy((hash = ($truthy($a = hash) ? $a : node.$attr("hash"))))) {
18995
+ return "" + (($truthy($a = delimiter.$pop()) ? $a : "&amp;")) + "h=" + (hash)
18996
+ } else {
18997
+ return ""
18998
+ }; return nil; })();
18817
18999
  autoplay_param = (function() {if ($truthy(node['$option?']("autoplay"))) {
18818
19000
  return "" + (($truthy($a = delimiter.$pop()) ? $a : "&amp;")) + "autoplay=1"
18819
19001
  } else {
@@ -18829,7 +19011,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18829
19011
  } else {
18830
19012
  return ""
18831
19013
  }; return nil; })();
18832
- return "" + "<div" + (id_attribute) + (class_attribute) + ">" + (title_element) + "\n" + "<div class=\"content\">\n" + "<iframe" + (width_attribute) + (height_attribute) + " src=\"" + (asset_uri_scheme) + "//player.vimeo.com/video/" + (node.$attr("target")) + (autoplay_param) + (loop_param) + (muted_param) + (start_anchor) + "\" frameborder=\"0\"" + ((function() {if ($truthy(node['$option?']("nofullscreen"))) {
19014
+ return "" + "<div" + (id_attribute) + (class_attribute) + ">" + (title_element) + "\n" + "<div class=\"content\">\n" + "<iframe" + (width_attribute) + (height_attribute) + " src=\"" + (asset_uri_scheme) + "//player.vimeo.com/video/" + (target) + (hash_param) + (autoplay_param) + (loop_param) + (muted_param) + (start_anchor) + "\" frameborder=\"0\"" + ((function() {if ($truthy(node['$option?']("nofullscreen"))) {
18833
19015
  return ""
18834
19016
  } else {
18835
19017
 
@@ -18906,7 +19088,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
18906
19088
 
18907
19089
  $b = target.$split(",", 2), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (playlist = ($a[1] == null ? nil : $a[1])), $b;
18908
19090
  if ($truthy((playlist = ($truthy($a = playlist) ? $a : node.$attr("playlist"))))) {
18909
- list_param = "" + "&amp;playlist=" + (playlist)
19091
+ list_param = "" + "&amp;playlist=" + (target) + "," + (playlist)
18910
19092
  } else {
18911
19093
  list_param = (function() {if ($truthy(has_loop_param)) {
18912
19094
  return "" + "&amp;playlist=" + (target)
@@ -19082,87 +19264,85 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19082
19264
  }, $Html5Converter_convert_inline_footnote$53.$$arity = 1);
19083
19265
 
19084
19266
  Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) {
19085
- var $a, $b, $$55, $c, $d, self = this, type = nil, class_attr_val = nil, title_attr = nil, img = nil, target = nil, attrs = nil, svg = nil, obj = nil, fallback = nil, role = nil;
19086
-
19087
-
19088
- if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) {
19089
-
19090
- class_attr_val = "" + "fa fa-" + (node.$target());
19091
- $send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this;
19092
-
19093
-
19094
-
19095
- if (key == null) {
19096
- key = nil;
19097
- };
19267
+ var $a, $b, self = this, target = nil, type = nil, icons = nil, i_class_attr_val = nil, attrs = nil, img = nil, fallback = nil, class_attr_val = nil, role = nil;
19268
+
19269
+
19270
+ target = node.$target();
19271
+ if ((type = ($truthy($a = node.$type()) ? $a : "image"))['$==']("icon")) {
19272
+ if ((icons = node.$document().$attr("icons"))['$==']("font")) {
19273
+
19274
+ i_class_attr_val = "" + "fa fa-" + (target);
19275
+ if ($truthy(node['$attr?']("size"))) {
19276
+ i_class_attr_val = "" + (i_class_attr_val) + " fa-" + (node.$attr("size"))};
19277
+ if ($truthy(node['$attr?']("flip"))) {
19278
+ i_class_attr_val = "" + (i_class_attr_val) + " fa-flip-" + (node.$attr("flip"))
19279
+ } else if ($truthy(node['$attr?']("rotate"))) {
19280
+ i_class_attr_val = "" + (i_class_attr_val) + " fa-rotate-" + (node.$attr("rotate"))};
19281
+ attrs = (function() {if ($truthy(node['$attr?']("title"))) {
19282
+ return "" + " title=\"" + (node.$attr("title")) + "\""
19283
+ } else {
19284
+ return ""
19285
+ }; return nil; })();
19286
+ img = "" + "<i class=\"" + (i_class_attr_val) + "\"" + (attrs) + "></i>";
19287
+ } else if ($truthy(icons)) {
19098
19288
 
19099
- if (prefix == null) {
19100
- prefix = nil;
19101
- };
19102
- if ($truthy(node['$attr?'](key))) {
19103
- return (class_attr_val = "" + (class_attr_val) + " " + (prefix) + (node.$attr(key)))
19289
+ attrs = (function() {if ($truthy(node['$attr?']("width"))) {
19290
+ return "" + " width=\"" + (node.$attr("width")) + "\""
19104
19291
  } else {
19105
- return nil
19106
- };}, $$55.$$s = self, $$55.$$arity = 2, $$55));
19107
- title_attr = (function() {if ($truthy(node['$attr?']("title"))) {
19108
- return "" + " title=\"" + (node.$attr("title")) + "\""
19292
+ return ""
19293
+ }; return nil; })();
19294
+ if ($truthy(node['$attr?']("height"))) {
19295
+ attrs = "" + (attrs) + " height=\"" + (node.$attr("height")) + "\""};
19296
+ if ($truthy(node['$attr?']("title"))) {
19297
+ attrs = "" + (attrs) + " title=\"" + (node.$attr("title")) + "\""};
19298
+ img = "" + "<img src=\"" + (node.$icon_uri(target)) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (attrs) + (self.void_element_slash) + ">";
19109
19299
  } else {
19110
- return ""
19111
- }; return nil; })();
19112
- img = "" + "<i class=\"" + (class_attr_val) + "\"" + (title_attr) + "></i>";
19113
- } else if ($truthy((($a = type['$==']("icon")) ? node.$document()['$attr?']("icons")['$!']() : type['$==']("icon")))) {
19114
- img = "" + "[" + (node.$alt()) + "]"
19300
+ img = "" + "[" + (node.$alt()) + "&#93;"
19301
+ }
19115
19302
  } else {
19116
19303
 
19117
- target = node.$target();
19118
- attrs = [];
19119
- if ($truthy(node['$attr?']("width"))) {
19120
- attrs['$<<']("" + " width=\"" + (node.$attr("width")) + "\"")};
19121
- if ($truthy(node['$attr?']("height"))) {
19122
- attrs['$<<']("" + " height=\"" + (node.$attr("height")) + "\"")};
19123
- if ($truthy(node['$attr?']("title"))) {
19124
- attrs['$<<']("" + " title=\"" + (node.$attr("title")) + "\"")};
19125
- attrs = (function() {if ($truthy(attrs['$empty?']())) {
19126
- return ""
19304
+ attrs = (function() {if ($truthy(node['$attr?']("width"))) {
19305
+ return "" + " width=\"" + (node.$attr("width")) + "\""
19127
19306
  } else {
19128
- return attrs.$join()
19307
+ return ""
19129
19308
  }; return nil; })();
19130
- if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = type['$!=']("icon")) ? ($truthy($d = node['$attr?']("format", "svg")) ? $d : target['$include?'](".svg")) : $c)) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $b)) ? ($truthy($b = (svg = node['$option?']("inline"))) ? $b : (obj = node['$option?']("interactive"))) : $a))) {
19131
- if ($truthy(svg)) {
19309
+ if ($truthy(node['$attr?']("height"))) {
19310
+ attrs = "" + (attrs) + " height=\"" + (node.$attr("height")) + "\""};
19311
+ if ($truthy(node['$attr?']("title"))) {
19312
+ attrs = "" + (attrs) + " title=\"" + (node.$attr("title")) + "\""};
19313
+ if ($truthy(($truthy($a = ($truthy($b = node['$attr?']("format", "svg")) ? $b : target['$include?'](".svg"))) ? $rb_lt(node.$document().$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $a))) {
19314
+ if ($truthy(node['$option?']("inline"))) {
19132
19315
  img = ($truthy($a = self.$read_svg_contents(node, target)) ? $a : "" + "<span class=\"alt\">" + (node.$alt()) + "</span>")
19133
- } else if ($truthy(obj)) {
19316
+ } else if ($truthy(node['$option?']("interactive"))) {
19134
19317
 
19135
19318
  fallback = (function() {if ($truthy(node['$attr?']("fallback"))) {
19136
19319
  return "" + "<img src=\"" + (node.$image_uri(node.$attr("fallback"))) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (attrs) + (self.void_element_slash) + ">"
19137
19320
  } else {
19138
19321
  return "" + "<span class=\"alt\">" + (node.$alt()) + "</span>"
19139
19322
  }; return nil; })();
19140
- img = "" + "<object type=\"image/svg+xml\" data=\"" + (node.$image_uri(target)) + "\"" + (attrs) + ">" + (fallback) + "</object>";}};
19141
- img = ($truthy($a = img) ? $a : "" + "<img src=\"" + ((function() {if (type['$==']("icon")) {
19142
-
19143
- return node.$icon_uri(target);
19323
+ img = "" + "<object type=\"image/svg+xml\" data=\"" + (node.$image_uri(target)) + "\"" + (attrs) + ">" + (fallback) + "</object>";
19324
+ } else {
19325
+ img = "" + "<img src=\"" + (node.$image_uri(target)) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (attrs) + (self.void_element_slash) + ">"
19326
+ }
19144
19327
  } else {
19145
-
19146
- return node.$image_uri(target);
19147
- }; return nil; })()) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (attrs) + (self.void_element_slash) + ">");
19328
+ img = "" + "<img src=\"" + (node.$image_uri(target)) + "\" alt=\"" + (self.$encode_attribute_value(node.$alt())) + "\"" + (attrs) + (self.void_element_slash) + ">"
19329
+ };
19148
19330
  };
19149
19331
  if ($truthy(node['$attr?']("link"))) {
19150
19332
  img = "" + "<a class=\"image\" href=\"" + (node.$attr("link")) + "\"" + (self.$append_link_constraint_attrs(node).$join()) + ">" + (img) + "</a>"};
19333
+ class_attr_val = type;
19151
19334
  if ($truthy((role = node.$role()))) {
19152
- if ($truthy(node['$attr?']("float"))) {
19153
- class_attr_val = "" + (type) + " " + (node.$attr("float")) + " " + (role)
19335
+ class_attr_val = (function() {if ($truthy(node['$attr?']("float"))) {
19336
+ return "" + (class_attr_val) + " " + (node.$attr("float")) + " " + (role)
19154
19337
  } else {
19155
- class_attr_val = "" + (type) + " " + (role)
19156
- }
19338
+ return "" + (class_attr_val) + " " + (role)
19339
+ }; return nil; })()
19157
19340
  } else if ($truthy(node['$attr?']("float"))) {
19158
- class_attr_val = "" + (type) + " " + (node.$attr("float"))
19159
- } else {
19160
- class_attr_val = type
19161
- };
19341
+ class_attr_val = "" + (class_attr_val) + " " + (node.$attr("float"))};
19162
19342
  return "" + "<span class=\"" + (class_attr_val) + "\">" + (img) + "</span>";
19163
19343
  }, $Html5Converter_convert_inline_image$54.$$arity = 1);
19164
19344
 
19165
- Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$56 = function $$convert_inline_indexterm(node) {
19345
+ Opal.def(self, '$convert_inline_indexterm', $Html5Converter_convert_inline_indexterm$55 = function $$convert_inline_indexterm(node) {
19166
19346
  var self = this;
19167
19347
 
19168
19348
  if (node.$type()['$==']("visible")) {
@@ -19170,9 +19350,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19170
19350
  } else {
19171
19351
  return ""
19172
19352
  }
19173
- }, $Html5Converter_convert_inline_indexterm$56.$$arity = 1);
19353
+ }, $Html5Converter_convert_inline_indexterm$55.$$arity = 1);
19174
19354
 
19175
- Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$57 = function $$convert_inline_kbd(node) {
19355
+ Opal.def(self, '$convert_inline_kbd', $Html5Converter_convert_inline_kbd$56 = function $$convert_inline_kbd(node) {
19176
19356
  var self = this, keys = nil;
19177
19357
 
19178
19358
  if ((keys = node.$attr("keys")).$size()['$=='](1)) {
@@ -19180,9 +19360,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19180
19360
  } else {
19181
19361
  return "" + "<span class=\"keyseq\"><kbd>" + (keys.$join("</kbd>+<kbd>")) + "</kbd></span>"
19182
19362
  }
19183
- }, $Html5Converter_convert_inline_kbd$57.$$arity = 1);
19363
+ }, $Html5Converter_convert_inline_kbd$56.$$arity = 1);
19184
19364
 
19185
- Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$58 = function $$convert_inline_menu(node) {
19365
+ Opal.def(self, '$convert_inline_menu', $Html5Converter_convert_inline_menu$57 = function $$convert_inline_menu(node) {
19186
19366
  var self = this, caret = nil, submenu_joiner = nil, menu = nil, submenus = nil, menuitem = nil;
19187
19367
 
19188
19368
 
@@ -19202,9 +19382,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19202
19382
  } else {
19203
19383
  return "" + "<span class=\"menuseq\"><b class=\"menu\">" + (menu) + "</b>" + (caret) + "<b class=\"submenu\">" + (submenus.$join(submenu_joiner)) + "</b>" + (caret) + "<b class=\"menuitem\">" + (node.$attr("menuitem")) + "</b></span>"
19204
19384
  };
19205
- }, $Html5Converter_convert_inline_menu$58.$$arity = 1);
19385
+ }, $Html5Converter_convert_inline_menu$57.$$arity = 1);
19206
19386
 
19207
- Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$59 = function $$convert_inline_quoted(node) {
19387
+ Opal.def(self, '$convert_inline_quoted', $Html5Converter_convert_inline_quoted$58 = function $$convert_inline_quoted(node) {
19208
19388
  var $a, $b, self = this, open = nil, close = nil, tag = nil, class_attr = nil;
19209
19389
 
19210
19390
 
@@ -19230,10 +19410,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19230
19410
  } else {
19231
19411
  return "" + (open) + (node.$text()) + (close)
19232
19412
  };
19233
- }, $Html5Converter_convert_inline_quoted$59.$$arity = 1);
19413
+ }, $Html5Converter_convert_inline_quoted$58.$$arity = 1);
19234
19414
 
19235
- Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$60 = function $$read_svg_contents(node, target) {
19236
- var $$61, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil;
19415
+ Opal.def(self, '$read_svg_contents', $Html5Converter_read_svg_contents$59 = function $$read_svg_contents(node, target) {
19416
+ var $$60, self = this, svg = nil, old_start_tag = nil, new_start_tag = nil, start_tag_match = nil;
19237
19417
 
19238
19418
 
19239
19419
  if ($truthy((svg = node.$read_contents(target, $hash2(["start", "normalize", "label", "warn_if_empty"], {"start": node.$document().$attr("imagesdir"), "normalize": true, "label": "SVG", "warn_if_empty": true}))))) {
@@ -19245,7 +19425,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19245
19425
  svg = svg.$sub($$($nesting, 'SvgPreambleRx'), "")
19246
19426
  };
19247
19427
  old_start_tag = (new_start_tag = (start_tag_match = nil));
19248
- $send(["width", "height"], 'each', [], ($$61 = function(dim){var self = $$61.$$s || this, $a, $b;
19428
+ $send(["width", "height"], 'each', [], ($$60 = function(dim){var self = $$60.$$s || this, $a, $b;
19249
19429
 
19250
19430
 
19251
19431
 
@@ -19263,14 +19443,14 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19263
19443
  return nil;};
19264
19444
  new_start_tag = (old_start_tag = start_tag_match['$[]'](0)).$gsub($$($nesting, 'DimensionAttributeRx'), "");
19265
19445
  };
19266
- return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (node.$attr(dim)) + "\">");}, $$61.$$s = self, $$61.$$arity = 1, $$61));
19446
+ return (new_start_tag = "" + (new_start_tag.$chop()) + " " + (dim) + "=\"" + (node.$attr(dim)) + "\">");}, $$60.$$s = self, $$60.$$arity = 1, $$60));
19267
19447
  if ($truthy(new_start_tag)) {
19268
19448
  svg = "" + (new_start_tag) + (svg['$[]'](Opal.Range.$new(old_start_tag.$length(), -1, false)))};};
19269
19449
  return svg;
19270
- }, $Html5Converter_read_svg_contents$60.$$arity = 2);
19450
+ }, $Html5Converter_read_svg_contents$59.$$arity = 2);
19271
19451
  self.$private();
19272
19452
 
19273
- Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$62 = function $$append_boolean_attribute(name, xml) {
19453
+ Opal.def(self, '$append_boolean_attribute', $Html5Converter_append_boolean_attribute$61 = function $$append_boolean_attribute(name, xml) {
19274
19454
  var self = this;
19275
19455
 
19276
19456
  if ($truthy(xml)) {
@@ -19278,9 +19458,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19278
19458
  } else {
19279
19459
  return "" + " " + (name)
19280
19460
  }
19281
- }, $Html5Converter_append_boolean_attribute$62.$$arity = 2);
19461
+ }, $Html5Converter_append_boolean_attribute$61.$$arity = 2);
19282
19462
 
19283
- Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$63 = function $$append_link_constraint_attrs(node, attrs) {
19463
+ Opal.def(self, '$append_link_constraint_attrs', $Html5Converter_append_link_constraint_attrs$62 = function $$append_link_constraint_attrs(node, attrs) {
19284
19464
  var $a, self = this, rel = nil, window = nil;
19285
19465
 
19286
19466
 
@@ -19302,9 +19482,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19302
19482
  } else if ($truthy(rel)) {
19303
19483
  attrs['$<<']("" + " rel=\"" + (rel) + "\"")};
19304
19484
  return attrs;
19305
- }, $Html5Converter_append_link_constraint_attrs$63.$$arity = -2);
19485
+ }, $Html5Converter_append_link_constraint_attrs$62.$$arity = -2);
19306
19486
 
19307
- Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$64 = function $$encode_attribute_value(val) {
19487
+ Opal.def(self, '$encode_attribute_value', $Html5Converter_encode_attribute_value$63 = function $$encode_attribute_value(val) {
19308
19488
  var self = this;
19309
19489
 
19310
19490
  if ($truthy(val['$include?']("\""))) {
@@ -19313,9 +19493,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19313
19493
  } else {
19314
19494
  return val
19315
19495
  }
19316
- }, $Html5Converter_encode_attribute_value$64.$$arity = 1);
19496
+ }, $Html5Converter_encode_attribute_value$63.$$arity = 1);
19317
19497
 
19318
- Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$65 = function $$generate_manname_section(node) {
19498
+ Opal.def(self, '$generate_manname_section', $Html5Converter_generate_manname_section$64 = function $$generate_manname_section(node) {
19319
19499
  var $a, self = this, manname_title = nil, next_section = nil, next_section_title = nil, manname_id_attr = nil, manname_id = nil;
19320
19500
 
19321
19501
 
@@ -19328,9 +19508,9 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19328
19508
  return ""
19329
19509
  }; return nil; })();
19330
19510
  return "" + "<h2" + (manname_id_attr) + ">" + (manname_title) + "</h2>\n" + "<div class=\"sectionbody\">\n" + "<p>" + (node.$attr("mannames").$join(", ")) + " - " + (node.$attr("manpurpose")) + "</p>\n" + "</div>";
19331
- }, $Html5Converter_generate_manname_section$65.$$arity = 1);
19511
+ }, $Html5Converter_generate_manname_section$64.$$arity = 1);
19332
19512
 
19333
- Opal.def(self, '$get_root_document', $Html5Converter_get_root_document$66 = function $$get_root_document(node) {
19513
+ Opal.def(self, '$get_root_document', $Html5Converter_get_root_document$65 = function $$get_root_document(node) {
19334
19514
  var $a, self = this;
19335
19515
 
19336
19516
 
@@ -19338,12 +19518,12 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19338
19518
  node = node.$parent_document()
19339
19519
  };
19340
19520
  return node;
19341
- }, $Html5Converter_get_root_document$66.$$arity = 1);
19521
+ }, $Html5Converter_get_root_document$65.$$arity = 1);
19342
19522
 
19343
- Opal.def(self, '$method_missing', $Html5Converter_method_missing$67 = function $$method_missing(id, $a) {
19344
- var $post_args, args, $b, $iter = $Html5Converter_method_missing$67.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
19523
+ Opal.def(self, '$method_missing', $Html5Converter_method_missing$66 = function $$method_missing(id, $a) {
19524
+ var $post_args, args, $b, $iter = $Html5Converter_method_missing$66.$$p, $yield = $iter || nil, self = this, name = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
19345
19525
 
19346
- if ($iter) $Html5Converter_method_missing$67.$$p = null;
19526
+ if ($iter) $Html5Converter_method_missing$66.$$p = null;
19347
19527
  // Prepare super implicit arguments
19348
19528
  for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
19349
19529
  $zuper[$zuper_i] = arguments[$zuper_i];
@@ -19357,10 +19537,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19357
19537
 
19358
19538
  return $send(self, 'send', ["" + "convert_" + (name)].concat(Opal.to_a(args)));
19359
19539
  } else {
19360
- return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$67, false), $zuper, $iter)
19540
+ return $send(self, Opal.find_super_dispatcher(self, 'method_missing', $Html5Converter_method_missing$66, false), $zuper, $iter)
19361
19541
  };
19362
- }, $Html5Converter_method_missing$67.$$arity = -2);
19363
- return (Opal.def(self, '$respond_to_missing?', $Html5Converter_respond_to_missing$ques$68 = function(id, $a) {
19542
+ }, $Html5Converter_method_missing$66.$$arity = -2);
19543
+ return (Opal.def(self, '$respond_to_missing?', $Html5Converter_respond_to_missing$ques$67 = function(id, $a) {
19364
19544
  var $post_args, options, $b, self = this, name = nil;
19365
19545
 
19366
19546
 
@@ -19369,7 +19549,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
19369
19549
 
19370
19550
  options = $post_args;;
19371
19551
  return ($truthy($b = (name = id.$to_s())['$start_with?']("convert_")['$!']()) ? self['$handles?'](name) : $b);
19372
- }, $Html5Converter_respond_to_missing$ques$68.$$arity = -2), nil) && 'respond_to_missing?';
19552
+ }, $Html5Converter_respond_to_missing$ques$67.$$arity = -2), nil) && 'respond_to_missing?';
19373
19553
  })($$($nesting, 'Converter'), $$$($$($nesting, 'Converter'), 'Base'), $nesting)
19374
19554
  })($nesting[0], $nesting)
19375
19555
  };
@@ -19390,7 +19570,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
19390
19570
  }
19391
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;
19392
19572
 
19393
- 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']);
19394
19574
 
19395
19575
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
19396
19576
  } else {
@@ -20328,9 +20508,9 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20328
20508
  (function($base, $super, $parent_nesting) {
20329
20509
  var self = $klass($base, $super, 'Registry');
20330
20510
 
20331
- 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;
20332
20512
 
20333
- 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;
20334
20514
 
20335
20515
  self.$attr_reader("document");
20336
20516
  self.$attr_reader("groups");
@@ -20344,6 +20524,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20344
20524
  groups = $hash2([], {});
20345
20525
  };
20346
20526
  self.groups = groups;
20527
+ self.$reset();
20347
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)))))));
20348
20529
  return (self.document = nil);
20349
20530
  }, $Registry_initialize$53.$$arity = -1);
@@ -20352,6 +20533,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20352
20533
  var $$55, self = this, ext_groups = nil;
20353
20534
 
20354
20535
 
20536
+ if ($truthy(self.document)) {
20537
+ self.$reset()};
20355
20538
  self.document = document;
20356
20539
  if ($truthy((ext_groups = $rb_plus($$($nesting, 'Extensions').$groups().$values(), self.groups.$values()))['$empty?']())) {
20357
20540
  } else {
@@ -20722,7 +20905,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20722
20905
  };
20723
20906
  if ($truthy(processor['$process_block_given?']())) {
20724
20907
  } else {
20725
- 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(":")))
20726
20909
  };
20727
20910
  processor.$freeze();
20728
20911
  extension = $$($nesting, 'ProcessorExtension').$new(kind, processor);
@@ -20792,11 +20975,11 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20792
20975
  };
20793
20976
  if ($truthy((name = self.$as_symbol(processor.$name())))) {
20794
20977
  } else {
20795
- 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(":")))
20796
20979
  };
20797
20980
  if ($truthy(processor['$process_block_given?']())) {
20798
20981
  } else {
20799
- 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(":")))
20800
20983
  };
20801
20984
  processor.$freeze();
20802
20985
 
@@ -20849,7 +21032,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20849
21032
  };
20850
21033
  }, $Registry_add_syntax_processor$89.$$arity = 2);
20851
21034
 
20852
- 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) {
20853
21044
  var self = this, opts = nil, missing = nil;
20854
21045
 
20855
21046
 
@@ -20866,8 +21057,8 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20866
21057
  args.$pop(missing['$-@']())};
20867
21058
  args['$<<'](opts);
20868
21059
  return args;
20869
- }, $Registry_resolve_args$91.$$arity = 2);
20870
- 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) {
20871
21062
  var self = this;
20872
21063
 
20873
21064
  if ($truthy(name)) {
@@ -20875,42 +21066,42 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20875
21066
  } else {
20876
21067
  return nil
20877
21068
  }
20878
- }, $Registry_as_symbol$92.$$arity = 1), nil) && 'as_symbol';
21069
+ }, $Registry_as_symbol$93.$$arity = 1), nil) && 'as_symbol';
20879
21070
  })($nesting[0], null, $nesting);
20880
21071
  (function(self, $parent_nesting) {
20881
- 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;
20882
21073
 
20883
21074
 
20884
21075
 
20885
- Opal.def(self, '$generate_name', $generate_name$93 = function $$generate_name() {
21076
+ Opal.def(self, '$generate_name', $generate_name$94 = function $$generate_name() {
20886
21077
  var self = this;
20887
21078
 
20888
21079
  return "" + "extgrp" + (self.$next_auto_id())
20889
- }, $generate_name$93.$$arity = 0);
21080
+ }, $generate_name$94.$$arity = 0);
20890
21081
 
20891
- 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() {
20892
21083
  var $a, self = this;
20893
21084
  if (self.auto_id == null) self.auto_id = nil;
20894
21085
 
20895
21086
 
20896
21087
  self.auto_id = ($truthy($a = self.auto_id) ? $a : -1);
20897
21088
  return (self.auto_id = $rb_plus(self.auto_id, 1));
20898
- }, $next_auto_id$94.$$arity = 0);
21089
+ }, $next_auto_id$95.$$arity = 0);
20899
21090
 
20900
- Opal.def(self, '$groups', $groups$95 = function $$groups() {
21091
+ Opal.def(self, '$groups', $groups$96 = function $$groups() {
20901
21092
  var $a, self = this;
20902
21093
  if (self.groups == null) self.groups = nil;
20903
21094
 
20904
21095
  return (self.groups = ($truthy($a = self.groups) ? $a : $hash2([], {})))
20905
- }, $groups$95.$$arity = 0);
21096
+ }, $groups$96.$$arity = 0);
20906
21097
 
20907
- Opal.def(self, '$create', $create$96 = function $$create(name) {
20908
- 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;
20909
21100
 
20910
- if ($iter) $create$96.$$p = null;
21101
+ if ($iter) $create$97.$$p = null;
20911
21102
 
20912
21103
 
20913
- if ($iter) $create$96.$$p = null;;
21104
+ if ($iter) $create$97.$$p = null;;
20914
21105
 
20915
21106
  if (name == null) {
20916
21107
  name = nil;
@@ -20920,15 +21111,15 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20920
21111
  } else {
20921
21112
  return $$($nesting, 'Registry').$new()
20922
21113
  };
20923
- }, $create$96.$$arity = -1);
21114
+ }, $create$97.$$arity = -1);
20924
21115
 
20925
- Opal.def(self, '$register', $register$97 = function $$register($a) {
20926
- 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;
20927
21118
 
20928
- if ($iter) $register$97.$$p = null;
21119
+ if ($iter) $register$98.$$p = null;
20929
21120
 
20930
21121
 
20931
- if ($iter) $register$97.$$p = null;;
21122
+ if ($iter) $register$98.$$p = null;;
20932
21123
 
20933
21124
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
20934
21125
 
@@ -20950,34 +21141,37 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
20950
21141
  $writer = [name.$to_sym(), resolved_group];
20951
21142
  $send(self.$groups(), '[]=', Opal.to_a($writer));
20952
21143
  return $writer[$rb_minus($writer["length"], 1)];;
20953
- }, $register$97.$$arity = -1);
21144
+ }, $register$98.$$arity = -1);
20954
21145
 
20955
- Opal.def(self, '$unregister_all', $unregister_all$98 = function $$unregister_all() {
21146
+ Opal.def(self, '$unregister_all', $unregister_all$99 = function $$unregister_all() {
20956
21147
  var self = this;
20957
21148
 
20958
21149
 
20959
21150
  self.groups = $hash2([], {});
20960
21151
  return nil;
20961
- }, $unregister_all$98.$$arity = 0);
20962
- return (Opal.def(self, '$unregister', $unregister$99 = function $$unregister($a) {
20963
- 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;
20964
21155
 
20965
21156
 
20966
21157
 
20967
21158
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
20968
21159
 
20969
21160
  names = $post_args;;
20970
- $send(names, 'each', [], ($$100 = function(group){var self = $$100.$$s || this;
20971
- if (self.groups == null) self.groups = nil;
21161
+ $send(names, 'each_with_object', [self.$groups()], ($$101 = function(group, catalog){var self = $$101.$$s || this;
20972
21162
 
20973
21163
 
20974
21164
 
20975
21165
  if (group == null) {
20976
21166
  group = nil;
20977
21167
  };
20978
- 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));
20979
21173
  return nil;
20980
- }, $unregister$99.$$arity = -1), nil) && 'unregister';
21174
+ }, $unregister$100.$$arity = -1), nil) && 'unregister';
20981
21175
  })(Opal.get_singleton_class(self), $nesting);
20982
21176
  })($nesting[0], $nesting)
20983
21177
  })($nesting[0], $nesting);
@@ -21031,6 +21225,12 @@ Opal.modules["asciidoctor/js/asciidoctor_ext/document"] = function(Opal) {
21031
21225
  var nil = Opal.nil
21032
21226
  var utc_offset
21033
21227
  var source_date_epoch
21228
+ var localdate
21229
+ var localyear
21230
+ var localtime
21231
+ var localdatetime
21232
+ var docdate
21233
+ var doctime
21034
21234
 
21035
21235
  var getYear = function (time, utc_offset) {
21036
21236
  return utc_offset === 0 ? time.getUTCFullYear() : time.getFullYear()
@@ -21118,6 +21318,7 @@ Opal.modules["asciidoctor/js/asciidoctor_ext/document"] = function(Opal) {
21118
21318
  var mtime_hours = ('0' + (getHours(input_mtime, utc_offset))).slice(-2)
21119
21319
  var mtime_minutes = ('0' + (input_mtime.getMinutes())).slice(-2)
21120
21320
  var mtime_seconds = ('0' + (input_mtime.getSeconds())).slice(-2)
21321
+ var utc_offset_format
21121
21322
  if (utc_offset === 0) {
21122
21323
  utc_offset_format = 'UTC'
21123
21324
  } else if (utc_offset > 0) {
@@ -21326,7 +21527,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
21326
21527
  self.$require("asciidoctor/converter/html5");
21327
21528
  self.$require("asciidoctor/extensions");
21328
21529
  self.$require("asciidoctor/js/asciidoctor_ext");
21329
- 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,.?!\\[\\]<\\)])))"));
21330
21532
  };
21331
21533
 
21332
21534
  /* Generated by Opal 0.11.99.dev */
@@ -21461,13 +21663,13 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
21461
21663
  Opal.const_set($nesting[0], 'FILE_READ_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
21462
21664
  return "r"
21463
21665
  } else {
21464
- return "rb:utf-8:utf-8"
21666
+ return "rb:UTF-8:UTF-8"
21465
21667
  }; return nil; })());
21466
21668
  Opal.const_set($nesting[0], 'URI_READ_MODE', $$($nesting, 'FILE_READ_MODE'));
21467
21669
  Opal.const_set($nesting[0], 'FILE_WRITE_MODE', (function() {if ($truthy($$($nesting, 'RUBY_ENGINE_OPAL'))) {
21468
21670
  return "w"
21469
21671
  } else {
21470
- return "w:utf-8"
21672
+ return "wb:UTF-8"
21471
21673
  }; return nil; })());
21472
21674
  Opal.const_set($nesting[0], 'DEFAULT_DOCTYPE', "article");
21473
21675
  Opal.const_set($nesting[0], 'DEFAULT_BACKEND', "html5");
@@ -21993,7 +22195,7 @@ AbstractBlock.prototype.setTitle = function (title) {
21993
22195
  *
21994
22196
  * If a caption has already been assigned to this block, do nothing.
21995
22197
  *
21996
- * The parts of a complete caption are: <prefix> <number>. <title>
22198
+ * The parts of a complete caption are: `<prefix> <number>. <title>`
21997
22199
  * This partial caption represents the part the precedes the title.
21998
22200
  *
21999
22201
  * @param {string} value - the String caption to assign to this block or nil to use document attribute.
@@ -26771,6 +26973,21 @@ ConverterFactory.register = function (converter, backends) {
26771
26973
  var bridgeComposedMethodToInstance = function (obj, instance) {
26772
26974
  bridgeMethodToInstance(obj, instance, '$composed', 'composed')
26773
26975
  }
26976
+ var bridgeEqEqMethodToInstance = function (obj, instance) {
26977
+ bridgeMethodToInstance(obj, instance, '$==', '==', function (other) {
26978
+ return instance === other
26979
+ })
26980
+ }
26981
+ var bridgeSendMethodToInstance = function (obj, instance) {
26982
+ bridgeMethodToInstance(obj, instance, '$send', 'send', function (symbol) {
26983
+ var args = Array.prototype.slice.call(arguments, 1)
26984
+ var func = instance['$' + symbol]
26985
+ if (func) {
26986
+ return func.apply(instance, args)
26987
+ }
26988
+ throw new Error(`undefined method \`${symbol}\` for \`${instance.toString()}\``)
26989
+ })
26990
+ }
26774
26991
  var bridgeMethodToInstance = function (obj, instance, methodName, functionName, defaultImplementation) {
26775
26992
  if (typeof obj[methodName] === 'undefined') {
26776
26993
  if (typeof obj[functionName] === 'function') {
@@ -26837,6 +27054,8 @@ ConverterFactory.register = function (converter, backends) {
26837
27054
  }
26838
27055
  bridgeHandlesMethodToInstance(converter, converter)
26839
27056
  bridgeComposedMethodToInstance(converter, converter)
27057
+ bridgeEqEqMethodToInstance(converter, converter)
27058
+ bridgeSendMethodToInstance(converter, converter)
26840
27059
  addRespondToMethod(converter)
26841
27060
  object = converter
26842
27061
  }
@@ -26936,7 +27155,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
26936
27155
  }
26937
27156
 
26938
27157
 
26939
- var ASCIIDOCTOR_JS_VERSION = '2.2.5';
27158
+ var ASCIIDOCTOR_JS_VERSION = '2.2.7';
26940
27159
 
26941
27160
  /**
26942
27161
  * Get Asciidoctor.js version number.