@asciidoctor/core 2.0.0-rc.3 → 2.0.3

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.
@@ -21342,54 +21342,66 @@ Opal.modules["asciidoctor/js"] = function(Opal) {
21342
21342
  };
21343
21343
 
21344
21344
  /* Generated by Opal 0.11.99.dev */
21345
- Opal.modules["asciidoctor/core_ext/float/truncate"] = function(Opal) {
21346
- function $rb_gt(lhs, rhs) {
21347
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
21348
- }
21349
- function $rb_divide(lhs, rhs) {
21350
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs);
21351
- }
21352
- function $rb_times(lhs, rhs) {
21353
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs);
21354
- }
21355
- 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;
21345
+ Opal.modules["asciidoctor/core_ext/nil_or_empty"] = function(Opal) {
21346
+ 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, $truthy = Opal.truthy;
21356
21347
 
21357
- Opal.add_stubs(['$==', '$arity', '$instance_method', '$send', '$new', '$length', '$Integer', '$shift', '$>', '$**', '$/', '$to_i', '$*', '$abs']);
21358
- if ($$($nesting, 'Float').$instance_method("truncate").$arity()['$=='](0)) {
21359
- return $$($nesting, 'Float').$send("prepend", $send($$($nesting, 'Module'), 'new', [], ($$1 = function(){var self = $$1.$$s || this, $truncate$2;
21348
+ Opal.add_stubs(['$method_defined?']);
21349
+
21350
+ (function($base, $super, $parent_nesting) {
21351
+ var self = $klass($base, $super, 'NilClass');
21360
21352
 
21361
- return (Opal.def(self, '$truncate', $truncate$2 = function $$truncate($a) {
21362
- var $post_args, args, $iter = $truncate$2.$$p, $yield = $iter || nil, self = this, precision = nil, precision_factor = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
21353
+ var $nesting = [self].concat($parent_nesting);
21363
21354
 
21364
- if ($iter) $truncate$2.$$p = null;
21365
- // Prepare super implicit arguments
21366
- for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) {
21367
- $zuper[$zuper_i] = arguments[$zuper_i];
21368
- }
21369
-
21370
-
21371
- $post_args = Opal.slice.call(arguments, 0, arguments.length);
21372
-
21373
- args = $post_args;;
21374
- if (args.$length()['$=='](1)) {
21375
- if ((precision = self.$Integer(args.$shift()))['$=='](0)) {
21376
- return $send(self, Opal.find_super_dispatcher(self, 'truncate', $truncate$2, false), $zuper, $iter)
21377
- } else if ($truthy($rb_gt(precision, 0))) {
21378
-
21379
- precision_factor = (10)['$**'](precision);
21380
- return $rb_divide($rb_times(self, precision_factor).$to_i(), precision_factor);
21381
- } else {
21382
-
21383
- precision_factor = (10)['$**'](precision.$abs());
21384
- return $rb_times($rb_divide(self, precision_factor).$to_i(), precision_factor);
21385
- }
21386
- } else {
21387
- return $send(self, Opal.find_super_dispatcher(self, 'truncate', $truncate$2, false), $zuper, $iter)
21388
- };
21389
- }, $truncate$2.$$arity = -1), nil) && 'truncate'}, $$1.$$s = self, $$1.$$arity = 0, $$1)))
21390
- } else {
21391
- return nil
21392
- }
21355
+ if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21356
+ return nil
21357
+ } else {
21358
+ return Opal.alias(self, "nil_or_empty?", "nil?")
21359
+ }
21360
+ })($nesting[0], null, $nesting);
21361
+ (function($base, $super, $parent_nesting) {
21362
+ var self = $klass($base, $super, 'String');
21363
+
21364
+ var $nesting = [self].concat($parent_nesting);
21365
+
21366
+ if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21367
+ return nil
21368
+ } else {
21369
+ return Opal.alias(self, "nil_or_empty?", "empty?")
21370
+ }
21371
+ })($nesting[0], null, $nesting);
21372
+ (function($base, $super, $parent_nesting) {
21373
+ var self = $klass($base, $super, 'Array');
21374
+
21375
+ var $nesting = [self].concat($parent_nesting);
21376
+
21377
+ if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21378
+ return nil
21379
+ } else {
21380
+ return Opal.alias(self, "nil_or_empty?", "empty?")
21381
+ }
21382
+ })($nesting[0], null, $nesting);
21383
+ (function($base, $super, $parent_nesting) {
21384
+ var self = $klass($base, $super, 'Hash');
21385
+
21386
+ var $nesting = [self].concat($parent_nesting);
21387
+
21388
+ if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21389
+ return nil
21390
+ } else {
21391
+ return Opal.alias(self, "nil_or_empty?", "empty?")
21392
+ }
21393
+ })($nesting[0], null, $nesting);
21394
+ return (function($base, $super, $parent_nesting) {
21395
+ var self = $klass($base, $super, 'Numeric');
21396
+
21397
+ var $nesting = [self].concat($parent_nesting);
21398
+
21399
+ if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21400
+ return nil
21401
+ } else {
21402
+ return Opal.alias(self, "nil_or_empty?", "nil?")
21403
+ }
21404
+ })($nesting[0], null, $nesting);
21393
21405
  };
21394
21406
 
21395
21407
  /* Generated by Opal 0.11.99.dev */
@@ -21465,102 +21477,19 @@ Opal.modules["asciidoctor/core_ext/match_data/names"] = function(Opal) {
21465
21477
  }
21466
21478
  };
21467
21479
 
21468
- /* Generated by Opal 0.11.99.dev */
21469
- Opal.modules["asciidoctor/core_ext/nil_or_empty"] = function(Opal) {
21470
- 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, $truthy = Opal.truthy;
21471
-
21472
- Opal.add_stubs(['$method_defined?']);
21473
-
21474
- (function($base, $super, $parent_nesting) {
21475
- var self = $klass($base, $super, 'NilClass');
21476
-
21477
- var $nesting = [self].concat($parent_nesting);
21478
-
21479
- if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21480
- return nil
21481
- } else {
21482
- return Opal.alias(self, "nil_or_empty?", "nil?")
21483
- }
21484
- })($nesting[0], null, $nesting);
21485
- (function($base, $super, $parent_nesting) {
21486
- var self = $klass($base, $super, 'String');
21487
-
21488
- var $nesting = [self].concat($parent_nesting);
21489
-
21490
- if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21491
- return nil
21492
- } else {
21493
- return Opal.alias(self, "nil_or_empty?", "empty?")
21494
- }
21495
- })($nesting[0], null, $nesting);
21496
- (function($base, $super, $parent_nesting) {
21497
- var self = $klass($base, $super, 'Array');
21498
-
21499
- var $nesting = [self].concat($parent_nesting);
21500
-
21501
- if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21502
- return nil
21503
- } else {
21504
- return Opal.alias(self, "nil_or_empty?", "empty?")
21505
- }
21506
- })($nesting[0], null, $nesting);
21507
- (function($base, $super, $parent_nesting) {
21508
- var self = $klass($base, $super, 'Hash');
21509
-
21510
- var $nesting = [self].concat($parent_nesting);
21511
-
21512
- if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21513
- return nil
21514
- } else {
21515
- return Opal.alias(self, "nil_or_empty?", "empty?")
21516
- }
21517
- })($nesting[0], null, $nesting);
21518
- return (function($base, $super, $parent_nesting) {
21519
- var self = $klass($base, $super, 'Numeric');
21520
-
21521
- var $nesting = [self].concat($parent_nesting);
21522
-
21523
- if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
21524
- return nil
21525
- } else {
21526
- return Opal.alias(self, "nil_or_empty?", "nil?")
21527
- }
21528
- })($nesting[0], null, $nesting);
21529
- };
21530
-
21531
- /* Generated by Opal 0.11.99.dev */
21532
- Opal.modules["asciidoctor/core_ext/regexp/is_match"] = function(Opal) {
21533
- var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $truthy = Opal.truthy, $klass = Opal.klass;
21534
-
21535
- Opal.add_stubs(['$method_defined?']);
21536
- if ($truthy($$($nesting, 'Regexp')['$method_defined?']("match?"))) {
21537
- return nil
21538
- } else {
21539
- return (function($base, $super, $parent_nesting) {
21540
- var self = $klass($base, $super, 'Regexp');
21541
-
21542
- var $nesting = [self].concat($parent_nesting);
21543
-
21544
- return Opal.alias(self, "match?", "===")
21545
- })($nesting[0], null, $nesting)
21546
- }
21547
- };
21548
-
21549
21480
  /* Generated by Opal 0.11.99.dev */
21550
21481
  Opal.modules["asciidoctor/core_ext"] = function(Opal) {
21551
21482
  var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice;
21552
21483
 
21553
21484
  Opal.add_stubs(['$==']);
21554
21485
 
21555
- self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/float/truncate");
21486
+ self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/nil_or_empty");
21556
21487
  self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/hash/merge");
21557
21488
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
21558
- self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/match_data/names")
21489
+ return self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/match_data/names")
21559
21490
  } else {
21560
- nil
21491
+ return nil
21561
21492
  };
21562
- self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/nil_or_empty");
21563
- return self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/regexp/is_match");
21564
21493
  };
21565
21494
 
21566
21495
  /* Generated by Opal 0.11.99.dev */
@@ -21576,7 +21505,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21576
21505
  }
21577
21506
  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;
21578
21507
 
21579
- Opal.add_stubs(['$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', '$length', '$basename', '$extname', '$directory?', '$dirname', '$mkdir_p', '$mkdir', '$join', '$divmod', '$*', '$+', '$to_i', '$to_s', '$chr', '$ord', '$class_for_name', '$const_get']);
21508
+ 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_i', '$to_s', '$chr', '$ord', '$class_for_name', '$const_get']);
21580
21509
  return (function($base, $parent_nesting) {
21581
21510
  var self = $module($base, 'Asciidoctor');
21582
21511
 
@@ -21585,10 +21514,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21585
21514
  (function($base, $parent_nesting) {
21586
21515
  var self = $module($base, 'Helpers');
21587
21516
 
21588
- var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$7, $Helpers_uriish$ques$10, $Helpers_uri_prefix$11, $Helpers_encode_uri_component$12, $Helpers_encode_uri$13, $Helpers_rootname$14, $Helpers_basename$15, $Helpers_mkdir_p$16, $Helpers_int_to_roman$17, $Helpers_nextval$19, $Helpers_resolve_class$20, $Helpers_class_for_name$21;
21517
+ var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$7, $Helpers_uriish$ques$10, $Helpers_encode_uri_component$11, $Helpers_encode_spaces_in_uri$12, $Helpers_rootname$13, $Helpers_basename$14, $Helpers_extname$ques$15, $Helpers_extname$16, $Helpers_extname$17, $Helpers_mkdir_p$18, $Helpers_int_to_roman$19, $Helpers_nextval$21, $Helpers_resolve_class$22, $Helpers_class_for_name$23;
21589
21518
 
21590
21519
 
21591
- Opal.defs(self, '$require_library', $Helpers_require_library$1 = function $$require_library(name, gem_name, on_failure) {
21520
+ self.$module_function();
21521
+
21522
+ Opal.def(self, '$require_library', $Helpers_require_library$1 = function $$require_library(name, gem_name, on_failure) {
21592
21523
  var self = this, $case = nil, details = nil;
21593
21524
  if ($gvars["!"] == null) $gvars["!"] = nil;
21594
21525
 
@@ -21648,7 +21579,8 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21648
21579
  } else { throw $err; }
21649
21580
  };
21650
21581
  }, $Helpers_require_library$1.$$arity = -2);
21651
- Opal.defs(self, '$prepare_source_array', $Helpers_prepare_source_array$2 = function $$prepare_source_array(data) {
21582
+
21583
+ Opal.def(self, '$prepare_source_array', $Helpers_prepare_source_array$2 = function $$prepare_source_array(data) {
21652
21584
  var $$3, $$4, $$5, $$6, self = this, leading_2_bytes = nil, leading_bytes = nil, first = nil, $writer = nil;
21653
21585
 
21654
21586
 
@@ -21707,7 +21639,8 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21707
21639
  return line.$encode($$($nesting, 'UTF_8')).$rstrip();}, $$6.$$s = self, $$6.$$arity = 1, $$6))
21708
21640
  };
21709
21641
  }, $Helpers_prepare_source_array$2.$$arity = 1);
21710
- Opal.defs(self, '$prepare_source_string', $Helpers_prepare_source_string$7 = function $$prepare_source_string(data) {
21642
+
21643
+ Opal.def(self, '$prepare_source_string', $Helpers_prepare_source_string$7 = function $$prepare_source_string(data) {
21711
21644
  var $$8, self = this, leading_2_bytes = nil, leading_bytes = nil;
21712
21645
 
21713
21646
 
@@ -21742,22 +21675,15 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21742
21675
  };
21743
21676
  return lines['$<<'](line.$rstrip());}, $$9.$$s = self, $$9.$$arity = 1, $$9));}, $$8.$$s = self, $$8.$$arity = 1, $$8));
21744
21677
  }, $Helpers_prepare_source_string$7.$$arity = 1);
21745
- Opal.defs(self, '$uriish?', $Helpers_uriish$ques$10 = function(str) {
21678
+
21679
+ Opal.def(self, '$uriish?', $Helpers_uriish$ques$10 = function(str) {
21746
21680
  var $a, self = this;
21747
21681
 
21748
21682
  return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
21749
21683
  }, $Helpers_uriish$ques$10.$$arity = 1);
21750
- Opal.defs(self, '$uri_prefix', $Helpers_uri_prefix$11 = function $$uri_prefix(str) {
21751
- var $a, self = this;
21752
-
21753
- if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
21754
- return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))
21755
- } else {
21756
- return nil
21757
- }
21758
- }, $Helpers_uri_prefix$11.$$arity = 1);
21759
21684
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
21760
- Opal.defs(self, '$encode_uri_component', $Helpers_encode_uri_component$12 = function $$encode_uri_component(str) {
21685
+
21686
+ Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$11 = function $$encode_uri_component(str) {
21761
21687
  var self = this;
21762
21688
 
21763
21689
 
@@ -21765,11 +21691,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21765
21691
  return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16)
21766
21692
  })
21767
21693
 
21768
- }, $Helpers_encode_uri_component$12.$$arity = 1)
21694
+ }, $Helpers_encode_uri_component$11.$$arity = 1)
21769
21695
  } else {
21770
21696
  nil
21771
21697
  };
21772
- Opal.defs(self, '$encode_uri', $Helpers_encode_uri$13 = function $$encode_uri(str) {
21698
+
21699
+ Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$12 = function $$encode_spaces_in_uri(str) {
21773
21700
  var self = this;
21774
21701
 
21775
21702
  if ($truthy(str['$include?'](" "))) {
@@ -21778,13 +21705,24 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21778
21705
  } else {
21779
21706
  return str
21780
21707
  }
21781
- }, $Helpers_encode_uri$13.$$arity = 1);
21782
- Opal.defs(self, '$rootname', $Helpers_rootname$14 = function $$rootname(filename) {
21783
- var $a, self = this;
21708
+ }, $Helpers_encode_spaces_in_uri$12.$$arity = 1);
21709
+
21710
+ Opal.def(self, '$rootname', $Helpers_rootname$13 = function $$rootname(filename) {
21711
+ var self = this, last_dot_idx = nil;
21784
21712
 
21785
- return filename.$slice(0, ($truthy($a = filename.$rindex(".")) ? $a : filename.$length()))
21786
- }, $Helpers_rootname$14.$$arity = 1);
21787
- Opal.defs(self, '$basename', $Helpers_basename$15 = function $$basename(filename, drop_ext) {
21713
+ if ($truthy((last_dot_idx = filename.$rindex(".")))) {
21714
+ if ($truthy(filename.$index("/", last_dot_idx))) {
21715
+ return filename
21716
+ } else {
21717
+
21718
+ return filename.$slice(0, last_dot_idx);
21719
+ }
21720
+ } else {
21721
+ return filename
21722
+ }
21723
+ }, $Helpers_rootname$13.$$arity = 1);
21724
+
21725
+ Opal.def(self, '$basename', $Helpers_basename$14 = function $$basename(filename, drop_ext) {
21788
21726
  var self = this;
21789
21727
 
21790
21728
 
@@ -21795,15 +21733,65 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21795
21733
  if ($truthy(drop_ext)) {
21796
21734
  return $$$('::', 'File').$basename(filename, (function() {if (drop_ext['$=='](true)) {
21797
21735
 
21798
- return $$$('::', 'File').$extname(filename);
21736
+ return self.$extname(filename);
21799
21737
  } else {
21800
21738
  return drop_ext
21801
21739
  }; return nil; })())
21802
21740
  } else {
21803
21741
  return $$$('::', 'File').$basename(filename)
21804
21742
  };
21805
- }, $Helpers_basename$15.$$arity = -2);
21806
- Opal.defs(self, '$mkdir_p', $Helpers_mkdir_p$16 = function $$mkdir_p(dir) {
21743
+ }, $Helpers_basename$14.$$arity = -2);
21744
+
21745
+ Opal.def(self, '$extname?', $Helpers_extname$ques$15 = function(path) {
21746
+ var $a, self = this, last_dot_idx = nil;
21747
+
21748
+ return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a)
21749
+ }, $Helpers_extname$ques$15.$$arity = 1);
21750
+ if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) {
21751
+
21752
+ Opal.def(self, '$extname', $Helpers_extname$16 = function $$extname(path, fallback) {
21753
+ var $a, self = this, last_dot_idx = nil;
21754
+
21755
+
21756
+
21757
+ if (fallback == null) {
21758
+ fallback = "";
21759
+ };
21760
+ if ($truthy((last_dot_idx = path.$rindex(".")))) {
21761
+ if ($truthy(($truthy($a = path.$index("/", last_dot_idx)) ? $a : path.$index($$$($$$('::', 'File'), 'ALT_SEPARATOR'), last_dot_idx)))) {
21762
+ return fallback
21763
+ } else {
21764
+
21765
+ return path.$slice(last_dot_idx, path.$length());
21766
+ }
21767
+ } else {
21768
+ return fallback
21769
+ };
21770
+ }, $Helpers_extname$16.$$arity = -2)
21771
+ } else {
21772
+
21773
+ Opal.def(self, '$extname', $Helpers_extname$17 = function $$extname(path, fallback) {
21774
+ var self = this, last_dot_idx = nil;
21775
+
21776
+
21777
+
21778
+ if (fallback == null) {
21779
+ fallback = "";
21780
+ };
21781
+ if ($truthy((last_dot_idx = path.$rindex(".")))) {
21782
+ if ($truthy(path.$index("/", last_dot_idx))) {
21783
+ return fallback
21784
+ } else {
21785
+
21786
+ return path.$slice(last_dot_idx, path.$length());
21787
+ }
21788
+ } else {
21789
+ return fallback
21790
+ };
21791
+ }, $Helpers_extname$17.$$arity = -2)
21792
+ };
21793
+
21794
+ Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$18 = function $$mkdir_p(dir) {
21807
21795
  var self = this, parent_dir = nil;
21808
21796
 
21809
21797
  if ($truthy($$$('::', 'File')['$directory?'](dir))) {
@@ -21829,12 +21817,14 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21829
21817
  } else { throw $err; }
21830
21818
  };;
21831
21819
  }
21832
- }, $Helpers_mkdir_p$16.$$arity = 1);
21820
+ }, $Helpers_mkdir_p$18.$$arity = 1);
21833
21821
  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}));
21834
- Opal.defs(self, '$int_to_roman', $Helpers_int_to_roman$17 = function $$int_to_roman(val) {
21835
- var $$18, self = this;
21822
+ self.$private_constant("ROMAN_NUMERALS");
21823
+
21824
+ Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$19 = function $$int_to_roman(val) {
21825
+ var $$20, self = this;
21836
21826
 
21837
- return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$18 = function(l, i){var self = $$18.$$s || this, $a, $b, repeat = nil;
21827
+ return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$20 = function(l, i){var self = $$20.$$s || this, $a, $b, repeat = nil;
21838
21828
 
21839
21829
 
21840
21830
 
@@ -21846,9 +21836,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21846
21836
  i = nil;
21847
21837
  };
21848
21838
  $b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b;
21849
- return $rb_times(l, repeat);}, $$18.$$s = self, $$18.$$arity = 2, $$18)).$join()
21850
- }, $Helpers_int_to_roman$17.$$arity = 1);
21851
- Opal.defs(self, '$nextval', $Helpers_nextval$19 = function $$nextval(current) {
21839
+ return $rb_times(l, repeat);}, $$20.$$s = self, $$20.$$arity = 2, $$20)).$join()
21840
+ }, $Helpers_int_to_roman$19.$$arity = 1);
21841
+
21842
+ Opal.def(self, '$nextval', $Helpers_nextval$21 = function $$nextval(current) {
21852
21843
  var self = this, intval = nil;
21853
21844
 
21854
21845
  if ($truthy($$$('::', 'Integer')['$==='](current))) {
@@ -21862,8 +21853,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21862
21853
  return $rb_plus(intval, 1)
21863
21854
  };
21864
21855
  }
21865
- }, $Helpers_nextval$19.$$arity = 1);
21866
- Opal.defs(self, '$resolve_class', $Helpers_resolve_class$20 = function $$resolve_class(object) {
21856
+ }, $Helpers_nextval$21.$$arity = 1);
21857
+
21858
+ Opal.def(self, '$resolve_class', $Helpers_resolve_class$22 = function $$resolve_class(object) {
21867
21859
  var self = this;
21868
21860
 
21869
21861
  if ($truthy($$$('::', 'Class')['$==='](object))) {
@@ -21877,8 +21869,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21877
21869
  return nil
21878
21870
  };
21879
21871
  }
21880
- }, $Helpers_resolve_class$20.$$arity = 1);
21881
- Opal.defs(self, '$class_for_name', $Helpers_class_for_name$21 = function $$class_for_name(qualified_name) {
21872
+ }, $Helpers_resolve_class$22.$$arity = 1);
21873
+
21874
+ Opal.def(self, '$class_for_name', $Helpers_class_for_name$23 = function $$class_for_name(qualified_name) {
21882
21875
  var self = this, resolved = nil;
21883
21876
 
21884
21877
  try {
@@ -21895,7 +21888,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
21895
21888
  } finally { Opal.pop_exception() }
21896
21889
  } else { throw $err; }
21897
21890
  }
21898
- }, $Helpers_class_for_name$21.$$arity = 1);
21891
+ }, $Helpers_class_for_name$23.$$arity = 1);
21899
21892
  })($nesting[0], $nesting)
21900
21893
  })($nesting[0], $nesting)
21901
21894
  };
@@ -22452,6 +22445,148 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
22452
22445
  })($nesting[0], $nesting);
22453
22446
  };
22454
22447
 
22448
+ /* Generated by Opal 0.11.99.dev */
22449
+ Opal.modules["asciidoctor/rx"] = function(Opal) {
22450
+ function $rb_minus(lhs, rhs) {
22451
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
22452
+ }
22453
+ 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, $send = Opal.send, $truthy = Opal.truthy, $hash = Opal.hash;
22454
+
22455
+ Opal.add_stubs(['$==', '$join', '$to_a', '$new', '$empty?', '$escape', '$[]=', '$-']);
22456
+ return (function($base, $parent_nesting) {
22457
+ var self = $module($base, 'Asciidoctor');
22458
+
22459
+ var $nesting = [self].concat($parent_nesting), $Asciidoctor$1, $Asciidoctor$2;
22460
+
22461
+
22462
+ (function($base, $parent_nesting) {
22463
+ var self = $module($base, 'Rx');
22464
+
22465
+ var $nesting = [self].concat($parent_nesting);
22466
+
22467
+ nil
22468
+ })($nesting[0], $nesting);
22469
+ Opal.const_set($nesting[0], 'AuthorInfoLineRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*)(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +<([^>]+)>)?$"));
22470
+ Opal.const_set($nesting[0], 'AuthorDelimiterRx', /;(?: |$)/);
22471
+ Opal.const_set($nesting[0], 'RevisionInfoLineRx', new RegExp("" + "^(?:[^\\d{]*(" + ($$($nesting, 'CC_ANY')) + "*?),)? *(?!:)(" + ($$($nesting, 'CC_ANY')) + "*?)(?: *(?!^),?: *(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
22472
+ Opal.const_set($nesting[0], 'ManpageTitleVolnumRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *\\( *(" + ($$($nesting, 'CC_ANY')) + "+?) *\\)$"));
22473
+ Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
22474
+ Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22475
+ Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
22476
+ Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22477
+ Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
22478
+ Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
22479
+ Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]"));
22480
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
22481
+ Opal.const_set($nesting[0], 'AttributeEntryPassMacroRx', new RegExp("" + "^pass:([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*)\\]$"))
22482
+ } else {
22483
+ nil
22484
+ };
22485
+ Opal.const_set($nesting[0], 'AttributeReferenceRx', new RegExp("" + "(\\\\)?\\{(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*|(set|counter2?):" + ($$($nesting, 'CC_ANY')) + "+?)(\\\\)?\\}"));
22486
+ Opal.const_set($nesting[0], 'BlockAnchorRx', new RegExp("" + "^\\[\\[(?:|([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?)\\]\\]$"));
22487
+ Opal.const_set($nesting[0], 'BlockAttributeListRx', new RegExp("" + "^\\[(|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*)\\]$"));
22488
+ Opal.const_set($nesting[0], 'BlockAttributeLineRx', new RegExp("" + "^\\[(?:|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*|\\[(?:|[" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*(?:, *" + ($$($nesting, 'CC_ANY')) + "+)?)\\])\\]$"));
22489
+ Opal.const_set($nesting[0], 'BlockTitleRx', new RegExp("" + "^\\.(\\.?[^ \\t.]" + ($$($nesting, 'CC_ANY')) + "*)$"));
22490
+ Opal.const_set($nesting[0], 'AdmonitionParagraphRx', new RegExp("" + "^(" + ($$($nesting, 'ADMONITION_STYLES').$to_a().$join("|")) + "):[ \\t]+"));
22491
+ Opal.const_set($nesting[0], 'LiteralParagraphRx', new RegExp("" + "^([ \\t]+" + ($$($nesting, 'CC_ANY')) + "*)$"));
22492
+ Opal.const_set($nesting[0], 'AtxSectionTitleRx', new RegExp("" + "^(=={0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
22493
+ Opal.const_set($nesting[0], 'ExtAtxSectionTitleRx', new RegExp("" + "^(=={0,5}|#\\\#{0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
22494
+ Opal.const_set($nesting[0], 'SetextSectionTitleRx', new RegExp("" + "^((?!\\.)" + ($$($nesting, 'CC_ANY')) + "*?" + ($$($nesting, 'CG_ALNUM')) + ($$($nesting, 'CC_ANY')) + "*)$"));
22495
+ Opal.const_set($nesting[0], 'InlineSectionAnchorRx', new RegExp("" + " (\\\\)?\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?\\]\\]$"));
22496
+ Opal.const_set($nesting[0], 'InvalidSectionIdCharsRx', new RegExp("" + "<[^>]+>|&(?:[a-z][a-z]+\\d{0,2}|#\\d\\d\\d{0,4}|#x[\\da-f][\\da-f][\\da-f]{0,3});|[^ " + ($$($nesting, 'CC_WORD')) + "\\-.]+?"));
22497
+ Opal.const_set($nesting[0], 'SectionLevelStyleRx', /^sect\d$/);
22498
+ Opal.const_set($nesting[0], 'AnyListRx', new RegExp("" + "^(?:[ \\t]*(?:-|\\*\\**|\\.\\.*|\\u2022|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]|(?!//[^/])[ \\t]*[^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?(?::::{0,2}|;;)(?:$|[ \\t])|<?\\d+>[ \\t])"));
22499
+ Opal.const_set($nesting[0], 'UnorderedListRx', new RegExp("" + "^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
22500
+ Opal.const_set($nesting[0], 'OrderedListRx', new RegExp("" + "^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
22501
+ Opal.const_set($nesting[0], 'OrderedListMarkerRxMap', $hash2(["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"], {"arabic": /\d+\./, "loweralpha": /[a-z]\./, "lowerroman": /[ivx]+\)/, "upperalpha": /[A-Z]\./, "upperroman": /[IVX]+\)/}));
22502
+ Opal.const_set($nesting[0], 'DescriptionListRx', new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(:::{0,2}|;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"));
22503
+ Opal.const_set($nesting[0], 'DescriptionListSiblingRx', $hash2(["::", ":::", "::::", ";;"], {"::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ":::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(:::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), "::::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ";;": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)")}));
22504
+ Opal.const_set($nesting[0], 'CalloutListRx', new RegExp("" + "^<(\\d+|\\.)>[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
22505
+ Opal.const_set($nesting[0], 'CalloutExtractRx', /((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/);
22506
+ Opal.const_set($nesting[0], 'CalloutExtractRxt', "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)");
22507
+ Opal.const_set($nesting[0], 'CalloutExtractRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$1 = function(h, k){var self = $Asciidoctor$1.$$s || this, $writer = nil;
22508
+
22509
+
22510
+
22511
+ if (h == null) {
22512
+ h = nil;
22513
+ };
22514
+
22515
+ if (k == null) {
22516
+ k = nil;
22517
+ };
22518
+ $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
22519
+ return ""
22520
+ } else {
22521
+ return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
22522
+ }; return nil; })()) + ")?" + ($$($nesting, 'CalloutExtractRxt')))];
22523
+ $send(h, '[]=', Opal.to_a($writer));
22524
+ return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$1.$$s = self, $Asciidoctor$1.$$arity = 2, $Asciidoctor$1)));
22525
+ Opal.const_set($nesting[0], 'CalloutScanRx', new RegExp("" + "\\\\?<!?(|--)(\\d+|\\.)\\1>(?=(?: ?\\\\?<!?\\1(?:\\d+|\\.)\\1>)*" + ($$($nesting, 'CC_EOL')) + ")"));
22526
+ Opal.const_set($nesting[0], 'CalloutSourceRx', new RegExp("" + "((?://|#|--|;;) ?)?(\\\\)?&lt;!?(|--)(\\d+|\\.)\\3&gt;(?=(?: ?\\\\?&lt;!?\\3(?:\\d+|\\.)\\3&gt;)*" + ($$($nesting, 'CC_EOL')) + ")"));
22527
+ Opal.const_set($nesting[0], 'CalloutSourceRxt', "" + "(\\\\)?&lt;()(\\d+|\\.)&gt;(?=(?: ?\\\\?&lt;(?:\\d+|\\.)&gt;)*" + ($$($nesting, 'CC_EOL')) + ")");
22528
+ Opal.const_set($nesting[0], 'CalloutSourceRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$2 = function(h, k){var self = $Asciidoctor$2.$$s || this, $writer = nil;
22529
+
22530
+
22531
+
22532
+ if (h == null) {
22533
+ h = nil;
22534
+ };
22535
+
22536
+ if (k == null) {
22537
+ k = nil;
22538
+ };
22539
+ $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
22540
+ return ""
22541
+ } else {
22542
+ return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
22543
+ }; return nil; })()) + ")?" + ($$($nesting, 'CalloutSourceRxt')))];
22544
+ $send(h, '[]=', Opal.to_a($writer));
22545
+ return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$2.$$s = self, $Asciidoctor$2.$$arity = 2, $Asciidoctor$2)));
22546
+ Opal.const_set($nesting[0], 'ListRxMap', $hash2(["ulist", "olist", "dlist", "colist"], {"ulist": $$($nesting, 'UnorderedListRx'), "olist": $$($nesting, 'OrderedListRx'), "dlist": $$($nesting, 'DescriptionListRx'), "colist": $$($nesting, 'CalloutListRx')}));
22547
+ Opal.const_set($nesting[0], 'ColumnSpecRx', /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/);
22548
+ Opal.const_set($nesting[0], 'CellSpecStartRx', /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
22549
+ Opal.const_set($nesting[0], 'CellSpecEndRx', /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
22550
+ Opal.const_set($nesting[0], 'CustomBlockMacroRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*)::(|\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22551
+ Opal.const_set($nesting[0], 'BlockMediaMacroRx', new RegExp("" + "^(image|video|audio)::(\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22552
+ Opal.const_set($nesting[0], 'BlockTocMacroRx', new RegExp("" + "^toc::\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
22553
+ Opal.const_set($nesting[0], 'InlineAnchorRx', new RegExp("" + "(\\\\)?(?:\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]))"));
22554
+ Opal.const_set($nesting[0], 'InlineAnchorScanRx', new RegExp("" + "(?:^|[^\\\\\\[])\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|(?:^|[^\\\\])anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\])"));
22555
+ Opal.const_set($nesting[0], 'LeadingInlineAnchorRx', new RegExp("" + "^\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]"));
22556
+ Opal.const_set($nesting[0], 'InlineBiblioAnchorRx', new RegExp("" + "^\\[\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]\\]"));
22557
+ Opal.const_set($nesting[0], 'InlineEmailRx', new RegExp("" + "([\\\\>:/])?" + ($$($nesting, 'CG_WORD')) + "(?:&amp;|[" + ($$($nesting, 'CC_WORD')) + "\\-.%+])*@" + ($$($nesting, 'CG_ALNUM')) + "[" + ($$($nesting, 'CC_ALNUM')) + "_\\-.]*\\.[a-zA-Z]{2,5}\\b"));
22558
+ Opal.const_set($nesting[0], 'InlineFootnoteMacroRx', new RegExp("" + "\\\\?footnote(?:(ref):|:([" + ($$($nesting, 'CC_WORD')) + "-]+)?)\\[(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
22559
+ Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22560
+ Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
22561
+ Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22562
+ Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
22563
+ Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22564
+ Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
22565
+ Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
22566
+ Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))?\\]", 'm'));
22567
+ Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""));
22568
+ 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')]));
22569
+ Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
22570
+ Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
22571
+ 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'));
22572
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
22573
+ Opal.const_set($nesting[0], 'HardLineBreakRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "*) \\+$", 'm'))
22574
+ } else {
22575
+ nil
22576
+ };
22577
+ Opal.const_set($nesting[0], 'MarkdownThematicBreakRx', /^ {0,3}([-*_])( *)\1\2\1$/);
22578
+ Opal.const_set($nesting[0], 'ExtLayoutBreakRx', /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/);
22579
+ Opal.const_set($nesting[0], 'BlankLineRx', /\n{2,}/);
22580
+ Opal.const_set($nesting[0], 'EscapedSpaceRx', /\\([ \t\n])/);
22581
+ Opal.const_set($nesting[0], 'ReplaceableTextRx', /[&']|--|\.\.\.|\([CRT]M?\)/);
22582
+ Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
22583
+ Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
22584
+ Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
22585
+ Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
22586
+ Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
22587
+ })($nesting[0], $nesting)
22588
+ };
22589
+
22455
22590
  /* Generated by Opal 0.11.99.dev */
22456
22591
  Opal.modules["asciidoctor/substitutors"] = function(Opal) {
22457
22592
  function $rb_plus(lhs, rhs) {
@@ -22471,7 +22606,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
22471
22606
  }
22472
22607
  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;
22473
22608
 
22474
- 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', '$text', '$expand_subs', '$text=', '$convert', '$class', '$strip', '$>', '$index', '$min', '$compact', '$end_with?', '$map', '$chop', '$new', '$pop', '$rstrip', '$register', '$tr', '$basename', '$parse', '$<<', '$lstrip', '$split_simple_csv', '$partition', '$sub', '$encode_uri_component', '$style', '$parse_into', '$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', '$concat', '$uniq', '$sort', '$*', '$parse_quoted_text_attributes', '$resolve_pass_subs', '$extract_inner_passthrough', '$basebackend?', '$error', '$chr', '$drop', '$&', '$resolve_subs', '$resolve_block_subs', '$private', '$=~', '$shorthand_property_syntax', '$each_char']);
22609
+ 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', '$text', '$expand_subs', '$text=', '$convert', '$class', '$strip', '$>', '$index', '$min', '$compact', '$end_with?', '$map', '$chop', '$new', '$pop', '$rstrip', '$register', '$tr', '$basename', '$parse', '$<<', '$lstrip', '$split_simple_csv', '$partition', '$sub', '$encode_uri_component', '$style', '$parse_into', '$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', '$concat', '$uniq', '$sort', '$*', '$parse_quoted_text_attributes', '$resolve_pass_subs', '$extract_inner_passthrough', '$basebackend?', '$error', '$chr', '$drop', '$&', '$resolve_subs', '$resolve_block_subs', '$private', '$=~', '$shorthand_property_syntax', '$each_char']);
22475
22610
  return (function($base, $parent_nesting) {
22476
22611
  var self = $module($base, 'Asciidoctor');
22477
22612
 
@@ -22964,7 +23099,12 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
22964
23099
  attrs = self.$parse_attributes((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), posattrs, $hash2(["unescape_input"], {"unescape_input": true}));
22965
23100
  if (type['$==']("icon")) {
22966
23101
  } else {
22967
- doc.$register("images", [target, (($writer = ["imagesdir", doc_attrs['$[]']("imagesdir")]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])])
23102
+
23103
+ doc.$register("images", target);
23104
+
23105
+ $writer = ["imagesdir", doc_attrs['$[]']("imagesdir")];
23106
+ $send(attrs, '[]=', Opal.to_a($writer));
23107
+ $writer[$rb_minus($writer["length"], 1)];;
22968
23108
  };
22969
23109
  ($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)]));
22970
23110
  return $$($nesting, 'Inline').$new(self, "image", nil, $hash2(["type", "target", "attributes"], {"type": type, "target": target, "attributes": attrs})).$convert();}, $$29.$$s = self, $$29.$$arity = 0, $$29))};
@@ -23305,7 +23445,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23305
23445
  };
23306
23446
  return $$($nesting, 'Inline').$new(self, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id})).$convert();}, $$37.$$s = self, $$37.$$arity = 0, $$37))};
23307
23447
  if ($truthy(($truthy($a = ($truthy($b = text['$include?']("&")) ? text['$include?'](";&l") : $b)) ? $a : ($truthy($b = found_macroish) ? text['$include?']("xref:") : $b)))) {
23308
- text = $send(text, 'gsub', [$$($nesting, 'InlineXrefMacroRx')], ($$38 = function(){var self = $$38.$$s || this, $c, $d, attrs = nil, refid = nil, macro = nil, fragment = nil, hash_idx = nil, fragment_len = nil, path = nil, src2src = nil, last_dot_idx = nil, target = nil, $writer = nil;
23448
+ text = $send(text, 'gsub', [$$($nesting, 'InlineXrefMacroRx')], ($$38 = function(){var self = $$38.$$s || this, $c, $d, attrs = nil, refid = nil, macro = nil, fragment = nil, hash_idx = nil, fragment_len = nil, path = nil, src2src = nil, target = nil, $writer = nil;
23309
23449
 
23310
23450
 
23311
23451
  if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) {
@@ -23339,20 +23479,24 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23339
23479
  };
23340
23480
  if ($truthy(macro)) {
23341
23481
  if ($truthy(path['$end_with?'](".adoc"))) {
23342
- src2src = (path = path.$slice(0, $rb_minus(path.$length(), 5)))}
23343
- } else if ($truthy(($truthy($c = (last_dot_idx = path.$rindex("."))) ? $$($nesting, 'ASCIIDOC_EXTENSIONS')['$[]'](path.$slice(last_dot_idx, path.$length())) : $c))) {
23344
- src2src = (path = path.$slice(0, last_dot_idx))
23482
+ src2src = (path = path.$slice(0, $rb_minus(path.$length(), 5)))
23483
+ } else if ($truthy($$($nesting, 'Helpers')['$extname?'](path)['$!']())) {
23484
+ src2src = path}
23485
+ } else if ($truthy($send(path, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys())))) {
23486
+ src2src = (path = path.$slice(0, path.$rindex(".")))
23345
23487
  } else {
23346
23488
  src2src = path
23347
23489
  };
23348
23490
  } else {
23349
23491
  $c = [refid, refid.$slice(1, refid.$length())], (target = $c[0]), (fragment = $c[1]), $c
23350
23492
  }
23351
- } else if ($truthy(($truthy($c = macro) ? refid['$include?'](".") : $c))) {
23493
+ } else if ($truthy(macro)) {
23352
23494
  if ($truthy(refid['$end_with?'](".adoc"))) {
23353
23495
  src2src = (path = refid.$slice(0, $rb_minus(refid.$length(), 5)))
23354
- } else {
23496
+ } else if ($truthy($$($nesting, 'Helpers')['$extname?'](refid))) {
23355
23497
  path = refid
23498
+ } else {
23499
+ fragment = refid
23356
23500
  }
23357
23501
  } else {
23358
23502
  fragment = refid
@@ -23393,7 +23537,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
23393
23537
  self.$logger().$info("" + "possible invalid reference: " + (refid))};
23394
23538
  } else if ($truthy(doc.$catalog()['$[]']("refs")['$[]'](fragment))) {
23395
23539
  $c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c
23396
- } else if ($truthy(($truthy($c = (refid = doc.$resolve_id(fragment))) ? ($truthy($d = fragment['$include?'](" ")) ? $d : fragment.$downcase()['$!='](fragment)) : $c))) {
23540
+ } else if ($truthy(($truthy($c = ($truthy($d = fragment['$include?'](" ")) ? $d : fragment.$downcase()['$!='](fragment))) ? (refid = doc.$resolve_id(fragment)) : $c))) {
23397
23541
  $c = [refid, "" + "#" + (refid)], (fragment = $c[0]), (target = $c[1]), $c
23398
23542
  } else {
23399
23543
 
@@ -24329,7 +24473,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
24329
24473
 
24330
24474
  var $nesting = [self].concat($parent_nesting);
24331
24475
 
24332
- Opal.const_set($nesting[0], 'VERSION', "2.0.4")
24476
+ Opal.const_set($nesting[0], 'VERSION', "2.0.9")
24333
24477
  })($nesting[0], $nesting)
24334
24478
  };
24335
24479
 
@@ -24343,7 +24487,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24343
24487
  }
24344
24488
  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;
24345
24489
 
24346
- 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?', '$empty?', '$join', '$apply_reftext_subs', '$attr?', '$extname', '$attr', '$image_uri', '$<', '$safe', '$uriish?', '$encode_uri', '$normalize_web_path', '$generate_data_uri_from_uri', '$generate_data_uri', '$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']);
24490
+ 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?', '$empty?', '$join', '$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']);
24347
24491
  return (function($base, $parent_nesting) {
24348
24492
  var self = $module($base, 'Asciidoctor');
24349
24493
 
@@ -24352,7 +24496,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24352
24496
  (function($base, $super, $parent_nesting) {
24353
24497
  var self = $klass($base, $super, 'AbstractNode');
24354
24498
 
24355
- var $nesting = [self].concat($parent_nesting), $AbstractNode_initialize$1, $AbstractNode_block$ques$2, $AbstractNode_inline$ques$3, $AbstractNode_converter$4, $AbstractNode_parent$eq$5, $AbstractNode_attr$6, $AbstractNode_attr$ques$7, $AbstractNode_set_attr$8, $AbstractNode_remove_attr$9, $AbstractNode_option$ques$10, $AbstractNode_set_option$11, $AbstractNode_options$12, $AbstractNode_update_attributes$15, $AbstractNode_role$16, $AbstractNode_roles$17, $AbstractNode_role$ques$18, $AbstractNode_has_role$ques$19, $AbstractNode_add_role$20, $AbstractNode_remove_role$21, $AbstractNode_reftext$22, $AbstractNode_reftext$ques$23, $AbstractNode_icon_uri$24, $AbstractNode_image_uri$25, $AbstractNode_media_uri$26, $AbstractNode_generate_data_uri$27, $AbstractNode_generate_data_uri_from_uri$28, $AbstractNode_normalize_asset_path$30, $AbstractNode_normalize_system_path$31, $AbstractNode_normalize_web_path$32, $AbstractNode_read_asset$33, $AbstractNode_read_contents$34, $AbstractNode_is_uri$ques$37;
24499
+ var $nesting = [self].concat($parent_nesting), $AbstractNode_initialize$1, $AbstractNode_block$ques$2, $AbstractNode_inline$ques$3, $AbstractNode_converter$4, $AbstractNode_parent$eq$5, $AbstractNode_attr$6, $AbstractNode_attr$ques$7, $AbstractNode_set_attr$8, $AbstractNode_remove_attr$9, $AbstractNode_option$ques$10, $AbstractNode_set_option$11, $AbstractNode_enabled_options$12, $AbstractNode_update_attributes$15, $AbstractNode_role$16, $AbstractNode_roles$17, $AbstractNode_role$ques$18, $AbstractNode_has_role$ques$19, $AbstractNode_add_role$20, $AbstractNode_remove_role$21, $AbstractNode_reftext$22, $AbstractNode_reftext$ques$23, $AbstractNode_icon_uri$24, $AbstractNode_image_uri$25, $AbstractNode_media_uri$26, $AbstractNode_generate_data_uri$27, $AbstractNode_generate_data_uri_from_uri$28, $AbstractNode_normalize_asset_path$30, $AbstractNode_normalize_system_path$31, $AbstractNode_normalize_web_path$32, $AbstractNode_read_asset$33, $AbstractNode_read_contents$34, $AbstractNode_is_uri$ques$37;
24356
24500
 
24357
24501
  self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil;
24358
24502
 
@@ -24515,7 +24659,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24515
24659
  return nil;
24516
24660
  }, $AbstractNode_set_option$11.$$arity = 1);
24517
24661
 
24518
- Opal.def(self, '$options', $AbstractNode_options$12 = function $$options() {
24662
+ Opal.def(self, '$enabled_options', $AbstractNode_enabled_options$12 = function $$enabled_options() {
24519
24663
  var $$13, self = this;
24520
24664
 
24521
24665
  return $send($$$('::', 'Set').$new(), 'tap', [], ($$13 = function(accum){var self = $$13.$$s || this, $$14;
@@ -24538,7 +24682,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24538
24682
  } else {
24539
24683
  return nil
24540
24684
  };}, $$14.$$s = self, $$14.$$arity = 1, $$14));}, $$13.$$s = self, $$13.$$arity = 1, $$13))
24541
- }, $AbstractNode_options$12.$$arity = 0);
24685
+ }, $AbstractNode_enabled_options$12.$$arity = 0);
24542
24686
 
24543
24687
  Opal.def(self, '$update_attributes', $AbstractNode_update_attributes$15 = function $$update_attributes(new_attributes) {
24544
24688
  var self = this;
@@ -24654,8 +24798,12 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24654
24798
 
24655
24799
 
24656
24800
  if ($truthy(self['$attr?']("icon"))) {
24657
- if ($truthy($$$('::', 'File').$extname((icon = self.$attr("icon")))['$empty?']())) {
24658
- icon = "" + (icon) + "." + (self.document.$attr("icontype", "png"))}
24801
+
24802
+ icon = self.$attr("icon");
24803
+ if ($truthy($$($nesting, 'Helpers')['$extname?'](icon))) {
24804
+ } else {
24805
+ icon = "" + (icon) + "." + (self.document.$attr("icontype", "png"))
24806
+ };
24659
24807
  } else {
24660
24808
  icon = "" + (name) + "." + (self.document.$attr("icontype", "png"))
24661
24809
  };
@@ -24671,9 +24819,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24671
24819
  asset_dir_key = "imagesdir";
24672
24820
  };
24673
24821
  if ($truthy(($truthy($a = $rb_lt((doc = self.document).$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE'))) ? doc['$attr?']("data-uri") : $a))) {
24674
- if ($truthy(($truthy($a = ($truthy($b = $$($nesting, 'Helpers')['$uriish?'](target_image)) ? (target_image = $$($nesting, 'Helpers').$encode_uri(target_image)) : $b)) ? $a : ($truthy($b = ($truthy($c = ($truthy($d = asset_dir_key) ? (images_base = doc.$attr(asset_dir_key)) : $d)) ? $$($nesting, 'Helpers')['$uriish?'](images_base) : $c)) ? (target_image = self.$normalize_web_path(target_image, images_base, false)) : $b)))) {
24822
+ if ($truthy(($truthy($a = ($truthy($b = $$($nesting, 'Helpers')['$uriish?'](target_image)) ? (target_image = $$($nesting, 'Helpers').$encode_spaces_in_uri(target_image)) : $b)) ? $a : ($truthy($b = ($truthy($c = ($truthy($d = asset_dir_key) ? (images_base = doc.$attr(asset_dir_key)) : $d)) ? $$($nesting, 'Helpers')['$uriish?'](images_base) : $c)) ? (target_image = self.$normalize_web_path(target_image, images_base, false)) : $b)))) {
24675
24823
  if ($truthy(doc['$attr?']("allow-uri-read"))) {
24676
- return self.$generate_data_uri_from_uri(target_image, doc['$attr?']("cache-uri"))
24824
+
24825
+ return self.$generate_data_uri_from_uri(target_image, doc['$attr?']("cache-uri"));
24677
24826
  } else {
24678
24827
  return target_image
24679
24828
  }
@@ -24713,12 +24862,15 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24713
24862
  if (asset_dir_key == null) {
24714
24863
  asset_dir_key = nil;
24715
24864
  };
24716
- ext = $$$('::', 'File').$extname(target_image);
24717
- mimetype = (function() {if (ext['$=='](".svg")) {
24718
- return "image/svg+xml"
24865
+ if ($truthy((ext = $$($nesting, 'Helpers').$extname(target_image, nil)))) {
24866
+ mimetype = (function() {if (ext['$=='](".svg")) {
24867
+ return "image/svg+xml"
24868
+ } else {
24869
+ return "" + "image/" + (ext.$slice(1, ext.$length()))
24870
+ }; return nil; })()
24719
24871
  } else {
24720
- return "" + "image/" + (ext.$slice(1, ext.$length()))
24721
- }; return nil; })();
24872
+ mimetype = "application/octet-stream"
24873
+ };
24722
24874
  if ($truthy(asset_dir_key)) {
24723
24875
  image_path = self.$normalize_system_path(target_image, self.document.$attr(asset_dir_key), nil, $hash2(["target_name"], {"target_name": "image"}))
24724
24876
  } else {
@@ -24835,7 +24987,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
24835
24987
  preserve_uri_target = true;
24836
24988
  };
24837
24989
  if ($truthy(($truthy($a = preserve_uri_target) ? $$($nesting, 'Helpers')['$uriish?'](target) : $a))) {
24838
- return $$($nesting, 'Helpers').$encode_uri(target)
24990
+ return $$($nesting, 'Helpers').$encode_spaces_in_uri(target)
24839
24991
  } else {
24840
24992
  return self.document.$path_resolver().$web_path(target, start)
24841
24993
  };
@@ -24949,7 +25101,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
24949
25101
  }
24950
25102
  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;
24951
25103
 
24952
- 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', '$!', '$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']);
25104
+ 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', '$!', '$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']);
24953
25105
  return (function($base, $parent_nesting) {
24954
25106
  var self = $module($base, 'Asciidoctor');
24955
25107
 
@@ -24972,7 +25124,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
24972
25124
  self.$attr_reader("subs");
24973
25125
 
24974
25126
  Opal.def(self, '$initialize', $AbstractBlock_initialize$1 = function $$initialize(parent, context, opts) {
24975
- var $iter = $AbstractBlock_initialize$1.$$p, $yield = $iter || nil, self = this, $case = nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
25127
+ var $a, $iter = $AbstractBlock_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
24976
25128
 
24977
25129
  if ($iter) $AbstractBlock_initialize$1.$$p = null;
24978
25130
  // Prepare super implicit arguments
@@ -24989,15 +25141,15 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
24989
25141
  self.blocks = [];
24990
25142
  self.subs = [];
24991
25143
  self.id = (self.title = (self.caption = (self.numeral = (self.style = (self.default_subs = (self.source_location = nil))))));
24992
- return (function() {$case = context;
24993
- if ("document"['$===']($case) || "section"['$===']($case)) {
24994
- self.level = (self.next_section_index = 0);
24995
- return (self.next_section_ordinal = 1);}
24996
- else {return (self.level = (function() {if ($truthy($$($nesting, 'AbstractBlock')['$==='](parent))) {
24997
- return parent.$level()
25144
+ if ($truthy(($truthy($a = context['$==']("document")) ? $a : context['$==']("section")))) {
25145
+
25146
+ self.level = (self.next_section_index = 0);
25147
+ return (self.next_section_ordinal = 1);
25148
+ } else if ($truthy($$($nesting, 'AbstractBlock')['$==='](parent))) {
25149
+ return (self.level = parent.$level())
24998
25150
  } else {
24999
- return nil
25000
- }; return nil; })())}})();
25151
+ return (self.level = nil)
25152
+ };
25001
25153
  }, $AbstractBlock_initialize$1.$$arity = -3);
25002
25154
 
25003
25155
  Opal.def(self, '$block?', $AbstractBlock_block$ques$2 = function() {
@@ -25181,7 +25333,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
25181
25333
  };
25182
25334
  }
25183
25335
  } else {
25184
- return nil
25336
+ return ""
25185
25337
  }
25186
25338
  }, $AbstractBlock_alt$19.$$arity = 0);
25187
25339
 
@@ -25289,10 +25441,6 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
25289
25441
 
25290
25442
 
25291
25443
 
25292
- if (value == null) {
25293
- value = nil;
25294
- };
25295
-
25296
25444
  if (caption_context == null) {
25297
25445
  caption_context = self.context;
25298
25446
  };
@@ -25305,7 +25453,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
25305
25453
  } else {
25306
25454
  return nil
25307
25455
  };
25308
- }, $AbstractBlock_assign_caption$29.$$arity = -1);
25456
+ }, $AbstractBlock_assign_caption$29.$$arity = -2);
25309
25457
 
25310
25458
  Opal.def(self, '$assign_numeral', $AbstractBlock_assign_numeral$30 = function $$assign_numeral(section) {
25311
25459
  var $a, self = this, $writer = nil, like = nil, sectname = nil, caption = nil;
@@ -26088,7 +26236,7 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26088
26236
  }
26089
26237
  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;
26090
26238
 
26091
- Opal.add_stubs(['$autoload', '$__dir__', '$attr_reader', '$raise', '$class', '$[]', '$sub', '$slice', '$length', '$==', '$[]=', '$backend_traits', '$-', '$derive_backend_traits', '$register', '$new', '$create', '$default', '$each', '$default=', '$registry', '$for', '$===', '$supports_templates?', '$merge', '$private', '$include', '$delete', '$clear', '$private_class_method', '$send', '$extend', '$node_name', '$+', '$receiver', '$to_s', '$name', '$warn', '$logger', '$respond_to?', '$content']);
26239
+ 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', '$private_class_method', '$send', '$extend', '$node_name', '$+', '$receiver', '$name', '$warn', '$logger', '$respond_to?', '$content']);
26092
26240
  return (function($base, $parent_nesting) {
26093
26241
  var self = $module($base, 'Asciidoctor');
26094
26242
 
@@ -26097,7 +26245,7 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26097
26245
  (function($base, $parent_nesting) {
26098
26246
  var self = $module($base, 'Converter');
26099
26247
 
26100
- var $nesting = [self].concat($parent_nesting), $Converter_initialize$1, $Converter_convert$2, $Converter_handles$ques$3, $Converter_derive_backend_traits$4, $a, $Converter_included$27;
26248
+ var $nesting = [self].concat($parent_nesting), $Converter_initialize$1, $Converter_convert$2, $Converter_handles$ques$3, $Converter_derive_backend_traits$4, $a, $Converter_included$28;
26101
26249
 
26102
26250
 
26103
26251
  self.$autoload("CompositeConverter", "" + (self.$__dir__()) + "/converter/composite");
@@ -26289,23 +26437,30 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26289
26437
 
26290
26438
 
26291
26439
  Opal.def(self, '$register_for', $Config_register_for$14 = function $$register_for($a) {
26292
- var $post_args, backends, self = this;
26440
+ var $post_args, backends, $$15, self = this;
26293
26441
 
26294
26442
 
26295
26443
 
26296
26444
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
26297
26445
 
26298
26446
  backends = $post_args;;
26299
- return $send($$($nesting, 'Converter'), 'register', [self].concat(Opal.to_a(backends)));
26447
+ return $send($$($nesting, 'Converter'), 'register', [self].concat(Opal.to_a($send(backends, 'map', [], ($$15 = function(backend){var self = $$15.$$s || this;
26448
+
26449
+
26450
+
26451
+ if (backend == null) {
26452
+ backend = nil;
26453
+ };
26454
+ return backend.$to_s();}, $$15.$$s = self, $$15.$$arity = 1, $$15)))));
26300
26455
  }, $Config_register_for$14.$$arity = -1)
26301
26456
  })($nesting[0], $nesting);
26302
26457
  (function($base, $parent_nesting) {
26303
26458
  var self = $module($base, 'Factory');
26304
26459
 
26305
- var $nesting = [self].concat($parent_nesting), $Factory_new$15, $Factory_default$16, $Factory_create$17, $Factory_register$18, $Factory_for$20, $Factory_create$21, $Factory_converters$22, $Factory_registry$23;
26460
+ var $nesting = [self].concat($parent_nesting), $Factory_new$16, $Factory_default$17, $Factory_create$18, $Factory_register$19, $Factory_for$21, $Factory_create$22, $Factory_converters$23, $Factory_registry$24;
26306
26461
 
26307
26462
 
26308
- Opal.defs(self, '$new', $Factory_new$15 = function($a, $b) {
26463
+ Opal.defs(self, '$new', $Factory_new$16 = function($a, $b) {
26309
26464
  var $post_args, $kwargs, converters, proxy_default, self = this;
26310
26465
 
26311
26466
 
@@ -26339,8 +26494,8 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26339
26494
 
26340
26495
  return $$($nesting, 'CustomFactory').$new(converters);
26341
26496
  };
26342
- }, $Factory_new$15.$$arity = -1);
26343
- Opal.defs(self, '$default', $Factory_default$16 = function($a) {
26497
+ }, $Factory_new$16.$$arity = -1);
26498
+ Opal.defs(self, '$default', $Factory_default$17 = function($a) {
26344
26499
  var $post_args, args, self = this;
26345
26500
 
26346
26501
 
@@ -26349,8 +26504,8 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26349
26504
 
26350
26505
  args = $post_args;;
26351
26506
  return $$($nesting, 'Converter');
26352
- }, $Factory_default$16.$$arity = -1);
26353
- Opal.defs(self, '$create', $Factory_create$17 = function $$create(backend, opts) {
26507
+ }, $Factory_default$17.$$arity = -1);
26508
+ Opal.defs(self, '$create', $Factory_create$18 = function $$create(backend, opts) {
26354
26509
  var self = this;
26355
26510
 
26356
26511
 
@@ -26359,17 +26514,17 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26359
26514
  opts = $hash2([], {});
26360
26515
  };
26361
26516
  return self.$default().$create(backend, opts);
26362
- }, $Factory_create$17.$$arity = -2);
26517
+ }, $Factory_create$18.$$arity = -2);
26363
26518
 
26364
- Opal.def(self, '$register', $Factory_register$18 = function $$register(converter, $a) {
26365
- var $post_args, backends, $$19, self = this;
26519
+ Opal.def(self, '$register', $Factory_register$19 = function $$register(converter, $a) {
26520
+ var $post_args, backends, $$20, self = this;
26366
26521
 
26367
26522
 
26368
26523
 
26369
26524
  $post_args = Opal.slice.call(arguments, 1, arguments.length);
26370
26525
 
26371
26526
  backends = $post_args;;
26372
- return $send(backends, 'each', [], ($$19 = function(backend){var self = $$19.$$s || this, $writer = nil;
26527
+ return $send(backends, 'each', [], ($$20 = function(backend){var self = $$20.$$s || this, $writer = nil;
26373
26528
 
26374
26529
 
26375
26530
 
@@ -26388,16 +26543,16 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26388
26543
  $writer = [backend, converter];
26389
26544
  $send(self.$registry(), '[]=', Opal.to_a($writer));
26390
26545
  return $writer[$rb_minus($writer["length"], 1)];;
26391
- };}, $$19.$$s = self, $$19.$$arity = 1, $$19));
26392
- }, $Factory_register$18.$$arity = -2);
26546
+ };}, $$20.$$s = self, $$20.$$arity = 1, $$20));
26547
+ }, $Factory_register$19.$$arity = -2);
26393
26548
 
26394
- Opal.def(self, '$for', $Factory_for$20 = function(backend) {
26549
+ Opal.def(self, '$for', $Factory_for$21 = function(backend) {
26395
26550
  var self = this;
26396
26551
 
26397
26552
  return self.$registry()['$[]'](backend)
26398
- }, $Factory_for$20.$$arity = 1);
26553
+ }, $Factory_for$21.$$arity = 1);
26399
26554
 
26400
- Opal.def(self, '$create', $Factory_create$21 = function $$create(backend, opts) {
26555
+ Opal.def(self, '$create', $Factory_create$22 = function $$create(backend, opts) {
26401
26556
  var $a, $b, self = this, converter = nil, template_dirs = nil, delegate_backend = nil;
26402
26557
 
26403
26558
 
@@ -26426,30 +26581,30 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26426
26581
  } else {
26427
26582
  return nil
26428
26583
  };
26429
- }, $Factory_create$21.$$arity = -2);
26584
+ }, $Factory_create$22.$$arity = -2);
26430
26585
 
26431
- Opal.def(self, '$converters', $Factory_converters$22 = function $$converters() {
26586
+ Opal.def(self, '$converters', $Factory_converters$23 = function $$converters() {
26432
26587
  var self = this;
26433
26588
 
26434
26589
  return self.$registry().$merge()
26435
- }, $Factory_converters$22.$$arity = 0);
26590
+ }, $Factory_converters$23.$$arity = 0);
26436
26591
  self.$private();
26437
26592
 
26438
- Opal.def(self, '$registry', $Factory_registry$23 = function $$registry() {
26593
+ Opal.def(self, '$registry', $Factory_registry$24 = function $$registry() {
26439
26594
  var self = this;
26440
26595
 
26441
26596
  return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method")
26442
- }, $Factory_registry$23.$$arity = 0);
26597
+ }, $Factory_registry$24.$$arity = 0);
26443
26598
  })($nesting[0], $nesting);
26444
26599
  (function($base, $super, $parent_nesting) {
26445
26600
  var self = $klass($base, $super, 'CustomFactory');
26446
26601
 
26447
- var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$24, $CustomFactory_unregister_all$25;
26602
+ var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$25, $CustomFactory_unregister_all$26;
26448
26603
 
26449
26604
 
26450
26605
  self.$include($$($nesting, 'Factory'));
26451
26606
 
26452
- Opal.def(self, '$initialize', $CustomFactory_initialize$24 = function $$initialize(seed_registry) {
26607
+ Opal.def(self, '$initialize', $CustomFactory_initialize$25 = function $$initialize(seed_registry) {
26453
26608
  var self = this, $writer = nil;
26454
26609
 
26455
26610
 
@@ -26467,34 +26622,34 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26467
26622
  } else {
26468
26623
  return (self.registry = $hash2([], {}))
26469
26624
  };
26470
- }, $CustomFactory_initialize$24.$$arity = -1);
26625
+ }, $CustomFactory_initialize$25.$$arity = -1);
26471
26626
 
26472
- Opal.def(self, '$unregister_all', $CustomFactory_unregister_all$25 = function $$unregister_all() {
26627
+ Opal.def(self, '$unregister_all', $CustomFactory_unregister_all$26 = function $$unregister_all() {
26473
26628
  var self = this, $writer = nil;
26474
26629
 
26475
26630
 
26476
26631
  $writer = [nil];
26477
26632
  $send(self.$registry().$clear(), 'default=', Opal.to_a($writer));
26478
26633
  return $writer[$rb_minus($writer["length"], 1)];
26479
- }, $CustomFactory_unregister_all$25.$$arity = 0);
26634
+ }, $CustomFactory_unregister_all$26.$$arity = 0);
26480
26635
  self.$private();
26481
26636
  return self.$attr_reader("registry");
26482
26637
  })($nesting[0], null, $nesting);
26483
26638
  (function($base, $parent_nesting) {
26484
26639
  var self = $module($base, 'DefaultFactory');
26485
26640
 
26486
- var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$26;
26641
+ var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$27;
26487
26642
 
26488
26643
 
26489
26644
  self.$include($$($nesting, 'Factory'));
26490
26645
  self.$private();
26491
26646
  (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {})));
26492
26647
 
26493
- Opal.def(self, '$registry', $DefaultFactory_registry$26 = function $$registry() {
26648
+ Opal.def(self, '$registry', $DefaultFactory_registry$27 = function $$registry() {
26494
26649
  var $a, self = this;
26495
26650
 
26496
26651
  return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a)
26497
- }, $DefaultFactory_registry$26.$$arity = 0);
26652
+ }, $DefaultFactory_registry$27.$$arity = 0);
26498
26653
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
26499
26654
  } else {
26500
26655
  nil
@@ -26513,23 +26668,23 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26513
26668
  return nil
26514
26669
  };
26515
26670
  })($nesting[0], $$($nesting, 'CustomFactory'), $nesting);
26516
- self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Converter_included$27 = function $$included(into) {
26671
+ self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Converter_included$28 = function $$included(into) {
26517
26672
  var self = this;
26518
26673
 
26519
26674
 
26520
26675
  into.$send("include", $$($nesting, 'BackendTraits'));
26521
26676
  return into.$extend($$($nesting, 'Config'));
26522
- }, $Converter_included$27.$$arity = 1), nil) && 'included') ? $a : "included"));
26677
+ }, $Converter_included$28.$$arity = 1), nil) && 'included') ? $a : "included"));
26523
26678
  (function($base, $super, $parent_nesting) {
26524
26679
  var self = $klass($base, $super, 'Base');
26525
26680
 
26526
- var $nesting = [self].concat($parent_nesting), $Base_convert$28, $Base_handles$ques$29, $Base_content_only$30, $Base_skip$31;
26681
+ var $nesting = [self].concat($parent_nesting), $Base_convert$29, $Base_handles$ques$30, $Base_content_only$31, $Base_skip$32;
26527
26682
 
26528
26683
  self.$$prototype.backend = nil;
26529
26684
 
26530
26685
  self.$include($$($nesting, 'Converter'), $$($nesting, 'Logging'));
26531
26686
 
26532
- Opal.def(self, '$convert', $Base_convert$28 = function $$convert(node, transform, opts) {
26687
+ Opal.def(self, '$convert', $Base_convert$29 = function $$convert(node, transform, opts) {
26533
26688
  var $a, $b, self = this, ex = nil;
26534
26689
  if ($gvars["!"] == null) $gvars["!"] = nil;
26535
26690
 
@@ -26563,24 +26718,24 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
26563
26718
  } finally { Opal.pop_exception() }
26564
26719
  } else { throw $err; }
26565
26720
  };
26566
- }, $Base_convert$28.$$arity = -2);
26721
+ }, $Base_convert$29.$$arity = -2);
26567
26722
 
26568
- Opal.def(self, '$handles?', $Base_handles$ques$29 = function(transform) {
26723
+ Opal.def(self, '$handles?', $Base_handles$ques$30 = function(transform) {
26569
26724
  var self = this;
26570
26725
 
26571
26726
  return self['$respond_to?']("" + "convert_" + (transform))
26572
- }, $Base_handles$ques$29.$$arity = 1);
26727
+ }, $Base_handles$ques$30.$$arity = 1);
26573
26728
 
26574
- Opal.def(self, '$content_only', $Base_content_only$30 = function $$content_only(node) {
26729
+ Opal.def(self, '$content_only', $Base_content_only$31 = function $$content_only(node) {
26575
26730
  var self = this;
26576
26731
 
26577
26732
  return node.$content()
26578
- }, $Base_content_only$30.$$arity = 1);
26579
- return (Opal.def(self, '$skip', $Base_skip$31 = function $$skip(node) {
26733
+ }, $Base_content_only$31.$$arity = 1);
26734
+ return (Opal.def(self, '$skip', $Base_skip$32 = function $$skip(node) {
26580
26735
  var self = this;
26581
26736
 
26582
26737
  return nil
26583
- }, $Base_skip$31.$$arity = 1), nil) && 'skip';
26738
+ }, $Base_skip$32.$$arity = 1), nil) && 'skip';
26584
26739
  })($nesting[0], null, $nesting);
26585
26740
  self.$extend($$($nesting, 'DefaultFactory'));
26586
26741
  })($nesting[0], $nesting)
@@ -26606,7 +26761,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
26606
26761
  }
26607
26762
  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, $hash = Opal.hash;
26608
26763
 
26609
- Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$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', '$name_for_value', '$expand_path', '$pwd', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$create', '$to_proc', '$groups', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$nil_or_empty?', '$nextval', '$to_s', '$value', '$save_to', '$register', '$tap', '$xreftext', '$find', '$source', '$source_lines', '$doctitle', '$sectname=', '$title=', '$first_section', '$title', '$reftext', '$>', '$<', '$context', '$assign_numeral', '$clear_playback_attributes', '$save_attributes', '$name', '$negate', '$rewind', '$replace', '$attribute_locked?', '$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']);
26764
+ Opal.add_stubs(['$new', '$attr_reader', '$nil?', '$<<', '$[]', '$[]=', '$-', '$include?', '$strip', '$squeeze', '$gsub', '$empty?', '$!', '$rpartition', '$attr_accessor', '$delete', '$base_dir', '$options', '$merge', '$catalog', '$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', '$name_for_value', '$expand_path', '$pwd', '$>=', '$+', '$abs', '$to_i', '$delete_if', '$update_doctype_attributes', '$cursor', '$parse', '$restore_attributes', '$update_backend_attributes', '$fetch', '$fill_datetime_attributes', '$activate', '$create', '$to_proc', '$groups', '$preprocessors?', '$preprocessors', '$process_method', '$tree_processors?', '$tree_processors', '$!=', '$counter', '$nil_or_empty?', '$nextval', '$to_s', '$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', '$attribute_locked?', '$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']);
26610
26765
  return (function($base, $parent_nesting) {
26611
26766
  var self = $module($base, 'Asciidoctor');
26612
26767
 
@@ -26814,7 +26969,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
26814
26969
  return $writer[$rb_minus($writer["length"], 1)];;}, $$9.$$s = self, $$9.$$arity = 2, $$9));
26815
26970
  if ($truthy((to_file = options['$[]']("to_file")))) {
26816
26971
 
26817
- $writer = ["outfilesuffix", $$$('::', 'File').$extname(to_file)];
26972
+ $writer = ["outfilesuffix", $$($nesting, 'Helpers').$extname(to_file)];
26818
26973
  $send(attr_overrides, '[]=', Opal.to_a($writer));
26819
26974
  $writer[$rb_minus($writer["length"], 1)];};
26820
26975
  if ($truthy((safe_mode = options['$[]']("safe"))['$!']())) {
@@ -26850,8 +27005,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
26850
27005
  $send(options, '[]=', Opal.to_a($writer));
26851
27006
  $writer[$rb_minus($writer["length"], 1)];};
26852
27007
  };
26853
- self.parsed = false;
26854
- self.header = (self.header_attributes = nil);
27008
+ self.parsed = (self.reftexts = (self.header = (self.header_attributes = nil)));
26855
27009
  self.counters = $hash2([], {});
26856
27010
  self.attributes_modified = $$$('::', 'Set').$new();
26857
27011
  self.docinfo_processor_extensions = $hash2([], {});
@@ -27250,7 +27404,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27250
27404
  else {if ($truthy(self.options['$[]']("catalog_assets"))) {
27251
27405
  return self.catalog['$[]'](type)['$<<']((function() {if (type['$==']("images")) {
27252
27406
 
27253
- return $$($nesting, 'ImageReference').$new(value['$[]'](0), value['$[]'](1));
27407
+ return $$($nesting, 'ImageReference').$new(value, self.attributes['$[]']("imagesdir"));
27254
27408
  } else {
27255
27409
  return value
27256
27410
  }; return nil; })())
@@ -27260,10 +27414,12 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27260
27414
  }, $Document_register$17.$$arity = 2);
27261
27415
 
27262
27416
  Opal.def(self, '$resolve_id', $Document_resolve_id$18 = function $$resolve_id(text) {
27263
- var $a, $b, $$19, $$21, self = this;
27417
+ var $$19, $$21, self = this, resolved_id = nil;
27264
27418
 
27265
- return ($truthy($a = (self.reftexts = ($truthy($b = self.reftexts) ? $b : (function() {if ($truthy(self.parsed)) {
27266
- return $send($hash2([], {}), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20;
27419
+ if ($truthy(self.reftexts)) {
27420
+ return self.reftexts['$[]'](text)
27421
+ } else if ($truthy(self.parsed)) {
27422
+ return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20;
27267
27423
  if (self.catalog == null) self.catalog = nil;
27268
27424
 
27269
27425
 
@@ -27271,7 +27427,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27271
27427
  if (accum == null) {
27272
27428
  accum = nil;
27273
27429
  };
27274
- return $send(self.catalog['$[]']("refs"), 'each', [], ($$20 = function(id, ref){var self = $$20.$$s || this, $writer = nil;
27430
+ return $send(self.catalog['$[]']("refs"), 'each', [], ($$20 = function(id, ref){var self = $$20.$$s || this, $a, $writer = nil;
27275
27431
 
27276
27432
 
27277
27433
 
@@ -27282,38 +27438,42 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
27282
27438
  if (ref == null) {
27283
27439
  ref = nil;
27284
27440
  };
27285
- $writer = [ref.$xreftext(), id];
27286
- $send(accum, '[]=', Opal.to_a($writer));
27287
- return $writer[$rb_minus($writer["length"], 1)];}, $$20.$$s = self, $$20.$$arity = 2, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))
27441
+ return ($truthy($a = accum['$[]'](ref.$xreftext())) ? $a : (($writer = [ref.$xreftext(), id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));}, $$20.$$s = self, $$20.$$arity = 2, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))['$[]'](text)
27288
27442
  } else {
27289
- return nil
27290
- }; return nil; })()))) ? $a : $send($hash2([], {}), 'tap', [], ($$21 = function(accum){var self = $$21.$$s || this, $$22;
27291
- if (self.catalog == null) self.catalog = nil;
27292
-
27293
-
27294
27443
 
27295
- if (accum == null) {
27296
- accum = nil;
27297
- };
27298
- return $send(self.catalog['$[]']("refs"), 'find', [], ($$22 = function(id, ref){var self = $$22.$$s || this, $writer = nil;
27444
+ resolved_id = nil;
27445
+ (function(){var $brk = Opal.new_brk(); try {return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$21 = function(accum){var self = $$21.$$s || this, $$22;
27446
+ if (self.catalog == null) self.catalog = nil;
27299
27447
 
27300
27448
 
27301
27449
 
27302
- if (id == null) {
27303
- id = nil;
27450
+ if (accum == null) {
27451
+ accum = nil;
27304
27452
  };
27453
+ return (function(){var $brk = Opal.new_brk(); try {return $send(self.catalog['$[]']("refs"), 'each', [], ($$22 = function(id, ref){var self = $$22.$$s || this, $a, xreftext = nil, $writer = nil;
27454
+
27305
27455
 
27306
- if (ref == null) {
27307
- ref = nil;
27308
- };
27309
- if (ref.$xreftext()['$=='](text)) {
27310
27456
 
27311
- $writer = [text, id];
27312
- $send(accum, '[]=', Opal.to_a($writer));
27313
- return $writer[$rb_minus($writer["length"], 1)];
27314
- } else {
27315
- return nil
27316
- };}, $$22.$$s = self, $$22.$$arity = 2, $$22));}, $$21.$$s = self, $$21.$$arity = 1, $$21)))['$[]'](text)
27457
+ if (id == null) {
27458
+ id = nil;
27459
+ };
27460
+
27461
+ if (ref == null) {
27462
+ ref = nil;
27463
+ };
27464
+ if ((xreftext = ref.$xreftext())['$=='](text)) {
27465
+
27466
+
27467
+ Opal.brk((resolved_id = id), $brk);
27468
+ } else {
27469
+
27470
+ return ($truthy($a = accum['$[]'](xreftext)) ? $a : (($writer = [xreftext, id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
27471
+ };}, $$22.$$s = self, $$22.$$brk = $brk, $$22.$$arity = 2, $$22))
27472
+ } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}, $$21.$$s = self, $$21.$$brk = $brk, $$21.$$arity = 1, $$21))
27473
+ } catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();
27474
+ self.reftexts = nil;
27475
+ return resolved_id;
27476
+ }
27317
27477
  }, $Document_resolve_id$18.$$arity = 1);
27318
27478
 
27319
27479
  Opal.def(self, '$footnotes?', $Document_footnotes$ques$23 = function() {
@@ -28438,9 +28598,9 @@ Opal.modules["asciidoctor/inline"] = function(Opal) {
28438
28598
  Opal.alias(self, "render", "convert");
28439
28599
 
28440
28600
  Opal.def(self, '$alt', $Inline_alt$5 = function $$alt() {
28441
- var self = this;
28601
+ var $a, self = this;
28442
28602
 
28443
- return self.$attr("alt")
28603
+ return ($truthy($a = self.$attr("alt")) ? $a : "")
28444
28604
  }, $Inline_alt$5.$$arity = 0);
28445
28605
 
28446
28606
  Opal.def(self, '$reftext?', $Inline_reftext$ques$6 = function() {
@@ -28639,7 +28799,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
28639
28799
  }
28640
28800
  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;
28641
28801
 
28642
- 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', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$finalize_header', '$nil_or_empty?', '$title=', '$-', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$apply_header_subs', '$[]=', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$include?', '$==', '$!', '$register', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$sub_attributes', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$skip_blank_lines', '$save', '$update', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$title', '$split', '$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', '$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', '$source_location', '$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', '$delete_at', '$casecmp', '$sectname=', '$special=', '$numbered=', '$numbered', '$lineno', '$peek_lines', '$setext_section_title?', '$abs', '$cursor_at_prev_line', '$process_attribute_entries', '$next_line_empty?', '$process_authors', '$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', '$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', '$has_header_option=', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
28802
+ 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', '$parse_block_metadata_lines', '$attributes', '$is_next_line_doctitle?', '$finalize_header', '$nil_or_empty?', '$title=', '$-', '$sourcemap', '$cursor', '$parse_section_title', '$id=', '$apply_header_subs', '$[]=', '$source_location=', '$header', '$attribute_locked?', '$id', '$clear', '$delete', '$instance_variable_get', '$parse_header_metadata', '$include?', '$==', '$!', '$register', '$doctype', '$parse_manpage_header', '$=~', '$downcase', '$sub_attributes', '$error', '$logger', '$message_with_context', '$cursor_at_line', '$backend', '$skip_blank_lines', '$save', '$update', '$is_next_line_section?', '$initialize_section', '$join', '$map', '$read_lines_until', '$lstrip', '$title', '$split', '$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', '$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', '$source_location', '$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', '$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', '$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', '$has_header_option=', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
28643
28803
  return (function($base, $parent_nesting) {
28644
28804
  var self = $module($base, 'Asciidoctor');
28645
28805
 
@@ -29247,7 +29407,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
29247
29407
  }};
29248
29408
  if (blk_ctx['$==']("image")) {
29249
29409
 
29250
- document.$register("images", [target, (($writer = ["imagesdir", doc_attrs['$[]']("imagesdir")]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])]);
29410
+ document.$register("images", target);
29411
+
29412
+ $writer = ["imagesdir", doc_attrs['$[]']("imagesdir")];
29413
+ $send(attributes, '[]=', Opal.to_a($writer));
29414
+ $writer[$rb_minus($writer["length"], 1)];;
29251
29415
  ($truthy($b = attributes['$[]']("alt")) ? $b : (($writer = ["alt", ($truthy($c = style) ? $c : (($writer = ["default-alt", $$($nesting, 'Helpers').$basename(target, true).$tr("_-", " ")]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))]), $send(attributes, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
29252
29416
  if ($truthy((scaledwidth = attributes.$delete("scaledwidth"))['$nil_or_empty?']())) {
29253
29417
  } else {
@@ -30432,7 +30596,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
30432
30596
  if ($truthy(this_line)) {
30433
30597
  reader.$unshift_line(this_line)};
30434
30598
  if ($truthy(detached_continuation)) {
30435
- buffer.$delete_at(detached_continuation)};
30599
+
30600
+ $writer = [detached_continuation, ""];
30601
+ $send(buffer, '[]=', Opal.to_a($writer));
30602
+ $writer[$rb_minus($writer["length"], 1)];};
30436
30603
  while (!($truthy(buffer['$empty?']()))) {
30437
30604
  if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
30438
30605
  buffer.$pop()
@@ -31922,9 +32089,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
31922
32089
  function $rb_gt(lhs, rhs) {
31923
32090
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
31924
32091
  }
31925
- 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;
32092
+ 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, $gvars = Opal.gvars;
31926
32093
 
31927
- Opal.add_stubs(['$include', '$attr_accessor', '$root?', '$posixify', '$expand_path', '$pwd', '$start_with?', '$==', '$match?', '$absolute_path?', '$+', '$length', '$descends_from?', '$slice', '$to_s', '$relative_path_from', '$new', '$include?', '$tr', '$partition_path', '$each', '$pop', '$<<', '$join_path', '$[]', '$web_root?', '$unc?', '$index', '$split', '$delete', '$[]=', '$-', '$join', '$raise', '$!', '$fetch', '$warn', '$logger', '$empty?', '$nil_or_empty?', '$chomp', '$!=', '$>', '$size', '$end_with?', '$uri_prefix', '$gsub']);
32094
+ Opal.add_stubs(['$include', '$attr_accessor', '$root?', '$posixify', '$expand_path', '$pwd', '$start_with?', '$==', '$match?', '$absolute_path?', '$+', '$length', '$descends_from?', '$slice', '$to_s', '$relative_path_from', '$new', '$include?', '$tr', '$partition_path', '$each', '$pop', '$<<', '$join_path', '$[]', '$web_root?', '$unc?', '$index', '$split', '$delete', '$[]=', '$-', '$join', '$raise', '$!', '$fetch', '$warn', '$logger', '$empty?', '$nil_or_empty?', '$chomp', '$!=', '$>', '$size', '$extract_uri_prefix', '$end_with?', '$gsub', '$private', '$=~']);
31928
32095
  return (function($base, $parent_nesting) {
31929
32096
  var self = $module($base, 'Asciidoctor');
31930
32097
 
@@ -31933,7 +32100,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
31933
32100
  (function($base, $super, $parent_nesting) {
31934
32101
  var self = $klass($base, $super, 'PathResolver');
31935
32102
 
31936
- 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;
32103
+ 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;
31937
32104
 
31938
32105
  self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
31939
32106
 
@@ -32291,7 +32458,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32291
32458
  return self.$join_path(resolved_segments, jail_root)
32292
32459
  };
32293
32460
  }, $PathResolver_system_path$13.$$arity = -2);
32294
- return (Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
32461
+
32462
+ Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
32295
32463
  var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
32296
32464
 
32297
32465
 
@@ -32301,17 +32469,13 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32301
32469
  };
32302
32470
  target = self.$posixify(target);
32303
32471
  start = self.$posixify(start);
32304
- uri_prefix = nil;
32305
32472
  if ($truthy(($truthy($a = start['$nil_or_empty?']()) ? $a : self['$web_root?'](target)))) {
32306
32473
  } else {
32307
-
32308
- target = (function() {if ($truthy(start['$end_with?']($$($nesting, 'SLASH')))) {
32309
- return "" + (start) + (target)
32474
+ $b = self.$extract_uri_prefix("" + (start) + ((function() {if ($truthy(start['$end_with?']($$($nesting, 'SLASH')))) {
32475
+ return ""
32310
32476
  } else {
32311
- return "" + (start) + ($$($nesting, 'SLASH')) + (target)
32312
- }; return nil; })();
32313
- if ($truthy((uri_prefix = $$($nesting, 'Helpers').$uri_prefix(target)))) {
32314
- target = target['$[]'](Opal.Range.$new(uri_prefix.$length(), -1, false))};
32477
+ return $$($nesting, 'SLASH')
32478
+ }; return nil; })()) + (target)), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (uri_prefix = ($a[1] == null ? nil : $a[1])), $b
32315
32479
  };
32316
32480
  $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;
32317
32481
  resolved_segments = [];
@@ -32344,7 +32508,17 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
32344
32508
  } else {
32345
32509
  return resolved_path
32346
32510
  };
32347
- }, $PathResolver_web_path$16.$$arity = -2), nil) && 'web_path';
32511
+ }, $PathResolver_web_path$16.$$arity = -2);
32512
+ self.$private();
32513
+ return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) {
32514
+ var $a, self = this;
32515
+
32516
+ if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
32517
+ return [str.$slice((($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$length(), str.$length()), (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))]
32518
+ } else {
32519
+ return str
32520
+ }
32521
+ }, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
32348
32522
  })($nesting[0], null, $nesting)
32349
32523
  })($nesting[0], $nesting)
32350
32524
  };
@@ -32374,7 +32548,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
32374
32548
  }
32375
32549
  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;
32376
32550
 
32377
- Opal.add_stubs(['$include', '$attr_reader', '$+', '$attr_accessor', '$!', '$===', '$split', '$file', '$dir', '$dirname', '$path', '$basename', '$lineno', '$prepare_lines', '$drop', '$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', '$new', '$tap', '$each', '$instance_variables', '$instance_variable_get', '$instance_variable_set', '$class', '$object_id', '$inspect', '$private', '$prepare_source_array', '$prepare_source_string', '$valid_encoding?', '$to_s', '$raise', '$to_i', '$attributes', '$catalog', '$pop_include', '$parse', '$path=', '$dup', '$extname', '$rootname', '$key?', '$attr', '$>=', '$nil?', '$extensions?', '$include_processors?', '$extensions', '$include_processors', '$map', '$skip_front_matter!', '$pop', '$adjust_indentation!', '$end_with?', '$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', '$value?', '$create_include_cursor', '$rindex', '$delete_at', '$keys', '$read', '$uriish?', '$attr?', '$require_library', '$normalize_system_path', '$file?', '$relative_path', '$path_resolver', '$base_dir', '$to_f']);
32551
+ Opal.add_stubs(['$include', '$attr_reader', '$+', '$attr_accessor', '$!', '$===', '$split', '$file', '$dir', '$dirname', '$path', '$basename', '$lineno', '$prepare_lines', '$drop', '$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', '$new', '$tap', '$each', '$instance_variables', '$instance_variable_get', '$instance_variable_set', '$class', '$object_id', '$inspect', '$private', '$prepare_source_array', '$prepare_source_string', '$valid_encoding?', '$to_s', '$raise', '$to_i', '$attributes', '$catalog', '$pop_include', '$parse', '$path=', '$dup', '$end_with?', '$keys', '$rindex', '$rootname', '$key?', '$attr', '$>=', '$nil?', '$extensions?', '$include_processors?', '$extensions', '$include_processors', '$map', '$skip_front_matter!', '$pop', '$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', '$value?', '$create_include_cursor', '$delete_at', '$read', '$uriish?', '$attr?', '$require_library', '$normalize_system_path', '$file?', '$relative_path', '$path_resolver', '$base_dir', '$to_f']);
32378
32552
  return (function($base, $parent_nesting) {
32379
32553
  var self = $module($base, 'Asciidoctor');
32380
32554
 
@@ -33142,17 +33316,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33142
33316
  $writer[$rb_minus($writer["length"], 1)];;
33143
33317
  file = file.$to_s();
33144
33318
  };
33145
- path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file));
33146
- self.process_lines = $$($nesting, 'ASCIIDOC_EXTENSIONS')['$[]']($$$('::', 'File').$extname(file));
33319
+ self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
33320
+ if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) {
33321
+
33322
+ $writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33323
+ return nil
33324
+ } else {
33325
+ return true
33326
+ }; return nil; })()];
33327
+ $send(self.includes, '[]=', Opal.to_a($writer));
33328
+ $writer[$rb_minus($writer["length"], 1)];};
33147
33329
  } else {
33148
33330
 
33149
33331
  self.dir = ".";
33150
33332
  self.process_lines = true;
33151
- };
33152
- if ($truthy(path)) {
33153
-
33154
- self.path = path;
33155
- if ($truthy(self.process_lines)) {
33333
+ if ($truthy((self.path = path))) {
33156
33334
 
33157
33335
  $writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
33158
33336
  return nil
@@ -33160,9 +33338,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
33160
33338
  return true
33161
33339
  }; return nil; })()];
33162
33340
  $send(self.includes, '[]=', Opal.to_a($writer));
33163
- $writer[$rb_minus($writer["length"], 1)];};
33164
- } else {
33165
- self.path = "<stdin>"
33341
+ $writer[$rb_minus($writer["length"], 1)];
33342
+ } else {
33343
+ self.path = "<stdin>"
33344
+ };
33166
33345
  };
33167
33346
  self.lineno = lineno;
33168
33347
  if ($truthy(($truthy($a = self.maxdepth) ? attributes['$key?']("depth") : $a))) {
@@ -35219,51 +35398,468 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
35219
35398
  };
35220
35399
 
35221
35400
  /* Generated by Opal 0.11.99.dev */
35222
- Opal.modules["asciidoctor/writer"] = function(Opal) {
35223
- function $rb_plus(lhs, rhs) {
35224
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
35401
+ Opal.modules["asciidoctor/writer"] = function(Opal) {
35402
+ function $rb_plus(lhs, rhs) {
35403
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
35404
+ }
35405
+ 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, $hash2 = Opal.hash2;
35406
+
35407
+ Opal.add_stubs(['$respond_to?', '$write', '$+', '$chomp', '$include']);
35408
+ return (function($base, $parent_nesting) {
35409
+ var self = $module($base, 'Asciidoctor');
35410
+
35411
+ var $nesting = [self].concat($parent_nesting);
35412
+
35413
+
35414
+ (function($base, $parent_nesting) {
35415
+ var self = $module($base, 'Writer');
35416
+
35417
+ var $nesting = [self].concat($parent_nesting), $Writer_write$1;
35418
+
35419
+
35420
+ Opal.def(self, '$write', $Writer_write$1 = function $$write(output, target) {
35421
+ var self = this;
35422
+
35423
+
35424
+ if ($truthy(target['$respond_to?']("write"))) {
35425
+ target.$write($rb_plus(output.$chomp(), $$($nesting, 'LF')))
35426
+ } else {
35427
+ $$$('::', 'File').$write(target, output, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))
35428
+ };
35429
+ return nil;
35430
+ }, $Writer_write$1.$$arity = 2)
35431
+ })($nesting[0], $nesting);
35432
+ (function($base, $parent_nesting) {
35433
+ var self = $module($base, 'VoidWriter');
35434
+
35435
+ var $nesting = [self].concat($parent_nesting), $VoidWriter_write$2;
35436
+
35437
+
35438
+ self.$include($$($nesting, 'Writer'));
35439
+
35440
+ Opal.def(self, '$write', $VoidWriter_write$2 = function $$write(output, target) {
35441
+ var self = this;
35442
+
35443
+ return nil
35444
+ }, $VoidWriter_write$2.$$arity = 2);
35445
+ })($nesting[0], $nesting);
35446
+ })($nesting[0], $nesting)
35447
+ };
35448
+
35449
+ /* Generated by Opal 0.11.99.dev */
35450
+ Opal.modules["asciidoctor/load"] = function(Opal) {
35451
+ function $rb_minus(lhs, rhs) {
35452
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
35453
+ }
35454
+ function $rb_plus(lhs, rhs) {
35455
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
35456
+ }
35457
+ 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;
35458
+
35459
+ Opal.add_stubs(['$module_function', '$merge', '$[]', '$start', '$!=', '$logger', '$logger=', '$-', '$!', '$===', '$dup', '$tap', '$each', '$partition', '$[]=', '$split', '$gsub', '$+', '$respond_to?', '$keys', '$raise', '$join', '$ancestors', '$class', '$mtime', '$absolute_path', '$path', '$dirname', '$basename', '$extname', '$read', '$rewind', '$drop', '$record', '$==', '$new', '$parse', '$exception', '$message', '$set_backtrace', '$backtrace', '$stack_trace', '$stack_trace=', '$open', '$load']);
35460
+ return (function($base, $parent_nesting) {
35461
+ var self = $module($base, 'Asciidoctor');
35462
+
35463
+ var $nesting = [self].concat($parent_nesting), $Asciidoctor_load$1, $Asciidoctor_load_file$8;
35464
+
35465
+
35466
+ self.$module_function();
35467
+
35468
+ Opal.def(self, '$load', $Asciidoctor_load$1 = function $$load(input, options) {
35469
+ var $a, $b, $c, $d, $$2, $$4, $$6, self = this, timings = nil, logger = nil, $writer = nil, attrs = nil, input_path = nil, source = nil, doc = nil, ex = nil, context = nil, wrapped_ex = nil;
35470
+
35471
+
35472
+
35473
+ if (options == null) {
35474
+ options = $hash2([], {});
35475
+ };
35476
+ try {
35477
+
35478
+ options = options.$merge();
35479
+ if ($truthy((timings = options['$[]']("timings")))) {
35480
+ timings.$start("read")};
35481
+ if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
35482
+
35483
+ $writer = [logger];
35484
+ $send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
35485
+ $writer[$rb_minus($writer["length"], 1)];};
35486
+ if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
35487
+ attrs = $hash2([], {})
35488
+ } else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
35489
+ attrs = attrs.$merge()
35490
+ } else if ($truthy(($truthy($a = (($d = $$$('::', 'Java', 'skip_raise')) && ($c = $$$($d, 'JavaUtil', 'skip_raise')) && ($b = $$$($c, 'Map', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'Java'), 'JavaUtil'), 'Map')['$==='](attrs) : $a))) {
35491
+ attrs = attrs.$dup()
35492
+ } else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
35493
+ attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
35494
+
35495
+
35496
+
35497
+ if (accum == null) {
35498
+ accum = nil;
35499
+ };
35500
+ return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
35501
+
35502
+
35503
+
35504
+ if (entry == null) {
35505
+ entry = nil;
35506
+ };
35507
+ $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f;
35508
+
35509
+ $writer = [k, v];
35510
+ $send(accum, '[]=', Opal.to_a($writer));
35511
+ return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
35512
+ } else if ($truthy($$$('::', 'String')['$==='](attrs))) {
35513
+ attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
35514
+
35515
+
35516
+
35517
+ if (accum == null) {
35518
+ accum = nil;
35519
+ };
35520
+ return $send(attrs.$gsub($$($nesting, 'SpaceDelimiterRx'), $rb_plus("\\1", $$($nesting, 'NULL'))).$gsub($$($nesting, 'EscapedSpaceRx'), "\\1").$split($$($nesting, 'NULL')), 'each', [], ($$5 = function(entry){var self = $$5.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
35521
+
35522
+
35523
+
35524
+ if (entry == null) {
35525
+ entry = nil;
35526
+ };
35527
+ $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f;
35528
+
35529
+ $writer = [k, v];
35530
+ $send(accum, '[]=', Opal.to_a($writer));
35531
+ return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
35532
+ } else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
35533
+ attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
35534
+
35535
+
35536
+
35537
+ if (accum == null) {
35538
+ accum = nil;
35539
+ };
35540
+ return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this;
35541
+
35542
+
35543
+
35544
+ if (k == null) {
35545
+ k = nil;
35546
+ };
35547
+ $writer = [k, attrs['$[]'](k)];
35548
+ $send(accum, '[]=', Opal.to_a($writer));
35549
+ return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6))
35550
+ } else {
35551
+ self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
35552
+ };
35553
+ if ($truthy($$$('::', 'File')['$==='](input))) {
35554
+
35555
+
35556
+ $writer = ["input_mtime", input.$mtime()];
35557
+ $send(options, '[]=', Opal.to_a($writer));
35558
+ $writer[$rb_minus($writer["length"], 1)];;
35559
+
35560
+ $writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
35561
+ $send(attrs, '[]=', Opal.to_a($writer));
35562
+ $writer[$rb_minus($writer["length"], 1)];;
35563
+
35564
+ $writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
35565
+ $send(attrs, '[]=', Opal.to_a($writer));
35566
+ $writer[$rb_minus($writer["length"], 1)];;
35567
+
35568
+ $writer = ["docname", $$($nesting, 'Helpers').$basename(input_path, (($writer = ["docfilesuffix", $$($nesting, 'Helpers').$extname(input_path)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))];
35569
+ $send(attrs, '[]=', Opal.to_a($writer));
35570
+ $writer[$rb_minus($writer["length"], 1)];;
35571
+ source = input.$read();
35572
+ } else if ($truthy(input['$respond_to?']("read"))) {
35573
+
35574
+ try {
35575
+ input.$rewind()
35576
+ } catch ($err) {
35577
+ if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
35578
+ try {
35579
+ nil
35580
+ } finally { Opal.pop_exception() }
35581
+ } else { throw $err; }
35582
+ };
35583
+ source = input.$read();
35584
+ } else if ($truthy($$$('::', 'String')['$==='](input))) {
35585
+ source = input
35586
+ } else if ($truthy($$$('::', 'Array')['$==='](input))) {
35587
+ source = input.$drop(0)
35588
+ } else if ($truthy(input)) {
35589
+ self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
35590
+ if ($truthy(timings)) {
35591
+
35592
+ timings.$record("read");
35593
+ timings.$start("parse");};
35594
+
35595
+ $writer = ["attributes", attrs];
35596
+ $send(options, '[]=', Opal.to_a($writer));
35597
+ $writer[$rb_minus($writer["length"], 1)];;
35598
+ doc = (function() {if (options['$[]']("parse")['$=='](false)) {
35599
+
35600
+ return $$($nesting, 'Document').$new(source, options);
35601
+ } else {
35602
+ return $$($nesting, 'Document').$new(source, options).$parse()
35603
+ }; return nil; })();
35604
+ if ($truthy(timings)) {
35605
+ timings.$record("parse")};
35606
+ return doc;
35607
+ } catch ($err) {
35608
+ if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
35609
+ try {
35610
+
35611
+
35612
+ try {
35613
+
35614
+ context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
35615
+ if ($truthy(ex['$respond_to?']("exception"))) {
35616
+
35617
+ wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
35618
+ wrapped_ex.$set_backtrace(ex.$backtrace());
35619
+ wrapped_ex.stack = ex.stack;
35620
+ } else {
35621
+
35622
+ wrapped_ex = ex.$class().$new(context, ex);
35623
+
35624
+ $writer = [ex.$stack_trace()];
35625
+ $send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
35626
+ $writer[$rb_minus($writer["length"], 1)];;
35627
+ };
35628
+ } catch ($err) {
35629
+ if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
35630
+ try {
35631
+ wrapped_ex = ex
35632
+ } finally { Opal.pop_exception() }
35633
+ } else { throw $err; }
35634
+ };;
35635
+ return self.$raise(wrapped_ex);
35636
+ } finally { Opal.pop_exception() }
35637
+ } else { throw $err; }
35638
+ };
35639
+ }, $Asciidoctor_load$1.$$arity = -2);
35640
+
35641
+ Opal.def(self, '$load_file', $Asciidoctor_load_file$8 = function $$load_file(filename, options) {
35642
+ var $$9, self = this;
35643
+
35644
+
35645
+
35646
+ if (options == null) {
35647
+ options = $hash2([], {});
35648
+ };
35649
+ return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this;
35650
+
35651
+
35652
+
35653
+ if (file == null) {
35654
+ file = nil;
35655
+ };
35656
+ return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9));
35657
+ }, $Asciidoctor_load_file$8.$$arity = -2);
35658
+ })($nesting[0], $nesting)
35659
+ };
35660
+
35661
+ /* Generated by Opal 0.11.99.dev */
35662
+ Opal.modules["asciidoctor/convert"] = function(Opal) {
35663
+ function $rb_minus(lhs, rhs) {
35664
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
35225
35665
  }
35226
- 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, $hash2 = Opal.hash2;
35666
+ function $rb_ge(lhs, rhs) {
35667
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs);
35668
+ }
35669
+ function $rb_lt(lhs, rhs) {
35670
+ return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
35671
+ }
35672
+ 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;
35227
35673
 
35228
- Opal.add_stubs(['$respond_to?', '$write', '$+', '$chomp', '$include']);
35674
+ Opal.add_stubs(['$module_function', '$delete', '$merge', '$===', '$absolute_path', '$path', '$load', '$respond_to?', '$[]=', '$-', '$key?', '$[]', '$dirname', '$expand_path', '$join', '$attributes', '$outfilesuffix', '$==', '$raise', '$pwd', '$>=', '$safe', '$normalize_system_path', '$mkdir_p', '$directory?', '$!', '$convert', '$write', '$<', '$attr?', '$basebackend?', '$attr', '$uriish?', '$include?', '$syntax_highlighter', '$write_stylesheet?', '$write_primary_stylesheet', '$instance', '$empty?', '$!=', '$read_asset', '$file?', '$write_stylesheet', '$open']);
35229
35675
  return (function($base, $parent_nesting) {
35230
35676
  var self = $module($base, 'Asciidoctor');
35231
35677
 
35232
- var $nesting = [self].concat($parent_nesting);
35678
+ var $nesting = [self].concat($parent_nesting), $Asciidoctor_convert$1, $Asciidoctor_convert_file$2;
35233
35679
 
35234
35680
 
35235
- (function($base, $parent_nesting) {
35236
- var self = $module($base, 'Writer');
35237
-
35238
- var $nesting = [self].concat($parent_nesting), $Writer_write$1;
35681
+ self.$module_function();
35682
+
35683
+ Opal.def(self, '$convert', $Asciidoctor_convert$1 = function $$convert(input, options) {
35684
+ var $a, $b, $c, $d, $e, self = this, to_dir = nil, mkdirs = nil, $case = nil, to_file = nil, write_to_target = nil, sibling_path = nil, stream_output = nil, $writer = nil, outdir = nil, doc = nil, outfile = nil, working_dir = nil, jail = nil, output = nil, stylesdir = nil, stylesheet = nil, copy_asciidoctor_stylesheet = nil, copy_user_stylesheet = nil, copy_syntax_hl_stylesheet = nil, syntax_hl = nil, stylesoutdir = nil, stylesheet_src = nil, stylesheet_dest = nil, stylesheet_data = nil;
35239
35685
 
35240
35686
 
35241
- Opal.def(self, '$write', $Writer_write$1 = function $$write(output, target) {
35242
- var self = this;
35243
-
35687
+
35688
+ if (options == null) {
35689
+ options = $hash2([], {});
35690
+ };
35691
+ (options = options.$merge()).$delete("parse");
35692
+ to_dir = options.$delete("to_dir");
35693
+ mkdirs = options.$delete("mkdirs");
35694
+ $case = (to_file = options.$delete("to_file"));
35695
+ if (true['$===']($case) || nil['$===']($case)) {
35696
+ if ($truthy((write_to_target = to_dir))) {
35697
+ } else if ($truthy($$$('::', 'File')['$==='](input))) {
35698
+ sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
35699
+ to_file = nil;}
35700
+ else if (false['$===']($case)) {to_file = nil}
35701
+ else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
35702
+ else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
35703
+ } else {
35244
35704
 
35245
- if ($truthy(target['$respond_to?']("write"))) {
35246
- target.$write($rb_plus(output.$chomp(), $$($nesting, 'LF')))
35705
+ $writer = ["to_file", (write_to_target = to_file)];
35706
+ $send(options, '[]=', Opal.to_a($writer));
35707
+ $writer[$rb_minus($writer["length"], 1)];
35708
+ }};
35709
+ if ($truthy(options['$key?']("standalone"))) {
35710
+ } else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
35711
+
35712
+ $writer = ["standalone", true];
35713
+ $send(options, '[]=', Opal.to_a($writer));
35714
+ $writer[$rb_minus($writer["length"], 1)];
35715
+ } else if ($truthy(options['$key?']("header_footer"))) {
35716
+
35717
+ $writer = ["standalone", options['$[]']("header_footer")];
35718
+ $send(options, '[]=', Opal.to_a($writer));
35719
+ $writer[$rb_minus($writer["length"], 1)];};
35720
+ if ($truthy(sibling_path)) {
35721
+
35722
+ $writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
35723
+ $send(options, '[]=', Opal.to_a($writer));
35724
+ $writer[$rb_minus($writer["length"], 1)];
35725
+ } else if ($truthy(write_to_target)) {
35726
+ if ($truthy(to_dir)) {
35727
+ if ($truthy(to_file)) {
35728
+
35729
+ $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path($$$('::', 'File').$join(to_dir, to_file)))];
35730
+ $send(options, '[]=', Opal.to_a($writer));
35731
+ $writer[$rb_minus($writer["length"], 1)];
35732
+ } else {
35733
+
35734
+ $writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
35735
+ $send(options, '[]=', Opal.to_a($writer));
35736
+ $writer[$rb_minus($writer["length"], 1)];
35737
+ }
35738
+ } else if ($truthy(to_file)) {
35739
+
35740
+ $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
35741
+ $send(options, '[]=', Opal.to_a($writer));
35742
+ $writer[$rb_minus($writer["length"], 1)];}};
35743
+ doc = self.$load(input, options);
35744
+ if ($truthy(sibling_path)) {
35745
+
35746
+ outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
35747
+ if (outfile['$=='](sibling_path)) {
35748
+ self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
35749
+ } else if ($truthy(write_to_target)) {
35750
+
35751
+ working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
35752
+
35753
+ return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
35247
35754
  } else {
35248
- $$$('::', 'File').$write(target, output, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))
35755
+ return $$$('::', 'Dir').$pwd()
35756
+ }; return nil; })();
35757
+ jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35758
+ return working_dir
35759
+ } else {
35760
+ return nil
35761
+ }; return nil; })();
35762
+ if ($truthy(to_dir)) {
35763
+
35764
+ outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35765
+ if ($truthy(to_file)) {
35766
+
35767
+ outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35768
+ outdir = $$$('::', 'File').$dirname(outfile);
35769
+ } else {
35770
+ outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
35771
+ };
35772
+ } else if ($truthy(to_file)) {
35773
+
35774
+ outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
35775
+ outdir = $$$('::', 'File').$dirname(outfile);};
35776
+ if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
35777
+ self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
35778
+ if ($truthy(mkdirs)) {
35779
+ $$($nesting, 'Helpers').$mkdir_p(outdir)
35780
+ } else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
35781
+ } else {
35782
+ self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
35249
35783
  };
35250
- return nil;
35251
- }, $Writer_write$1.$$arity = 2)
35252
- })($nesting[0], $nesting);
35253
- (function($base, $parent_nesting) {
35254
- var self = $module($base, 'VoidWriter');
35255
-
35256
- var $nesting = [self].concat($parent_nesting), $VoidWriter_write$2;
35784
+ } else {
35785
+
35786
+ outfile = to_file;
35787
+ outdir = nil;
35788
+ };
35789
+ if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
35790
+ output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
35791
+ } else {
35792
+ output = doc.$convert()
35793
+ };
35794
+ if ($truthy(outfile)) {
35795
+
35796
+ doc.$write(output, outfile);
35797
+ if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = stream_output['$!']()) ? $rb_lt(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $e)) ? doc['$attr?']("linkcss") : $d)) ? doc['$attr?']("copycss") : $c)) ? doc['$basebackend?']("html") : $b)) ? ($truthy($b = (stylesdir = doc.$attr("stylesdir"))) ? $$($nesting, 'Helpers')['$uriish?'](stylesdir) : $b)['$!']() : $a))) {
35798
+
35799
+ if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
35800
+ if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
35801
+ copy_asciidoctor_stylesheet = true
35802
+ } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
35803
+ copy_user_stylesheet = true}};
35804
+ copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
35805
+ if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
35806
+
35807
+ stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35808
+ return outdir
35809
+ } else {
35810
+ return nil
35811
+ }; return nil; })());
35812
+ if ($truthy(mkdirs)) {
35813
+ $$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
35814
+ } else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
35815
+ } else {
35816
+ self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
35817
+ };
35818
+ if ($truthy(copy_asciidoctor_stylesheet)) {
35819
+ $$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
35820
+ } else if ($truthy(copy_user_stylesheet)) {
35821
+
35822
+ if ($truthy((stylesheet_src = doc.$attr("copycss"))['$empty?']())) {
35823
+ stylesheet_src = doc.$normalize_system_path(stylesheet)
35824
+ } else {
35825
+ stylesheet_src = doc.$normalize_system_path(stylesheet_src)
35826
+ };
35827
+ stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
35828
+ return outdir
35829
+ } else {
35830
+ return nil
35831
+ }; return nil; })());
35832
+ if ($truthy(($truthy($a = stylesheet_src['$!='](stylesheet_dest)) ? (stylesheet_data = doc.$read_asset(stylesheet_src, $hash2(["warn_on_failure", "label"], {"warn_on_failure": $$$('::', 'File')['$file?'](stylesheet_dest)['$!'](), "label": "stylesheet"}))) : $a))) {
35833
+ $$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))};};
35834
+ if ($truthy(copy_syntax_hl_stylesheet)) {
35835
+ syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
35836
+ return doc;
35837
+ } else {
35838
+ return output
35839
+ };
35840
+ }, $Asciidoctor_convert$1.$$arity = -2);
35841
+
35842
+ Opal.def(self, '$convert_file', $Asciidoctor_convert_file$2 = function $$convert_file(filename, options) {
35843
+ var $$3, self = this;
35257
35844
 
35258
35845
 
35259
- self.$include($$($nesting, 'Writer'));
35260
35846
 
35261
- Opal.def(self, '$write', $VoidWriter_write$2 = function $$write(output, target) {
35262
- var self = this;
35847
+ if (options == null) {
35848
+ options = $hash2([], {});
35849
+ };
35850
+ return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
35263
35851
 
35264
- return nil
35265
- }, $VoidWriter_write$2.$$arity = 2);
35266
- })($nesting[0], $nesting);
35852
+
35853
+
35854
+ if (file == null) {
35855
+ file = nil;
35856
+ };
35857
+ return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3));
35858
+ }, $Asciidoctor_convert_file$2.$$arity = -2);
35859
+ Opal.alias(self, "render", "convert");
35860
+ self.$module_function("render");
35861
+ Opal.alias(self, "render_file", "convert_file");
35862
+ self.$module_function("render_file");
35267
35863
  })($nesting[0], $nesting)
35268
35864
  };
35269
35865
 
@@ -35357,9 +35953,9 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35357
35953
  function $rb_minus(lhs, rhs) {
35358
35954
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
35359
35955
  }
35360
- 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, $send = Opal.send, $truthy = Opal.truthy, $klass = Opal.klass;
35956
+ 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;
35361
35957
 
35362
- Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$private', '$register', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$include', '$==', '$join', '$map', '$content']);
35958
+ Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$join', '$content']);
35363
35959
 
35364
35960
  (function($base, $parent_nesting) {
35365
35961
  var self = $module($base, 'Asciidoctor');
@@ -35369,7 +35965,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35369
35965
  (function($base, $parent_nesting) {
35370
35966
  var self = $module($base, 'SyntaxHighlighter');
35371
35967
 
35372
- var $nesting = [self].concat($parent_nesting), $SyntaxHighlighter_initialize$1, $SyntaxHighlighter_docinfo$ques$2, $SyntaxHighlighter_docinfo$3, $SyntaxHighlighter_highlight$ques$4, $SyntaxHighlighter_highlight$5, $SyntaxHighlighter_format$6, $SyntaxHighlighter_write_stylesheet$ques$7, $SyntaxHighlighter_write_stylesheet$8, $SyntaxHighlighter_included$9;
35968
+ var $nesting = [self].concat($parent_nesting), $SyntaxHighlighter_initialize$1, $SyntaxHighlighter_docinfo$ques$2, $SyntaxHighlighter_docinfo$3, $SyntaxHighlighter_highlight$ques$4, $SyntaxHighlighter_highlight$5, $SyntaxHighlighter_format$6, $SyntaxHighlighter_write_stylesheet$ques$7, $SyntaxHighlighter_write_stylesheet$8, $a, $SyntaxHighlighter_included$9;
35373
35969
 
35374
35970
 
35375
35971
  self.$attr_reader("name");
@@ -35430,43 +36026,51 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35430
36026
 
35431
36027
  return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("write_stylesheet") + " method since #write_stylesheet? returns true")
35432
36028
  }, $SyntaxHighlighter_write_stylesheet$8.$$arity = 2);
35433
- self.$private_class_method((Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) {
36029
+ self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) {
35434
36030
  var self = this;
35435
36031
 
35436
36032
  return into.$extend($$($nesting, 'Config'))
35437
- }, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included');
36033
+ }, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included') ? $a : "included"));
35438
36034
  (function($base, $parent_nesting) {
35439
36035
  var self = $module($base, 'Config');
35440
36036
 
35441
36037
  var $nesting = [self].concat($parent_nesting), $Config_register_for$10;
35442
36038
 
35443
- self.$private((Opal.def(self, '$register_for', $Config_register_for$10 = function $$register_for($a) {
35444
- var $post_args, names, self = this;
36039
+
36040
+ Opal.def(self, '$register_for', $Config_register_for$10 = function $$register_for($a) {
36041
+ var $post_args, names, $$11, self = this;
35445
36042
 
35446
36043
 
35447
36044
 
35448
36045
  $post_args = Opal.slice.call(arguments, 0, arguments.length);
35449
36046
 
35450
36047
  names = $post_args;;
35451
- return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a(names)));
35452
- }, $Config_register_for$10.$$arity = -1), nil) && 'register_for')
36048
+ return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a($send(names, 'map', [], ($$11 = function(name){var self = $$11.$$s || this;
36049
+
36050
+
36051
+
36052
+ if (name == null) {
36053
+ name = nil;
36054
+ };
36055
+ return name.$to_s();}, $$11.$$s = self, $$11.$$arity = 1, $$11)))));
36056
+ }, $Config_register_for$10.$$arity = -1)
35453
36057
  })($nesting[0], $nesting);
35454
36058
  (function($base, $parent_nesting) {
35455
36059
  var self = $module($base, 'Factory');
35456
36060
 
35457
- var $nesting = [self].concat($parent_nesting), $Factory_register$11, $Factory_for$13, $Factory_create$14, $Factory_registry$15;
36061
+ var $nesting = [self].concat($parent_nesting), $Factory_register$12, $Factory_for$14, $Factory_create$15, $Factory_registry$16;
35458
36062
 
35459
36063
 
35460
36064
 
35461
- Opal.def(self, '$register', $Factory_register$11 = function $$register(syntax_highlighter, $a) {
35462
- var $post_args, names, $$12, self = this;
36065
+ Opal.def(self, '$register', $Factory_register$12 = function $$register(syntax_highlighter, $a) {
36066
+ var $post_args, names, $$13, self = this;
35463
36067
 
35464
36068
 
35465
36069
 
35466
36070
  $post_args = Opal.slice.call(arguments, 1, arguments.length);
35467
36071
 
35468
36072
  names = $post_args;;
35469
- return $send(names, 'each', [], ($$12 = function(name){var self = $$12.$$s || this, $writer = nil;
36073
+ return $send(names, 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil;
35470
36074
 
35471
36075
 
35472
36076
 
@@ -35475,16 +36079,16 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35475
36079
  };
35476
36080
  $writer = [name, syntax_highlighter];
35477
36081
  $send(self.$registry(), '[]=', Opal.to_a($writer));
35478
- return $writer[$rb_minus($writer["length"], 1)];}, $$12.$$s = self, $$12.$$arity = 1, $$12));
35479
- }, $Factory_register$11.$$arity = -2);
36082
+ return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13));
36083
+ }, $Factory_register$12.$$arity = -2);
35480
36084
 
35481
- Opal.def(self, '$for', $Factory_for$13 = function(name) {
36085
+ Opal.def(self, '$for', $Factory_for$14 = function(name) {
35482
36086
  var self = this;
35483
36087
 
35484
36088
  return self.$registry()['$[]'](name)
35485
- }, $Factory_for$13.$$arity = 1);
36089
+ }, $Factory_for$14.$$arity = 1);
35486
36090
 
35487
- Opal.def(self, '$create', $Factory_create$14 = function $$create(name, backend, opts) {
36091
+ Opal.def(self, '$create', $Factory_create$15 = function $$create(name, backend, opts) {
35488
36092
  var self = this, syntax_hl = nil;
35489
36093
 
35490
36094
 
@@ -35508,23 +36112,25 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35508
36112
  } else {
35509
36113
  return nil
35510
36114
  };
35511
- }, $Factory_create$14.$$arity = -2);
35512
- self.$private((Opal.def(self, '$registry', $Factory_registry$15 = function $$registry() {
36115
+ }, $Factory_create$15.$$arity = -2);
36116
+ self.$private();
36117
+
36118
+ Opal.def(self, '$registry', $Factory_registry$16 = function $$registry() {
35513
36119
  var self = this;
35514
36120
 
35515
36121
  return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method")
35516
- }, $Factory_registry$15.$$arity = 0), nil) && 'registry');
36122
+ }, $Factory_registry$16.$$arity = 0);
35517
36123
  })($nesting[0], $nesting);
35518
36124
  (function($base, $super, $parent_nesting) {
35519
36125
  var self = $klass($base, $super, 'CustomFactory');
35520
36126
 
35521
- var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$16, $CustomFactory_registry$17;
36127
+ var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$17, $CustomFactory_registry$18;
35522
36128
 
35523
36129
  self.$$prototype.registry = nil;
35524
36130
 
35525
36131
  self.$include($$($nesting, 'Factory'));
35526
36132
 
35527
- Opal.def(self, '$initialize', $CustomFactory_initialize$16 = function $$initialize(seed_registry) {
36133
+ Opal.def(self, '$initialize', $CustomFactory_initialize$17 = function $$initialize(seed_registry) {
35528
36134
  var $a, self = this;
35529
36135
 
35530
36136
 
@@ -35533,28 +36139,29 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35533
36139
  seed_registry = nil;
35534
36140
  };
35535
36141
  return (self.registry = ($truthy($a = seed_registry) ? $a : $hash2([], {})));
35536
- }, $CustomFactory_initialize$16.$$arity = -1);
35537
- return self.$private((Opal.def(self, '$registry', $CustomFactory_registry$17 = function $$registry() {
36142
+ }, $CustomFactory_initialize$17.$$arity = -1);
36143
+ self.$private();
36144
+ return (Opal.def(self, '$registry', $CustomFactory_registry$18 = function $$registry() {
35538
36145
  var self = this;
35539
36146
 
35540
36147
  return self.registry
35541
- }, $CustomFactory_registry$17.$$arity = 0), nil) && 'registry');
36148
+ }, $CustomFactory_registry$18.$$arity = 0), nil) && 'registry';
35542
36149
  })($nesting[0], null, $nesting);
35543
36150
  (function($base, $parent_nesting) {
35544
36151
  var self = $module($base, 'DefaultFactory');
35545
36152
 
35546
- var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$18;
36153
+ var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$19;
35547
36154
 
35548
36155
 
35549
36156
  self.$include($$($nesting, 'Factory'));
35550
36157
  self.$private();
35551
36158
  (Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {})));
35552
36159
 
35553
- Opal.def(self, '$registry', $DefaultFactory_registry$18 = function $$registry() {
36160
+ Opal.def(self, '$registry', $DefaultFactory_registry$19 = function $$registry() {
35554
36161
  var $a, self = this;
35555
36162
 
35556
36163
  return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a)
35557
- }, $DefaultFactory_registry$18.$$arity = 0);
36164
+ }, $DefaultFactory_registry$19.$$arity = 0);
35558
36165
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
35559
36166
  } else {
35560
36167
  nil
@@ -35576,13 +36183,13 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35576
36183
  (function($base, $super, $parent_nesting) {
35577
36184
  var self = $klass($base, $super, 'Base');
35578
36185
 
35579
- var $nesting = [self].concat($parent_nesting), $Base_format$19;
36186
+ var $nesting = [self].concat($parent_nesting), $Base_format$20;
35580
36187
 
35581
36188
  self.$$prototype.pre_class = nil;
35582
36189
 
35583
36190
  self.$include($$($nesting, 'SyntaxHighlighter'));
35584
- return (Opal.def(self, '$format', $Base_format$19 = function $$format(node, lang, opts) {
35585
- var $$20, $$21, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil;
36191
+ return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) {
36192
+ var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil;
35586
36193
 
35587
36194
 
35588
36195
  class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) {
@@ -35599,7 +36206,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35599
36206
  return $hash2([], {})
35600
36207
  }; return nil; })();
35601
36208
  transform['$[]'](pre, code);
35602
- return "" + "<pre" + ($send(pre, 'map', [], ($$20 = function(k, v){var self = $$20.$$s || this;
36209
+ return "" + "<pre" + ($send(pre, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this;
35603
36210
 
35604
36211
 
35605
36212
 
@@ -35610,7 +36217,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35610
36217
  if (v == null) {
35611
36218
  v = nil;
35612
36219
  };
35613
- return "" + " " + (k) + "=\"" + (v) + "\"";}, $$20.$$s = self, $$20.$$arity = 2, $$20)).$join()) + "><code" + ($send(code, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this;
36220
+ return "" + " " + (k) + "=\"" + (v) + "\"";}, $$21.$$s = self, $$21.$$arity = 2, $$21)).$join()) + "><code" + ($send(code, 'map', [], ($$22 = function(k, v){var self = $$22.$$s || this;
35614
36221
 
35615
36222
 
35616
36223
 
@@ -35621,7 +36228,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35621
36228
  if (v == null) {
35622
36229
  v = nil;
35623
36230
  };
35624
- return "" + " " + (k) + "=\"" + (v) + "\"";}, $$21.$$s = self, $$21.$$arity = 2, $$21)).$join()) + ">" + (node.$content()) + "</code></pre>";
36231
+ return "" + " " + (k) + "=\"" + (v) + "\"";}, $$22.$$s = self, $$22.$$arity = 2, $$22)).$join()) + ">" + (node.$content()) + "</code></pre>";
35625
36232
  } else {
35626
36233
  return "" + "<pre class=\"" + (class_attr_val) + "\"><code" + ((function() {if ($truthy(lang)) {
35627
36234
  return "" + " data-lang=\"" + (lang) + "\""
@@ -35629,7 +36236,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
35629
36236
  return ""
35630
36237
  }; return nil; })()) + ">" + (node.$content()) + "</code></pre>"
35631
36238
  };
35632
- }, $Base_format$19.$$arity = 3), nil) && 'format';
36239
+ }, $Base_format$20.$$arity = 3), nil) && 'format';
35633
36240
  })($nesting[0], null, $nesting);
35634
36241
  self.$extend($$($nesting, 'DefaultFactory'));
35635
36242
  })($nesting[0], $nesting)
@@ -35964,9 +36571,14 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
35964
36571
  $writer[$rb_minus($writer["length"], 1)];;
35965
36572
  Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a[^>+]+|\/a)>/);
35966
36573
  Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/);
35967
- Opal.const_set($nesting[0], 'SvgPreambleRx', /^.*?(?=<svg\b)/m);
35968
- Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg[^>]*>/);
35969
- Opal.const_set($nesting[0], 'DimensionAttributeRx', /\s(?:width|height|style)=(["']).*?\1/);
36574
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
36575
+
36576
+ Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg\\b)"));
36577
+ Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg[^>]*>/);
36578
+ } else {
36579
+ nil
36580
+ };
36581
+ Opal.const_set($nesting[0], 'DimensionAttributeRx', new RegExp("" + "\\s(?:width|height|style)=([\"'])" + ($$($nesting, 'CC_ANY')) + "*?\\1"));
35970
36582
 
35971
36583
  Opal.def(self, '$initialize', $Html5Converter_initialize$1 = function $$initialize(backend, opts) {
35972
36584
  var self = this, syntax = nil;
@@ -36128,13 +36740,17 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
36128
36740
  if ($truthy(node['$attr?']("favicon"))) {
36129
36741
 
36130
36742
  if ($truthy((icon_href = node.$attr("favicon"))['$empty?']())) {
36131
- $a = ["favicon.ico", "image/x-icon"], (icon_href = $a[0]), (icon_type = $a[1]), $a
36132
- } else {
36133
- icon_type = (function() {if ((icon_ext = $$$('::', 'File').$extname(icon_href))['$=='](".ico")) {
36743
+
36744
+ icon_href = "favicon.ico";
36745
+ icon_type = "image/x-icon";
36746
+ } else if ($truthy((icon_ext = $$($nesting, 'Helpers').$extname(icon_href, nil)))) {
36747
+ icon_type = (function() {if (icon_ext['$=='](".ico")) {
36134
36748
  return "image/x-icon"
36135
36749
  } else {
36136
36750
  return "" + "image/" + (icon_ext.$slice(1, icon_ext.$length()))
36137
36751
  }; return nil; })()
36752
+ } else {
36753
+ icon_type = "image/x-icon"
36138
36754
  };
36139
36755
  result['$<<']("" + "<link rel=\"icon\" type=\"" + (icon_type) + "\" href=\"" + (icon_href) + "\"" + (slash) + ">");};
36140
36756
  result['$<<']("" + "<title>" + (node.$doctitle($hash2(["sanitize", "use_fallback"], {"sanitize": true, "use_fallback": true}))) + "</title>");
@@ -37800,10 +38416,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
37800
38416
  }, $Html5Converter_convert_inline_footnote$53.$$arity = 1);
37801
38417
 
37802
38418
  Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) {
37803
- var $a, $$55, $$56, $b, $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;
38419
+ var $a, $b, $$55, $$56, $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;
37804
38420
 
37805
38421
 
37806
- if ($truthy((($a = (type = node.$type())['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = node.$type())['$==']("icon")))) {
38422
+ if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) {
37807
38423
 
37808
38424
  class_attr_val = "" + "fa fa-" + (node.$target());
37809
38425
  $send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this;
@@ -38928,7 +39544,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
38928
39544
  return "(){0}"
38929
39545
  } else {
38930
39546
  return "(\\S+?)"
38931
- }; return nil; })()) + "\\[(|.*?[^\\\\])\\]")]), $send((($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b), '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
39547
+ }; return nil; })()) + "\\[(|" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]")]), $send((($b = $nesting[0].$$cvars['@@rx_cache']) == null ? nil : $b), '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
38932
39548
  }, $InlineMacroProcessor_resolve_regexp$46.$$arity = 2), nil) && 'resolve_regexp';
38933
39549
  })($nesting[0], $$($nesting, 'MacroProcessor'), $nesting);
38934
39550
  (function($base, $parent_nesting) {
@@ -40027,18 +40643,9 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40027
40643
  function $rb_minus(lhs, rhs) {
40028
40644
  return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
40029
40645
  }
40030
- function $rb_plus(lhs, rhs) {
40031
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
40032
- }
40033
- function $rb_ge(lhs, rhs) {
40034
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs);
40035
- }
40036
- function $rb_lt(lhs, rhs) {
40037
- return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
40038
- }
40039
- 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, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy, $hash = Opal.hash;
40646
+ 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, $send = Opal.send, $hash2 = Opal.hash2, $truthy = Opal.truthy;
40040
40647
 
40041
- Opal.add_stubs(['$require', '$==', '$tap', '$each', '$constants', '$const_get', '$downcase', '$to_s', '$[]=', '$-', '$upcase', '$[]', '$values', '$new', '$attr_reader', '$instance_variable_set', '$send', '$singleton_class', '$<<', '$define', '$dirname', '$absolute_path', '$__dir__', '$join', '$home', '$to_set', '$each_key', '$slice', '$length', '$merge', '$default=', '$to_a', '$empty?', '$escape', '$drop', '$insert', '$start', '$!=', '$logger', '$logger=', '$!', '$===', '$dup', '$partition', '$split', '$gsub', '$+', '$respond_to?', '$keys', '$raise', '$ancestors', '$class', '$mtime', '$path', '$basename', '$extname', '$read', '$rewind', '$record', '$parse', '$exception', '$message', '$set_backtrace', '$backtrace', '$stack_trace', '$stack_trace=', '$open', '$load', '$delete', '$key?', '$expand_path', '$attributes', '$outfilesuffix', '$pwd', '$>=', '$safe', '$normalize_system_path', '$mkdir_p', '$directory?', '$convert', '$write', '$<', '$attr?', '$basebackend?', '$attr', '$uriish?', '$include?', '$syntax_highlighter', '$write_stylesheet?', '$write_primary_stylesheet', '$instance', '$read_asset', '$file?', '$write_stylesheet']);
40648
+ Opal.add_stubs(['$require', '$==', '$tap', '$each', '$constants', '$const_get', '$downcase', '$to_s', '$[]=', '$-', '$upcase', '$[]', '$values', '$new', '$attr_reader', '$instance_variable_set', '$send', '$singleton_class', '$<<', '$define', '$dirname', '$absolute_path', '$__dir__', '$join', '$home', '$pwd', '$to_set', '$chr', '$each_key', '$slice', '$length', '$merge', '$default=', '$drop', '$insert']);
40042
40649
 
40043
40650
  self.$require("set");
40044
40651
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
@@ -40049,7 +40656,7 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40049
40656
  (function($base, $parent_nesting) {
40050
40657
  var self = $module($base, 'Asciidoctor');
40051
40658
 
40052
- var $nesting = [self].concat($parent_nesting), $a, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$12, $Asciidoctor$13, $writer = nil;
40659
+ var $nesting = [self].concat($parent_nesting), $a, $b, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$13, $writer = nil;
40053
40660
 
40054
40661
 
40055
40662
  Opal.const_set($nesting[0], 'RUBY_ENGINE_OPAL', Opal.const_set($nesting[0], 'RUBY_ENGINE', $$$('::', 'RUBY_ENGINE'))['$==']("opal"));
@@ -40138,7 +40745,16 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40138
40745
  };
40139
40746
  Opal.const_set($nesting[0], 'LIB_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "lib"));
40140
40747
  Opal.const_set($nesting[0], 'DATA_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "data"));
40141
- Opal.const_set($nesting[0], 'USER_HOME', $$$('::', 'Dir').$home());
40748
+ Opal.const_set($nesting[0], 'USER_HOME', (function() { try {
40749
+ return $$$('::', 'Dir').$home()
40750
+ } catch ($err) {
40751
+ if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
40752
+ try {
40753
+
40754
+ return ($truthy($b = $$$('::', 'ENV')['$[]']("HOME")) ? $b : $$$('::', 'Dir').$pwd());
40755
+ } finally { Opal.pop_exception() }
40756
+ } else { throw $err; }
40757
+ }})());
40142
40758
  Opal.const_set($nesting[0], 'LF', "\n");
40143
40759
  Opal.const_set($nesting[0], 'NULL', "\u0000");
40144
40760
  Opal.const_set($nesting[0], 'TAB', "\t");
@@ -40168,18 +40784,32 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40168
40784
  Opal.const_set($nesting[0], 'ASCIIDOC_EXTENSIONS', $hash2([".adoc", ".asciidoc", ".asc", ".ad", ".txt"], {".adoc": true, ".asciidoc": true, ".asc": true, ".ad": true, ".txt": true}));
40169
40785
  Opal.const_set($nesting[0], 'SETEXT_SECTION_LEVELS', $hash2(["=", "-", "~", "^", "+"], {"=": 0, "-": 1, "~": 2, "^": 3, "+": 4}));
40170
40786
  Opal.const_set($nesting[0], 'ADMONITION_STYLES', ["NOTE", "TIP", "IMPORTANT", "WARNING", "CAUTION"].$to_set());
40171
- Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', ["N", "T", "I", "W", "C"].$to_set());
40787
+ Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', $send($$$('::', 'Set').$new(), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8;
40788
+
40789
+
40790
+
40791
+ if (accum == null) {
40792
+ accum = nil;
40793
+ };
40794
+ return $send($$($nesting, 'ADMONITION_STYLES'), 'each', [], ($$8 = function(s){var self = $$8.$$s || this;
40795
+
40796
+
40797
+
40798
+ if (s == null) {
40799
+ s = nil;
40800
+ };
40801
+ return accum['$<<'](s.$chr());}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7)));
40172
40802
  Opal.const_set($nesting[0], 'PARAGRAPH_STYLES', ["comment", "example", "literal", "listing", "normal", "open", "pass", "quote", "sidebar", "source", "verse", "abstract", "partintro"].$to_set());
40173
40803
  Opal.const_set($nesting[0], 'VERBATIM_STYLES', ["literal", "listing", "source", "verse"].$to_set());
40174
40804
  Opal.const_set($nesting[0], 'DELIMITED_BLOCKS', $hash2(["--", "----", "....", "====", "****", "____", "++++", "|===", ",===", ":===", "!===", "////", "```"], {"--": ["open", ["comment", "example", "literal", "listing", "pass", "quote", "sidebar", "source", "verse", "admonition", "abstract", "partintro"].$to_set()], "----": ["listing", ["literal", "source"].$to_set()], "....": ["literal", ["listing", "source"].$to_set()], "====": ["example", ["admonition"].$to_set()], "****": ["sidebar", $$$('::', 'Set').$new()], "____": ["quote", ["verse"].$to_set()], "++++": ["pass", ["stem", "latexmath", "asciimath"].$to_set()], "|===": ["table", $$$('::', 'Set').$new()], ",===": ["table", $$$('::', 'Set').$new()], ":===": ["table", $$$('::', 'Set').$new()], "!===": ["table", $$$('::', 'Set').$new()], "////": ["comment", $$$('::', 'Set').$new()], "```": ["fenced_code", $$$('::', 'Set').$new()]}));
40175
- Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8;
40805
+ Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10;
40176
40806
 
40177
40807
 
40178
40808
 
40179
40809
  if (accum == null) {
40180
40810
  accum = nil;
40181
40811
  };
40182
- return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$8 = function(k){var self = $$8.$$s || this, $writer = nil;
40812
+ return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil;
40183
40813
 
40184
40814
 
40185
40815
 
@@ -40188,15 +40818,15 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40188
40818
  };
40189
40819
  $writer = [k.$slice(0, 2), true];
40190
40820
  $send(accum, '[]=', Opal.to_a($writer));
40191
- return $writer[$rb_minus($writer["length"], 1)];}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7)));
40192
- Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10;
40821
+ return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9)));
40822
+ Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$11 = function(accum){var self = $Asciidoctor$11.$$s || this, $$12;
40193
40823
 
40194
40824
 
40195
40825
 
40196
40826
  if (accum == null) {
40197
40827
  accum = nil;
40198
40828
  };
40199
- return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil;
40829
+ return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$12 = function(k){var self = $$12.$$s || this, $writer = nil;
40200
40830
 
40201
40831
 
40202
40832
 
@@ -40210,152 +40840,34 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40210
40840
  return $writer[$rb_minus($writer["length"], 1)];
40211
40841
  } else {
40212
40842
  return nil
40213
- };}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9)));
40843
+ };}, $$12.$$s = self, $$12.$$arity = 1, $$12));}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 1, $Asciidoctor$11)));
40214
40844
  Opal.const_set($nesting[0], 'CAPTION_ATTR_NAMES', $hash2(["example", "figure", "listing", "table"], {"example": "example-caption", "figure": "figure-caption", "listing": "listing-caption", "table": "table-caption"}));
40215
40845
  Opal.const_set($nesting[0], 'LAYOUT_BREAK_CHARS', $hash2(["'", "<"], {"'": "thematic_break", "<": "page_break"}));
40216
- Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"}));
40217
- Opal.const_set($nesting[0], 'HYBRID_LAYOUT_BREAK_CHARS', $$($nesting, 'LAYOUT_BREAK_CHARS').$merge($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS')));
40218
- Opal.const_set($nesting[0], 'NESTABLE_LIST_CONTEXTS', ["ulist", "olist", "dlist"]);
40219
- Opal.const_set($nesting[0], 'ORDERED_LIST_STYLES', ["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"]);
40220
- Opal.const_set($nesting[0], 'ORDERED_LIST_KEYWORDS', $hash2(["loweralpha", "lowerroman", "upperalpha", "upperroman"], {"loweralpha": "a", "lowerroman": "i", "upperalpha": "A", "upperroman": "I"}));
40221
- Opal.const_set($nesting[0], 'ATTR_REF_HEAD', "{");
40222
- Opal.const_set($nesting[0], 'LIST_CONTINUATION', "+");
40223
- Opal.const_set($nesting[0], 'HARD_LINE_BREAK', " +");
40224
- Opal.const_set($nesting[0], 'LINE_CONTINUATION', " \\");
40225
- Opal.const_set($nesting[0], 'LINE_CONTINUATION_LEGACY', " +");
40226
- Opal.const_set($nesting[0], 'BLOCK_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\[", "\\]"]}));
40227
- Opal.const_set($nesting[0], 'INLINE_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]}));
40228
-
40229
- $writer = ["asciimath"];
40230
- $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer));
40231
- $writer[$rb_minus($writer["length"], 1)];;
40232
- Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0");
40233
- Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.15.6");
40234
- Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.5");
40235
- Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]);
40236
- if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40237
- } else {
40238
- nil
40239
- };
40240
- Opal.const_set($nesting[0], 'AuthorInfoLineRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*)(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "\\-'.]*))?(?: +<([^>]+)>)?$"));
40241
- Opal.const_set($nesting[0], 'AuthorDelimiterRx', /;(?: |$)/);
40242
- Opal.const_set($nesting[0], 'RevisionInfoLineRx', new RegExp("" + "^(?:[^\\d{]*(" + ($$($nesting, 'CC_ANY')) + "*?),)? *(?!:)(" + ($$($nesting, 'CC_ANY')) + "*?)(?: *(?!^),?: *(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
40243
- Opal.const_set($nesting[0], 'ManpageTitleVolnumRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *\\( *(" + ($$($nesting, 'CC_ANY')) + "+?) *\\)$"));
40244
- Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
40245
- Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
40246
- Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
40247
- Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
40248
- Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
40249
- Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
40250
- Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^-" + ($$($nesting, 'CC_WORD')) + "]"));
40251
- if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40252
- Opal.const_set($nesting[0], 'AttributeEntryPassMacroRx', new RegExp("" + "^pass:([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*)\\]$"))
40253
- } else {
40254
- nil
40255
- };
40256
- Opal.const_set($nesting[0], 'AttributeReferenceRx', new RegExp("" + "(\\\\)?\\{(" + ($$($nesting, 'CG_WORD')) + "[-" + ($$($nesting, 'CC_WORD')) + "]*|(set|counter2?):" + ($$($nesting, 'CC_ANY')) + "+?)(\\\\)?\\}"));
40257
- Opal.const_set($nesting[0], 'BlockAnchorRx', new RegExp("" + "^\\[\\[(?:|([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?)\\]\\]$"));
40258
- Opal.const_set($nesting[0], 'BlockAttributeListRx', new RegExp("" + "^\\[(|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*)\\]$"));
40259
- Opal.const_set($nesting[0], 'BlockAttributeLineRx', new RegExp("" + "^\\[(?:|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*|\\[(?:|[" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*(?:, *" + ($$($nesting, 'CC_ANY')) + "+)?)\\])\\]$"));
40260
- Opal.const_set($nesting[0], 'BlockTitleRx', new RegExp("" + "^\\.(\\.?[^ \\t.]" + ($$($nesting, 'CC_ANY')) + "*)$"));
40261
- Opal.const_set($nesting[0], 'AdmonitionParagraphRx', new RegExp("" + "^(" + ($$($nesting, 'ADMONITION_STYLES').$to_a().$join("|")) + "):[ \\t]+"));
40262
- Opal.const_set($nesting[0], 'LiteralParagraphRx', new RegExp("" + "^([ \\t]+" + ($$($nesting, 'CC_ANY')) + "*)$"));
40263
- Opal.const_set($nesting[0], 'AtxSectionTitleRx', new RegExp("" + "^(=={0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
40264
- Opal.const_set($nesting[0], 'ExtAtxSectionTitleRx', new RegExp("" + "^(=={0,5}|#\\\#{0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
40265
- Opal.const_set($nesting[0], 'SetextSectionTitleRx', new RegExp("" + "^((?!\\.)" + ($$($nesting, 'CC_ANY')) + "*?" + ($$($nesting, 'CG_ALNUM')) + ($$($nesting, 'CC_ANY')) + "*)$"));
40266
- Opal.const_set($nesting[0], 'InlineSectionAnchorRx', new RegExp("" + " (\\\\)?\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?\\]\\]$"));
40267
- Opal.const_set($nesting[0], 'InvalidSectionIdCharsRx', new RegExp("" + "<[^>]+>|&(?:[a-z][a-z]+\\d{0,2}|#\\d\\d\\d{0,4}|#x[\\da-f][\\da-f][\\da-f]{0,3});|[^ " + ($$($nesting, 'CC_WORD')) + "\\-.]+?"));
40268
- Opal.const_set($nesting[0], 'SectionLevelStyleRx', /^sect\d$/);
40269
- Opal.const_set($nesting[0], 'AnyListRx', new RegExp("" + "^(?:[ \\t]*(?:-|\\*\\**|\\.\\.*|\\u2022|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]|(?!//[^/])[ \\t]*[^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?(?::::{0,2}|;;)(?:$|[ \\t])|<?\\d+>[ \\t])"));
40270
- Opal.const_set($nesting[0], 'UnorderedListRx', new RegExp("" + "^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
40271
- Opal.const_set($nesting[0], 'OrderedListRx', new RegExp("" + "^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
40272
- Opal.const_set($nesting[0], 'OrderedListMarkerRxMap', $hash2(["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"], {"arabic": /\d+\./, "loweralpha": /[a-z]\./, "lowerroman": /[ivx]+\)/, "upperalpha": /[A-Z]\./, "upperroman": /[IVX]+\)/}));
40273
- Opal.const_set($nesting[0], 'DescriptionListRx', new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(:::{0,2}|;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"));
40274
- Opal.const_set($nesting[0], 'DescriptionListSiblingRx', $hash2(["::", ":::", "::::", ";;"], {"::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ":::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(:::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), "::::": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?[^:]|[^ \\t:])(::::)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"), ";;": new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)")}));
40275
- Opal.const_set($nesting[0], 'CalloutListRx', new RegExp("" + "^<(\\d+|\\.)>[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
40276
- Opal.const_set($nesting[0], 'CalloutExtractRx', /((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/);
40277
- Opal.const_set($nesting[0], 'CalloutExtractRxt', "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)");
40278
- Opal.const_set($nesting[0], 'CalloutExtractRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$11 = function(h, k){var self = $Asciidoctor$11.$$s || this;
40279
-
40280
-
40281
-
40282
- if (h == null) {
40283
- h = nil;
40284
- };
40285
-
40286
- if (k == null) {
40287
- k = nil;
40288
- };
40289
- $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
40290
- return ""
40291
- } else {
40292
- return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
40293
- }; return nil; })()) + ")?" + ($$($nesting, 'CalloutExtractRxt')))];
40294
- $send(h, '[]=', Opal.to_a($writer));
40295
- return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 2, $Asciidoctor$11)));
40296
- Opal.const_set($nesting[0], 'CalloutScanRx', new RegExp("" + "\\\\?<!?(|--)(\\d+|\\.)\\1>(?=(?: ?\\\\?<!?\\1(?:\\d+|\\.)\\1>)*" + ($$($nesting, 'CC_EOL')) + ")"));
40297
- Opal.const_set($nesting[0], 'CalloutSourceRx', new RegExp("" + "((?://|#|--|;;) ?)?(\\\\)?&lt;!?(|--)(\\d+|\\.)\\3&gt;(?=(?: ?\\\\?&lt;!?\\3(?:\\d+|\\.)\\3&gt;)*" + ($$($nesting, 'CC_EOL')) + ")"));
40298
- Opal.const_set($nesting[0], 'CalloutSourceRxt', "" + "(\\\\)?&lt;()(\\d+|\\.)&gt;(?=(?: ?\\\\?&lt;(?:\\d+|\\.)&gt;)*" + ($$($nesting, 'CC_EOL')) + ")");
40299
- Opal.const_set($nesting[0], 'CalloutSourceRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$12 = function(h, k){var self = $Asciidoctor$12.$$s || this;
40300
-
40301
-
40302
-
40303
- if (h == null) {
40304
- h = nil;
40305
- };
40306
-
40307
- if (k == null) {
40308
- k = nil;
40309
- };
40310
- $writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
40311
- return ""
40312
- } else {
40313
- return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
40314
- }; return nil; })()) + ")?" + ($$($nesting, 'CalloutSourceRxt')))];
40315
- $send(h, '[]=', Opal.to_a($writer));
40316
- return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$12.$$s = self, $Asciidoctor$12.$$arity = 2, $Asciidoctor$12)));
40317
- Opal.const_set($nesting[0], 'ListRxMap', $hash2(["ulist", "olist", "dlist", "colist"], {"ulist": $$($nesting, 'UnorderedListRx'), "olist": $$($nesting, 'OrderedListRx'), "dlist": $$($nesting, 'DescriptionListRx'), "colist": $$($nesting, 'CalloutListRx')}));
40318
- Opal.const_set($nesting[0], 'ColumnSpecRx', /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/);
40319
- Opal.const_set($nesting[0], 'CellSpecStartRx', /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
40320
- Opal.const_set($nesting[0], 'CellSpecEndRx', /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
40321
- Opal.const_set($nesting[0], 'CustomBlockMacroRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[-" + ($$($nesting, 'CC_WORD')) + "]*)::(|\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
40322
- Opal.const_set($nesting[0], 'BlockMediaMacroRx', new RegExp("" + "^(image|video|audio)::(\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
40323
- Opal.const_set($nesting[0], 'BlockTocMacroRx', new RegExp("" + "^toc::\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
40324
- Opal.const_set($nesting[0], 'InlineAnchorRx', new RegExp("" + "(\\\\)?(?:\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\]))"));
40325
- Opal.const_set($nesting[0], 'InlineAnchorScanRx', new RegExp("" + "(?:^|[^\\\\\\[])\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]|(?:^|[^\\\\])anchor:([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)\\[(?:\\]|(" + ($$($nesting, 'CC_ANY')) + "*?[^\\\\])\\])"));
40326
- Opal.const_set($nesting[0], 'LeadingInlineAnchorRx', new RegExp("" + "^\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]"));
40327
- Opal.const_set($nesting[0], 'InlineBiblioAnchorRx', new RegExp("" + "^\\[\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]\\]"));
40328
- Opal.const_set($nesting[0], 'InlineEmailRx', new RegExp("" + "([\\\\>:/])?" + ($$($nesting, 'CG_WORD')) + "(?:&amp;|[" + ($$($nesting, 'CC_WORD')) + ".%+-])*@" + ($$($nesting, 'CG_ALNUM')) + "[" + ($$($nesting, 'CC_ALNUM')) + "_.-]*\\.[a-zA-Z]{2,5}\\b"));
40329
- Opal.const_set($nesting[0], 'InlineFootnoteMacroRx', new RegExp("" + "\\\\?footnote(?:(ref):|:([\\w-]+)?)\\[(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
40330
- Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
40331
- Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
40332
- Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
40333
- Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|&lt;|[>\\(\\)\\[\\];])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
40334
- Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
40335
- Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[-" + ($$($nesting, 'CC_WORD')) + "]*$"));
40336
- Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
40337
- Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])?\\]", 'm'));
40338
- Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""));
40339
- 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')]));
40340
- Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
40341
- Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
40342
- 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'));
40846
+ Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"}));
40847
+ Opal.const_set($nesting[0], 'HYBRID_LAYOUT_BREAK_CHARS', $$($nesting, 'LAYOUT_BREAK_CHARS').$merge($$($nesting, 'MARKDOWN_THEMATIC_BREAK_CHARS')));
40848
+ Opal.const_set($nesting[0], 'NESTABLE_LIST_CONTEXTS', ["ulist", "olist", "dlist"]);
40849
+ Opal.const_set($nesting[0], 'ORDERED_LIST_STYLES', ["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"]);
40850
+ Opal.const_set($nesting[0], 'ORDERED_LIST_KEYWORDS', $hash2(["loweralpha", "lowerroman", "upperalpha", "upperroman"], {"loweralpha": "a", "lowerroman": "i", "upperalpha": "A", "upperroman": "I"}));
40851
+ Opal.const_set($nesting[0], 'ATTR_REF_HEAD', "{");
40852
+ Opal.const_set($nesting[0], 'LIST_CONTINUATION', "+");
40853
+ Opal.const_set($nesting[0], 'HARD_LINE_BREAK', " +");
40854
+ Opal.const_set($nesting[0], 'LINE_CONTINUATION', " \\");
40855
+ Opal.const_set($nesting[0], 'LINE_CONTINUATION_LEGACY', " +");
40856
+ Opal.const_set($nesting[0], 'BLOCK_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\[", "\\]"]}));
40857
+ Opal.const_set($nesting[0], 'INLINE_MATH_DELIMITERS', $hash2(["asciimath", "latexmath"], {"asciimath": ["\\$", "\\$"], "latexmath": ["\\(", "\\)"]}));
40858
+
40859
+ $writer = ["asciimath"];
40860
+ $send(Opal.const_set($nesting[0], 'STEM_TYPE_ALIASES', $hash2(["latexmath", "latex", "tex"], {"latexmath": "latexmath", "latex": "latexmath", "tex": "latexmath"})), 'default=', Opal.to_a($writer));
40861
+ $writer[$rb_minus($writer["length"], 1)];;
40862
+ Opal.const_set($nesting[0], 'FONT_AWESOME_VERSION', "4.7.0");
40863
+ Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.15.6");
40864
+ Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.5");
40865
+ Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]);
40866
+ Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "&#43;", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": "&#160;", "deg": "&#176;", "zwsp": "&#8203;", "quot": "&#34;", "apos": "&#39;", "lsquo": "&#8216;", "rsquo": "&#8217;", "ldquo": "&#8220;", "rdquo": "&#8221;", "wj": "&#8288;", "brvbar": "&#166;", "pp": "&#43;&#43;", "cpp": "C&#43;&#43;", "amp": "&", "lt": "<", "gt": ">"}));
40343
40867
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40344
- Opal.const_set($nesting[0], 'HardLineBreakRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "*) \\+$", 'm'))
40345
40868
  } else {
40346
40869
  nil
40347
40870
  };
40348
- Opal.const_set($nesting[0], 'MarkdownThematicBreakRx', /^ {0,3}([-*_])( *)\1\2\1$/);
40349
- Opal.const_set($nesting[0], 'ExtLayoutBreakRx', /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/);
40350
- Opal.const_set($nesting[0], 'BlankLineRx', /\n{2,}/);
40351
- Opal.const_set($nesting[0], 'EscapedSpaceRx', /\\([ \t\n])/);
40352
- Opal.const_set($nesting[0], 'ReplaceableTextRx', /[&']|--|\.\.\.|\([CRT]M?\)/);
40353
- Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
40354
- Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
40355
- Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
40356
- Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
40357
- Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
40358
- Opal.const_set($nesting[0], 'INTRINSIC_ATTRIBUTES', $hash2(["startsb", "endsb", "vbar", "caret", "asterisk", "tilde", "plus", "backslash", "backtick", "blank", "empty", "sp", "two-colons", "two-semicolons", "nbsp", "deg", "zwsp", "quot", "apos", "lsquo", "rsquo", "ldquo", "rdquo", "wj", "brvbar", "pp", "cpp", "amp", "lt", "gt"], {"startsb": "[", "endsb": "]", "vbar": "|", "caret": "^", "asterisk": "*", "tilde": "~", "plus": "&#43;", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": "&#160;", "deg": "&#176;", "zwsp": "&#8203;", "quot": "&#34;", "apos": "&#39;", "lsquo": "&#8216;", "rsquo": "&#8217;", "ldquo": "&#8220;", "rdquo": "&#8221;", "wj": "&#8288;", "brvbar": "&#166;", "pp": "&#43;&#43;", "cpp": "C&#43;&#43;", "amp": "&", "lt": "<", "gt": ">"}));
40359
40871
  Opal.const_set($nesting[0], 'QUOTE_SUBS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$13 = function(accum){var self = $Asciidoctor$13.$$s || this, normal = nil, compat = nil;
40360
40872
 
40361
40873
 
@@ -40389,386 +40901,10 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40389
40901
  $writer[$rb_minus($writer["length"], 1)];;
40390
40902
  return compat.$insert(3, ["emphasis", "constrained", new RegExp("" + "(^|[^" + ($$($nesting, 'CC_WORD')) + ";:}])(?:\\[([^\\]]+)\\])?'(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)'(?!" + ($$($nesting, 'CG_WORD')) + ")", 'm')]);}, $Asciidoctor$13.$$s = self, $Asciidoctor$13.$$arity = 1, $Asciidoctor$13)));
40391
40903
  Opal.const_set($nesting[0], 'REPLACEMENTS', [[/\\?\(C\)/, "&#169;", "none"], [/\\?\(R\)/, "&#174;", "none"], [/\\?\(TM\)/, "&#8482;", "none"], [/(^|\n| |\\)--( |\n|$)/, "&#8201;&#8212;&#8201;", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "&#8212;&#8203;", "leading"], [/\\?\.\.\./, "&#8230;&#8203;", "none"], [/\\?`'/, "&#8217;", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_ALNUM')) + ")\\\\?'(?=" + ($$($nesting, 'CG_ALPHA')) + ")"), "&#8217;", "leading"], [/\\?-&gt;/, "&#8594;", "none"], [/\\?=&gt;/, "&#8658;", "none"], [/\\?&lt;-/, "&#8592;", "none"], [/\\?&lt;=/, "&#8656;", "none"], [/\\?(&)amp;((?:[a-zA-Z][a-zA-Z]+\d{0,2}|#\d\d\d{0,4}|#x[\da-fA-F][\da-fA-F][\da-fA-F]{0,3});)/, "", "bounding"]]);
40392
- (function(self, $parent_nesting) {
40393
- var $nesting = [self].concat($parent_nesting), $load$14, $load_file$21, $convert$23, $convert_file$24;
40394
-
40395
-
40396
-
40397
- Opal.def(self, '$load', $load$14 = function $$load(input, options) {
40398
- var $a, $b, $c, $d, $$15, $$17, $$19, self = this, timings = nil, logger = nil, $writer = nil, attrs = nil, input_path = nil, source = nil, doc = nil, ex = nil, context = nil, wrapped_ex = nil;
40399
-
40400
-
40401
-
40402
- if (options == null) {
40403
- options = $hash2([], {});
40404
- };
40405
- try {
40406
-
40407
- options = options.$merge();
40408
- if ($truthy((timings = options['$[]']("timings")))) {
40409
- timings.$start("read")};
40410
- if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
40411
-
40412
- $writer = [logger];
40413
- $send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
40414
- $writer[$rb_minus($writer["length"], 1)];};
40415
- if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
40416
- attrs = $hash2([], {})
40417
- } else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
40418
- attrs = attrs.$merge()
40419
- } else if ($truthy(($truthy($a = (($d = $$$('::', 'Java', 'skip_raise')) && ($c = $$$($d, 'JavaUtil', 'skip_raise')) && ($b = $$$($c, 'Map', 'skip_raise')) ? 'constant' : nil)) ? $$$($$$($$$('::', 'Java'), 'JavaUtil'), 'Map')['$==='](attrs) : $a))) {
40420
- attrs = attrs.$dup()
40421
- } else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
40422
- attrs = $send($hash2([], {}), 'tap', [], ($$15 = function(accum){var self = $$15.$$s || this, $$16;
40423
-
40424
-
40425
-
40426
- if (accum == null) {
40427
- accum = nil;
40428
- };
40429
- return $send(attrs, 'each', [], ($$16 = function(entry){var self = $$16.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
40430
-
40431
-
40432
-
40433
- if (entry == null) {
40434
- entry = nil;
40435
- };
40436
- $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f;
40437
-
40438
- $writer = [k, v];
40439
- $send(accum, '[]=', Opal.to_a($writer));
40440
- return $writer[$rb_minus($writer["length"], 1)];;}, $$16.$$s = self, $$16.$$arity = 1, $$16));}, $$15.$$s = self, $$15.$$arity = 1, $$15))
40441
- } else if ($truthy($$$('::', 'String')['$==='](attrs))) {
40442
- attrs = $send($hash2([], {}), 'tap', [], ($$17 = function(accum){var self = $$17.$$s || this, $$18;
40443
-
40444
-
40445
-
40446
- if (accum == null) {
40447
- accum = nil;
40448
- };
40449
- return $send(attrs.$gsub($$($nesting, 'SpaceDelimiterRx'), $rb_plus("\\1", $$($nesting, 'NULL'))).$gsub($$($nesting, 'EscapedSpaceRx'), "\\1").$split($$($nesting, 'NULL')), 'each', [], ($$18 = function(entry){var self = $$18.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
40450
-
40451
-
40452
-
40453
- if (entry == null) {
40454
- entry = nil;
40455
- };
40456
- $f = entry.$partition("="), $e = Opal.to_ary($f), (k = ($e[0] == null ? nil : $e[0])), (_ = ($e[1] == null ? nil : $e[1])), (v = ($e[2] == null ? nil : $e[2])), $f;
40457
-
40458
- $writer = [k, v];
40459
- $send(accum, '[]=', Opal.to_a($writer));
40460
- return $writer[$rb_minus($writer["length"], 1)];;}, $$18.$$s = self, $$18.$$arity = 1, $$18));}, $$17.$$s = self, $$17.$$arity = 1, $$17))
40461
- } else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
40462
- attrs = $send($hash2([], {}), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20;
40463
-
40464
-
40465
-
40466
- if (accum == null) {
40467
- accum = nil;
40468
- };
40469
- return $send(attrs.$keys(), 'each', [], ($$20 = function(k){var self = $$20.$$s || this;
40470
-
40471
-
40472
-
40473
- if (k == null) {
40474
- k = nil;
40475
- };
40476
- $writer = [k, attrs['$[]'](k)];
40477
- $send(accum, '[]=', Opal.to_a($writer));
40478
- return $writer[$rb_minus($writer["length"], 1)];}, $$20.$$s = self, $$20.$$arity = 1, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))
40479
- } else {
40480
- self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
40481
- };
40482
- if ($truthy($$$('::', 'File')['$==='](input))) {
40483
-
40484
-
40485
- $writer = ["input_mtime", input.$mtime()];
40486
- $send(options, '[]=', Opal.to_a($writer));
40487
- $writer[$rb_minus($writer["length"], 1)];;
40488
-
40489
- $writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
40490
- $send(attrs, '[]=', Opal.to_a($writer));
40491
- $writer[$rb_minus($writer["length"], 1)];;
40492
-
40493
- $writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
40494
- $send(attrs, '[]=', Opal.to_a($writer));
40495
- $writer[$rb_minus($writer["length"], 1)];;
40496
-
40497
- $writer = ["docname", $$($nesting, 'Helpers').$basename(input_path, (($writer = ["docfilesuffix", $$$('::', 'File').$extname(input_path)]), $send(attrs, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]))];
40498
- $send(attrs, '[]=', Opal.to_a($writer));
40499
- $writer[$rb_minus($writer["length"], 1)];;
40500
- source = input.$read();
40501
- } else if ($truthy(input['$respond_to?']("read"))) {
40502
-
40503
- try {
40504
- input.$rewind()
40505
- } catch ($err) {
40506
- if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
40507
- try {
40508
- nil
40509
- } finally { Opal.pop_exception() }
40510
- } else { throw $err; }
40511
- };
40512
- source = input.$read();
40513
- } else if ($truthy($$$('::', 'String')['$==='](input))) {
40514
- source = input
40515
- } else if ($truthy($$$('::', 'Array')['$==='](input))) {
40516
- source = input.$drop(0)
40517
- } else if ($truthy(input)) {
40518
- self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
40519
- if ($truthy(timings)) {
40520
-
40521
- timings.$record("read");
40522
- timings.$start("parse");};
40523
-
40524
- $writer = ["attributes", attrs];
40525
- $send(options, '[]=', Opal.to_a($writer));
40526
- $writer[$rb_minus($writer["length"], 1)];;
40527
- doc = (function() {if (options['$[]']("parse")['$=='](false)) {
40528
-
40529
- return $$($nesting, 'Document').$new(source, options);
40530
- } else {
40531
- return $$($nesting, 'Document').$new(source, options).$parse()
40532
- }; return nil; })();
40533
- if ($truthy(timings)) {
40534
- timings.$record("parse")};
40535
- return doc;
40536
- } catch ($err) {
40537
- if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
40538
- try {
40539
-
40540
-
40541
- try {
40542
-
40543
- context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
40544
- if ($truthy(ex['$respond_to?']("exception"))) {
40545
-
40546
- wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
40547
- wrapped_ex.$set_backtrace(ex.$backtrace());
40548
- wrapped_ex.stack = ex.stack;
40549
- } else {
40550
-
40551
- wrapped_ex = ex.$class().$new(context, ex);
40552
-
40553
- $writer = [ex.$stack_trace()];
40554
- $send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
40555
- $writer[$rb_minus($writer["length"], 1)];;
40556
- };
40557
- } catch ($err) {
40558
- if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
40559
- try {
40560
- wrapped_ex = ex
40561
- } finally { Opal.pop_exception() }
40562
- } else { throw $err; }
40563
- };;
40564
- return self.$raise(wrapped_ex);
40565
- } finally { Opal.pop_exception() }
40566
- } else { throw $err; }
40567
- };
40568
- }, $load$14.$$arity = -2);
40569
-
40570
- Opal.def(self, '$load_file', $load_file$21 = function $$load_file(filename, options) {
40571
- var $$22, self = this;
40572
-
40573
-
40574
-
40575
- if (options == null) {
40576
- options = $hash2([], {});
40577
- };
40578
- return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$22 = function(file){var self = $$22.$$s || this;
40579
-
40580
-
40581
-
40582
- if (file == null) {
40583
- file = nil;
40584
- };
40585
- return self.$load(file, options);}, $$22.$$s = self, $$22.$$arity = 1, $$22));
40586
- }, $load_file$21.$$arity = -2);
40587
-
40588
- Opal.def(self, '$convert', $convert$23 = function $$convert(input, options) {
40589
- var $a, $b, $c, $d, $e, self = this, to_dir = nil, mkdirs = nil, $case = nil, to_file = nil, write_to_target = nil, sibling_path = nil, stream_output = nil, $writer = nil, outdir = nil, doc = nil, outfile = nil, working_dir = nil, jail = nil, output = nil, stylesdir = nil, stylesheet = nil, copy_asciidoctor_stylesheet = nil, copy_user_stylesheet = nil, copy_syntax_hl_stylesheet = nil, syntax_hl = nil, stylesoutdir = nil, stylesheet_src = nil, stylesheet_dest = nil, stylesheet_data = nil;
40590
-
40591
-
40592
-
40593
- if (options == null) {
40594
- options = $hash2([], {});
40595
- };
40596
- (options = options.$merge()).$delete("parse");
40597
- to_dir = options.$delete("to_dir");
40598
- mkdirs = options.$delete("mkdirs");
40599
- $case = (to_file = options.$delete("to_file"));
40600
- if (true['$===']($case) || nil['$===']($case)) {
40601
- if ($truthy((write_to_target = to_dir))) {
40602
- } else if ($truthy($$$('::', 'File')['$==='](input))) {
40603
- sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
40604
- to_file = nil;}
40605
- else if (false['$===']($case)) {to_file = nil}
40606
- else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
40607
- else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
40608
- } else {
40609
-
40610
- $writer = ["to_file", (write_to_target = to_file)];
40611
- $send(options, '[]=', Opal.to_a($writer));
40612
- $writer[$rb_minus($writer["length"], 1)];
40613
- }};
40614
- if ($truthy(options['$key?']("standalone"))) {
40615
- } else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
40616
-
40617
- $writer = ["standalone", true];
40618
- $send(options, '[]=', Opal.to_a($writer));
40619
- $writer[$rb_minus($writer["length"], 1)];
40620
- } else if ($truthy(options['$key?']("header_footer"))) {
40621
-
40622
- $writer = ["standalone", options['$[]']("header_footer")];
40623
- $send(options, '[]=', Opal.to_a($writer));
40624
- $writer[$rb_minus($writer["length"], 1)];};
40625
- if ($truthy(sibling_path)) {
40626
-
40627
- $writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
40628
- $send(options, '[]=', Opal.to_a($writer));
40629
- $writer[$rb_minus($writer["length"], 1)];
40630
- } else if ($truthy(write_to_target)) {
40631
- if ($truthy(to_dir)) {
40632
- if ($truthy(to_file)) {
40633
-
40634
- $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path($$$('::', 'File').$join(to_dir, to_file)))];
40635
- $send(options, '[]=', Opal.to_a($writer));
40636
- $writer[$rb_minus($writer["length"], 1)];
40637
- } else {
40638
-
40639
- $writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
40640
- $send(options, '[]=', Opal.to_a($writer));
40641
- $writer[$rb_minus($writer["length"], 1)];
40642
- }
40643
- } else if ($truthy(to_file)) {
40644
-
40645
- $writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
40646
- $send(options, '[]=', Opal.to_a($writer));
40647
- $writer[$rb_minus($writer["length"], 1)];}};
40648
- doc = self.$load(input, options);
40649
- if ($truthy(sibling_path)) {
40650
-
40651
- outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
40652
- if (outfile['$=='](sibling_path)) {
40653
- self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
40654
- } else if ($truthy(write_to_target)) {
40655
-
40656
- working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
40657
-
40658
- return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
40659
- } else {
40660
- return $$$('::', 'Dir').$pwd()
40661
- }; return nil; })();
40662
- jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
40663
- return working_dir
40664
- } else {
40665
- return nil
40666
- }; return nil; })();
40667
- if ($truthy(to_dir)) {
40668
-
40669
- outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
40670
- if ($truthy(to_file)) {
40671
-
40672
- outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
40673
- outdir = $$$('::', 'File').$dirname(outfile);
40674
- } else {
40675
- outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
40676
- };
40677
- } else if ($truthy(to_file)) {
40678
-
40679
- outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
40680
- outdir = $$$('::', 'File').$dirname(outfile);};
40681
- if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
40682
- self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
40683
- if ($truthy(mkdirs)) {
40684
- $$($nesting, 'Helpers').$mkdir_p(outdir)
40685
- } else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
40686
- } else {
40687
- self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
40688
- };
40689
- } else {
40690
-
40691
- outfile = to_file;
40692
- outdir = nil;
40693
- };
40694
- if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
40695
- output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
40696
- } else {
40697
- output = doc.$convert()
40698
- };
40699
- if ($truthy(outfile)) {
40700
-
40701
- doc.$write(output, outfile);
40702
- if ($truthy(($truthy($a = ($truthy($b = ($truthy($c = ($truthy($d = ($truthy($e = stream_output['$!']()) ? $rb_lt(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE')) : $e)) ? doc['$attr?']("linkcss") : $d)) ? doc['$attr?']("copycss") : $c)) ? doc['$basebackend?']("html") : $b)) ? ($truthy($b = (stylesdir = doc.$attr("stylesdir"))) ? $$($nesting, 'Helpers')['$uriish?'](stylesdir) : $b)['$!']() : $a))) {
40703
-
40704
- if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
40705
- if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
40706
- copy_asciidoctor_stylesheet = true
40707
- } else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
40708
- copy_user_stylesheet = true}};
40709
- copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
40710
- if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
40711
-
40712
- stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
40713
- return outdir
40714
- } else {
40715
- return nil
40716
- }; return nil; })());
40717
- if ($truthy(mkdirs)) {
40718
- $$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
40719
- } else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
40720
- } else {
40721
- self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
40722
- };
40723
- if ($truthy(copy_asciidoctor_stylesheet)) {
40724
- $$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
40725
- } else if ($truthy(copy_user_stylesheet)) {
40726
-
40727
- if ($truthy((stylesheet_src = doc.$attr("copycss"))['$empty?']())) {
40728
- stylesheet_src = doc.$normalize_system_path(stylesheet)
40729
- } else {
40730
- stylesheet_src = doc.$normalize_system_path(stylesheet_src)
40731
- };
40732
- stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
40733
- return outdir
40734
- } else {
40735
- return nil
40736
- }; return nil; })());
40737
- if ($truthy(($truthy($a = stylesheet_src['$!='](stylesheet_dest)) ? (stylesheet_data = doc.$read_asset(stylesheet_src, $hash2(["warn_on_failure", "label"], {"warn_on_failure": $$$('::', 'File')['$file?'](stylesheet_dest)['$!'](), "label": "stylesheet"}))) : $a))) {
40738
- $$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))};};
40739
- if ($truthy(copy_syntax_hl_stylesheet)) {
40740
- syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
40741
- return doc;
40742
- } else {
40743
- return output
40744
- };
40745
- }, $convert$23.$$arity = -2);
40746
- Opal.alias(self, "render", "convert");
40747
-
40748
- Opal.def(self, '$convert_file', $convert_file$24 = function $$convert_file(filename, options) {
40749
- var $$25, self = this;
40750
-
40751
-
40752
-
40753
- if (options == null) {
40754
- options = $hash2([], {});
40755
- };
40756
- return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$25 = function(file){var self = $$25.$$s || this;
40757
-
40758
-
40759
-
40760
- if (file == null) {
40761
- file = nil;
40762
- };
40763
- return self.$convert(file, options);}, $$25.$$s = self, $$25.$$arity = 1, $$25));
40764
- }, $convert_file$24.$$arity = -2);
40765
- Opal.alias(self, "render_file", "convert_file");
40766
- if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40767
- return nil
40768
- } else {
40769
- return nil
40770
- };
40771
- })(Opal.get_singleton_class(self), $nesting);
40904
+ if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40905
+ } else {
40906
+ nil
40907
+ };
40772
40908
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40773
40909
  } else {
40774
40910
  nil
@@ -40777,6 +40913,7 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40777
40913
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/core_ext");
40778
40914
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/helpers");
40779
40915
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/logging");
40916
+ self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/rx");
40780
40917
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/substitutors");
40781
40918
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/version");
40782
40919
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_node");
@@ -40795,6 +40932,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
40795
40932
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/stylesheets");
40796
40933
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/table");
40797
40934
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/writer");
40935
+ self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/load");
40936
+ self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/convert");
40798
40937
  if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
40799
40938
 
40800
40939
  self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/syntax_highlighter");
@@ -40829,6 +40968,15 @@ var fromHash = function (hash) {
40829
40968
  return object
40830
40969
  }
40831
40970
 
40971
+ var fromHashKeys = function (hash) {
40972
+ var object = {}
40973
+ var data = hash.$$keys
40974
+ for (var key in data) {
40975
+ object[key.toString()] = data[key].value
40976
+ }
40977
+ return object
40978
+ }
40979
+
40832
40980
  /**
40833
40981
  * @private
40834
40982
  */
@@ -40881,6 +41029,12 @@ function initializeClass (superClass, className, functions, defaultFunctions, ar
40881
41029
  if (typeof constructorFunction === 'function') {
40882
41030
  initialize = function () {
40883
41031
  var args = Array.from(arguments)
41032
+ for (var i = 0; i < args.length; i++) {
41033
+ // convert all (Opal) Hash arguments to JSON.
41034
+ if (typeof args[i] === 'object' && '$$smap' in args[i]) {
41035
+ args[i] = fromHash(args[i])
41036
+ }
41037
+ }
40884
41038
  args.unshift(null)
40885
41039
  var result = new (Function.prototype.bind.apply(constructorFunction, args)) // eslint-disable-line
40886
41040
  Object.assign(this, result)
@@ -40890,7 +41044,14 @@ function initializeClass (superClass, className, functions, defaultFunctions, ar
40890
41044
  }
40891
41045
  } else if (typeof initializeFunction === 'function') {
40892
41046
  initialize = function () {
40893
- initializeFunction.apply(this, arguments)
41047
+ var args = Array.from(arguments)
41048
+ for (var i = 0; i < args.length; i++) {
41049
+ // convert all (Opal) Hash arguments to JSON.
41050
+ if (typeof args[i] === 'object' && '$$smap' in args[i]) {
41051
+ args[i] = fromHash(args[i])
41052
+ }
41053
+ }
41054
+ initializeFunction.apply(this, args)
40894
41055
  if (typeof postConstructFunction === 'function') {
40895
41056
  postConstructFunction.bind(this)()
40896
41057
  }
@@ -42893,7 +43054,7 @@ var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true)
42893
43054
  Opal.Asciidoctor.Logger = Logger
42894
43055
 
42895
43056
  Logger.prototype.getMaxSeverity = function () {
42896
- const result = this.max_severity
43057
+ var result = this.max_severity
42897
43058
  return result === Opal.nil ? undefined : result
42898
43059
  }
42899
43060
  Logger.prototype.getFormatter = function () {
@@ -43055,11 +43216,51 @@ SyntaxHighlighter.register = function (names, functions) {
43055
43216
  var prototype = classObject.prototype
43056
43217
  var properties = Object.getOwnPropertyNames(prototype)
43057
43218
  functions = {}
43058
- for (var propertyName of properties) {
43219
+ for (var propertyIdx in properties) {
43220
+ var propertyName = properties[propertyIdx]
43059
43221
  functions[propertyName] = prototype[propertyName]
43060
43222
  }
43061
43223
  }
43062
- const scope = initializeClass(SyntaxHighlighterBase, name, functions)
43224
+ var scope = initializeClass(SyntaxHighlighterBase, name, functions, {}, {
43225
+ 'format': function (args) {
43226
+ if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) {
43227
+ args[2] = fromHash(args[2])
43228
+ }
43229
+ if (args.length >= 1) {
43230
+ args[1] = args[1] === Opal.nil ? undefined : args[1]
43231
+ }
43232
+ return args
43233
+ },
43234
+ 'highlight': function (args) {
43235
+ if (args.length >= 3 && typeof args[3] === 'object' && '$$smap' in args[3]) {
43236
+ var opts = args[3]
43237
+ opts = fromHash(opts)
43238
+ for (var key in opts) {
43239
+ var value = opts[key]
43240
+ if (key === 'callouts') {
43241
+ var callouts = fromHashKeys(value)
43242
+ for (var idx in callouts) {
43243
+ var callout = callouts[idx]
43244
+ for (var i = 0; i < callout.length; i++) {
43245
+ var items = callout[i]
43246
+ for (var j = 0; j < items.length; j++) {
43247
+ items[j] = items[j] === Opal.nil ? undefined : items[j]
43248
+ }
43249
+ }
43250
+ }
43251
+ opts[key] = callouts
43252
+ } else {
43253
+ opts[key] = value === Opal.nil ? undefined : value
43254
+ }
43255
+ }
43256
+ args[3] = opts
43257
+ }
43258
+ if (args.length >= 2) {
43259
+ args[2] = args[2] === Opal.nil ? undefined : args[2]
43260
+ }
43261
+ return args
43262
+ }
43263
+ })
43063
43264
  for (var functionName in functions) {
43064
43265
  if (functions.hasOwnProperty(functionName)) {
43065
43266
  (function (functionName) {
@@ -43769,6 +43970,12 @@ InlineMacroProcessor.prototype.getName = function () {
43769
43970
  InlineMacroProcessor.prototype.parseContentAs = function (value) {
43770
43971
  this.$parse_content_as(value)
43771
43972
  }
43973
+ /**
43974
+ * @memberof Extensions/InlineMacroProcessor
43975
+ */
43976
+ InlineMacroProcessor.prototype.matchFormat = function (value) {
43977
+ this.$match_format(value)
43978
+ }
43772
43979
 
43773
43980
  /**
43774
43981
  * @namespace
@@ -44193,7 +44400,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
44193
44400
  }
44194
44401
 
44195
44402
 
44196
- var ASCIIDOCTOR_JS_VERSION = '2.0.0-rc.3';
44403
+ var ASCIIDOCTOR_JS_VERSION = '2.0.3';
44197
44404
 
44198
44405
  /**
44199
44406
  * Get Asciidoctor.js version number.