@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.
- package/dist/browser/asciidoctor.js +1096 -887
- package/dist/browser/asciidoctor.min.js +1427 -1212
- package/dist/css/asciidoctor.css +5 -5
- package/dist/graalvm/asciidoctor.js +1140 -933
- package/dist/node/asciidoctor.js +1144 -937
- package/package.json +1 -1
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Asciidoctor.js 2.0.3 | MIT | https://github.com/asciidoctor/asciidoctor.js
|
|
3
|
+
*/
|
|
1
4
|
(function(undefined) {
|
|
2
5
|
// @note
|
|
3
6
|
// A few conventions for the documentation of this file:
|
|
@@ -20040,7 +20043,7 @@ Opal.modules["asciidoctor/js/opal_ext/browser"] = function(Opal) {
|
|
|
20040
20043
|
Opal.modules["asciidoctor/js/asciidoctor_ext/browser/abstract_node"] = function(Opal) {
|
|
20041
20044
|
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;
|
|
20042
20045
|
|
|
20043
|
-
Opal.add_stubs(['$uriish?', '$[]', '$web_path', '$path_resolver', '$descends_from?', '$base_dir', '$attr?', '$
|
|
20046
|
+
Opal.add_stubs(['$uriish?', '$[]', '$web_path', '$path_resolver', '$descends_from?', '$base_dir', '$attr?', '$join', '$prepare_source_string', '$read', '$fetch', '$warn', '$logger', '$normalize_system_path', '$read_asset']);
|
|
20044
20047
|
return (function($base, $parent_nesting) {
|
|
20045
20048
|
var self = $module($base, 'Asciidoctor');
|
|
20046
20049
|
|
|
@@ -20068,8 +20071,7 @@ Opal.modules["asciidoctor/js/asciidoctor_ext/browser/abstract_node"] = function(
|
|
|
20068
20071
|
|
|
20069
20072
|
try {
|
|
20070
20073
|
if ($truthy(opts['$[]']("normalize"))) {
|
|
20071
|
-
|
|
20072
|
-
return $$($nesting, 'Helpers').$prepare_source_string($$$('::', 'File').$read(target).$join($$($nesting, 'LF')));
|
|
20074
|
+
return $$($nesting, 'Helpers').$prepare_source_string($$$('::', 'File').$read(target)).$join($$($nesting, 'LF'))
|
|
20073
20075
|
} else {
|
|
20074
20076
|
return $$$('::', 'File').$read(target)
|
|
20075
20077
|
}
|
|
@@ -21585,54 +21587,66 @@ Opal.modules["asciidoctor/js"] = function(Opal) {
|
|
|
21585
21587
|
};
|
|
21586
21588
|
|
|
21587
21589
|
/* Generated by Opal 0.11.99.dev */
|
|
21588
|
-
Opal.modules["asciidoctor/core_ext/
|
|
21589
|
-
|
|
21590
|
-
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
|
|
21591
|
-
}
|
|
21592
|
-
function $rb_divide(lhs, rhs) {
|
|
21593
|
-
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs / rhs : lhs['$/'](rhs);
|
|
21594
|
-
}
|
|
21595
|
-
function $rb_times(lhs, rhs) {
|
|
21596
|
-
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs * rhs : lhs['$*'](rhs);
|
|
21597
|
-
}
|
|
21598
|
-
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;
|
|
21590
|
+
Opal.modules["asciidoctor/core_ext/nil_or_empty"] = function(Opal) {
|
|
21591
|
+
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;
|
|
21599
21592
|
|
|
21600
|
-
Opal.add_stubs(['
|
|
21601
|
-
|
|
21602
|
-
|
|
21593
|
+
Opal.add_stubs(['$method_defined?']);
|
|
21594
|
+
|
|
21595
|
+
(function($base, $super, $parent_nesting) {
|
|
21596
|
+
var self = $klass($base, $super, 'NilClass');
|
|
21603
21597
|
|
|
21604
|
-
|
|
21605
|
-
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;
|
|
21598
|
+
var $nesting = [self].concat($parent_nesting);
|
|
21606
21599
|
|
|
21607
|
-
|
|
21608
|
-
|
|
21609
|
-
|
|
21610
|
-
|
|
21611
|
-
|
|
21612
|
-
|
|
21613
|
-
|
|
21614
|
-
|
|
21615
|
-
|
|
21616
|
-
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
|
|
21626
|
-
|
|
21627
|
-
|
|
21628
|
-
|
|
21629
|
-
|
|
21630
|
-
|
|
21631
|
-
|
|
21632
|
-
|
|
21633
|
-
|
|
21634
|
-
|
|
21635
|
-
|
|
21600
|
+
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21601
|
+
return nil
|
|
21602
|
+
} else {
|
|
21603
|
+
return Opal.alias(self, "nil_or_empty?", "nil?")
|
|
21604
|
+
}
|
|
21605
|
+
})($nesting[0], null, $nesting);
|
|
21606
|
+
(function($base, $super, $parent_nesting) {
|
|
21607
|
+
var self = $klass($base, $super, 'String');
|
|
21608
|
+
|
|
21609
|
+
var $nesting = [self].concat($parent_nesting);
|
|
21610
|
+
|
|
21611
|
+
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21612
|
+
return nil
|
|
21613
|
+
} else {
|
|
21614
|
+
return Opal.alias(self, "nil_or_empty?", "empty?")
|
|
21615
|
+
}
|
|
21616
|
+
})($nesting[0], null, $nesting);
|
|
21617
|
+
(function($base, $super, $parent_nesting) {
|
|
21618
|
+
var self = $klass($base, $super, 'Array');
|
|
21619
|
+
|
|
21620
|
+
var $nesting = [self].concat($parent_nesting);
|
|
21621
|
+
|
|
21622
|
+
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21623
|
+
return nil
|
|
21624
|
+
} else {
|
|
21625
|
+
return Opal.alias(self, "nil_or_empty?", "empty?")
|
|
21626
|
+
}
|
|
21627
|
+
})($nesting[0], null, $nesting);
|
|
21628
|
+
(function($base, $super, $parent_nesting) {
|
|
21629
|
+
var self = $klass($base, $super, 'Hash');
|
|
21630
|
+
|
|
21631
|
+
var $nesting = [self].concat($parent_nesting);
|
|
21632
|
+
|
|
21633
|
+
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21634
|
+
return nil
|
|
21635
|
+
} else {
|
|
21636
|
+
return Opal.alias(self, "nil_or_empty?", "empty?")
|
|
21637
|
+
}
|
|
21638
|
+
})($nesting[0], null, $nesting);
|
|
21639
|
+
return (function($base, $super, $parent_nesting) {
|
|
21640
|
+
var self = $klass($base, $super, 'Numeric');
|
|
21641
|
+
|
|
21642
|
+
var $nesting = [self].concat($parent_nesting);
|
|
21643
|
+
|
|
21644
|
+
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21645
|
+
return nil
|
|
21646
|
+
} else {
|
|
21647
|
+
return Opal.alias(self, "nil_or_empty?", "nil?")
|
|
21648
|
+
}
|
|
21649
|
+
})($nesting[0], null, $nesting);
|
|
21636
21650
|
};
|
|
21637
21651
|
|
|
21638
21652
|
/* Generated by Opal 0.11.99.dev */
|
|
@@ -21708,102 +21722,19 @@ Opal.modules["asciidoctor/core_ext/match_data/names"] = function(Opal) {
|
|
|
21708
21722
|
}
|
|
21709
21723
|
};
|
|
21710
21724
|
|
|
21711
|
-
/* Generated by Opal 0.11.99.dev */
|
|
21712
|
-
Opal.modules["asciidoctor/core_ext/nil_or_empty"] = function(Opal) {
|
|
21713
|
-
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;
|
|
21714
|
-
|
|
21715
|
-
Opal.add_stubs(['$method_defined?']);
|
|
21716
|
-
|
|
21717
|
-
(function($base, $super, $parent_nesting) {
|
|
21718
|
-
var self = $klass($base, $super, 'NilClass');
|
|
21719
|
-
|
|
21720
|
-
var $nesting = [self].concat($parent_nesting);
|
|
21721
|
-
|
|
21722
|
-
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21723
|
-
return nil
|
|
21724
|
-
} else {
|
|
21725
|
-
return Opal.alias(self, "nil_or_empty?", "nil?")
|
|
21726
|
-
}
|
|
21727
|
-
})($nesting[0], null, $nesting);
|
|
21728
|
-
(function($base, $super, $parent_nesting) {
|
|
21729
|
-
var self = $klass($base, $super, 'String');
|
|
21730
|
-
|
|
21731
|
-
var $nesting = [self].concat($parent_nesting);
|
|
21732
|
-
|
|
21733
|
-
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21734
|
-
return nil
|
|
21735
|
-
} else {
|
|
21736
|
-
return Opal.alias(self, "nil_or_empty?", "empty?")
|
|
21737
|
-
}
|
|
21738
|
-
})($nesting[0], null, $nesting);
|
|
21739
|
-
(function($base, $super, $parent_nesting) {
|
|
21740
|
-
var self = $klass($base, $super, 'Array');
|
|
21741
|
-
|
|
21742
|
-
var $nesting = [self].concat($parent_nesting);
|
|
21743
|
-
|
|
21744
|
-
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21745
|
-
return nil
|
|
21746
|
-
} else {
|
|
21747
|
-
return Opal.alias(self, "nil_or_empty?", "empty?")
|
|
21748
|
-
}
|
|
21749
|
-
})($nesting[0], null, $nesting);
|
|
21750
|
-
(function($base, $super, $parent_nesting) {
|
|
21751
|
-
var self = $klass($base, $super, 'Hash');
|
|
21752
|
-
|
|
21753
|
-
var $nesting = [self].concat($parent_nesting);
|
|
21754
|
-
|
|
21755
|
-
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21756
|
-
return nil
|
|
21757
|
-
} else {
|
|
21758
|
-
return Opal.alias(self, "nil_or_empty?", "empty?")
|
|
21759
|
-
}
|
|
21760
|
-
})($nesting[0], null, $nesting);
|
|
21761
|
-
return (function($base, $super, $parent_nesting) {
|
|
21762
|
-
var self = $klass($base, $super, 'Numeric');
|
|
21763
|
-
|
|
21764
|
-
var $nesting = [self].concat($parent_nesting);
|
|
21765
|
-
|
|
21766
|
-
if ($truthy(self['$method_defined?']("nil_or_empty?"))) {
|
|
21767
|
-
return nil
|
|
21768
|
-
} else {
|
|
21769
|
-
return Opal.alias(self, "nil_or_empty?", "nil?")
|
|
21770
|
-
}
|
|
21771
|
-
})($nesting[0], null, $nesting);
|
|
21772
|
-
};
|
|
21773
|
-
|
|
21774
|
-
/* Generated by Opal 0.11.99.dev */
|
|
21775
|
-
Opal.modules["asciidoctor/core_ext/regexp/is_match"] = function(Opal) {
|
|
21776
|
-
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;
|
|
21777
|
-
|
|
21778
|
-
Opal.add_stubs(['$method_defined?']);
|
|
21779
|
-
if ($truthy($$($nesting, 'Regexp')['$method_defined?']("match?"))) {
|
|
21780
|
-
return nil
|
|
21781
|
-
} else {
|
|
21782
|
-
return (function($base, $super, $parent_nesting) {
|
|
21783
|
-
var self = $klass($base, $super, 'Regexp');
|
|
21784
|
-
|
|
21785
|
-
var $nesting = [self].concat($parent_nesting);
|
|
21786
|
-
|
|
21787
|
-
return Opal.alias(self, "match?", "===")
|
|
21788
|
-
})($nesting[0], null, $nesting)
|
|
21789
|
-
}
|
|
21790
|
-
};
|
|
21791
|
-
|
|
21792
21725
|
/* Generated by Opal 0.11.99.dev */
|
|
21793
21726
|
Opal.modules["asciidoctor/core_ext"] = function(Opal) {
|
|
21794
21727
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice;
|
|
21795
21728
|
|
|
21796
21729
|
Opal.add_stubs(['$==']);
|
|
21797
21730
|
|
|
21798
|
-
self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/
|
|
21731
|
+
self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/nil_or_empty");
|
|
21799
21732
|
self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/hash/merge");
|
|
21800
21733
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
21801
|
-
self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/match_data/names")
|
|
21734
|
+
return self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/match_data/names")
|
|
21802
21735
|
} else {
|
|
21803
|
-
nil
|
|
21736
|
+
return nil
|
|
21804
21737
|
};
|
|
21805
|
-
self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/nil_or_empty");
|
|
21806
|
-
return self.$require("asciidoctor/core_ext.rb"+ '/../' + "core_ext/regexp/is_match");
|
|
21807
21738
|
};
|
|
21808
21739
|
|
|
21809
21740
|
/* Generated by Opal 0.11.99.dev */
|
|
@@ -21819,7 +21750,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
21819
21750
|
}
|
|
21820
21751
|
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;
|
|
21821
21752
|
|
|
21822
|
-
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?', '
|
|
21753
|
+
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']);
|
|
21823
21754
|
return (function($base, $parent_nesting) {
|
|
21824
21755
|
var self = $module($base, 'Asciidoctor');
|
|
21825
21756
|
|
|
@@ -21828,10 +21759,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
21828
21759
|
(function($base, $parent_nesting) {
|
|
21829
21760
|
var self = $module($base, 'Helpers');
|
|
21830
21761
|
|
|
21831
|
-
var $nesting = [self].concat($parent_nesting), $Helpers_require_library$1, $Helpers_prepare_source_array$2, $Helpers_prepare_source_string$7, $Helpers_uriish$ques$10, $
|
|
21762
|
+
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;
|
|
21832
21763
|
|
|
21833
21764
|
|
|
21834
|
-
|
|
21765
|
+
self.$module_function();
|
|
21766
|
+
|
|
21767
|
+
Opal.def(self, '$require_library', $Helpers_require_library$1 = function $$require_library(name, gem_name, on_failure) {
|
|
21835
21768
|
var self = this, $case = nil, details = nil;
|
|
21836
21769
|
if ($gvars["!"] == null) $gvars["!"] = nil;
|
|
21837
21770
|
|
|
@@ -21891,7 +21824,8 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
21891
21824
|
} else { throw $err; }
|
|
21892
21825
|
};
|
|
21893
21826
|
}, $Helpers_require_library$1.$$arity = -2);
|
|
21894
|
-
|
|
21827
|
+
|
|
21828
|
+
Opal.def(self, '$prepare_source_array', $Helpers_prepare_source_array$2 = function $$prepare_source_array(data) {
|
|
21895
21829
|
var $$3, $$4, $$5, $$6, self = this, leading_2_bytes = nil, leading_bytes = nil, first = nil, $writer = nil;
|
|
21896
21830
|
|
|
21897
21831
|
|
|
@@ -21950,7 +21884,8 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
21950
21884
|
return line.$encode($$($nesting, 'UTF_8')).$rstrip();}, $$6.$$s = self, $$6.$$arity = 1, $$6))
|
|
21951
21885
|
};
|
|
21952
21886
|
}, $Helpers_prepare_source_array$2.$$arity = 1);
|
|
21953
|
-
|
|
21887
|
+
|
|
21888
|
+
Opal.def(self, '$prepare_source_string', $Helpers_prepare_source_string$7 = function $$prepare_source_string(data) {
|
|
21954
21889
|
var $$8, self = this, leading_2_bytes = nil, leading_bytes = nil;
|
|
21955
21890
|
|
|
21956
21891
|
|
|
@@ -21985,22 +21920,15 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
21985
21920
|
};
|
|
21986
21921
|
return lines['$<<'](line.$rstrip());}, $$9.$$s = self, $$9.$$arity = 1, $$9));}, $$8.$$s = self, $$8.$$arity = 1, $$8));
|
|
21987
21922
|
}, $Helpers_prepare_source_string$7.$$arity = 1);
|
|
21988
|
-
|
|
21923
|
+
|
|
21924
|
+
Opal.def(self, '$uriish?', $Helpers_uriish$ques$10 = function(str) {
|
|
21989
21925
|
var $a, self = this;
|
|
21990
21926
|
|
|
21991
21927
|
return ($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$match?'](str) : $a)
|
|
21992
21928
|
}, $Helpers_uriish$ques$10.$$arity = 1);
|
|
21993
|
-
Opal.defs(self, '$uri_prefix', $Helpers_uri_prefix$11 = function $$uri_prefix(str) {
|
|
21994
|
-
var $a, self = this;
|
|
21995
|
-
|
|
21996
|
-
if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
|
|
21997
|
-
return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))
|
|
21998
|
-
} else {
|
|
21999
|
-
return nil
|
|
22000
|
-
}
|
|
22001
|
-
}, $Helpers_uri_prefix$11.$$arity = 1);
|
|
22002
21929
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
22003
|
-
|
|
21930
|
+
|
|
21931
|
+
Opal.def(self, '$encode_uri_component', $Helpers_encode_uri_component$11 = function $$encode_uri_component(str) {
|
|
22004
21932
|
var self = this;
|
|
22005
21933
|
|
|
22006
21934
|
|
|
@@ -22008,11 +21936,12 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22008
21936
|
return m === '%20' ? '+' : '%' + m.charCodeAt(0).toString(16)
|
|
22009
21937
|
})
|
|
22010
21938
|
|
|
22011
|
-
}, $Helpers_encode_uri_component$
|
|
21939
|
+
}, $Helpers_encode_uri_component$11.$$arity = 1)
|
|
22012
21940
|
} else {
|
|
22013
21941
|
nil
|
|
22014
21942
|
};
|
|
22015
|
-
|
|
21943
|
+
|
|
21944
|
+
Opal.def(self, '$encode_spaces_in_uri', $Helpers_encode_spaces_in_uri$12 = function $$encode_spaces_in_uri(str) {
|
|
22016
21945
|
var self = this;
|
|
22017
21946
|
|
|
22018
21947
|
if ($truthy(str['$include?'](" "))) {
|
|
@@ -22021,13 +21950,24 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22021
21950
|
} else {
|
|
22022
21951
|
return str
|
|
22023
21952
|
}
|
|
22024
|
-
}, $
|
|
22025
|
-
|
|
22026
|
-
|
|
21953
|
+
}, $Helpers_encode_spaces_in_uri$12.$$arity = 1);
|
|
21954
|
+
|
|
21955
|
+
Opal.def(self, '$rootname', $Helpers_rootname$13 = function $$rootname(filename) {
|
|
21956
|
+
var self = this, last_dot_idx = nil;
|
|
22027
21957
|
|
|
22028
|
-
|
|
22029
|
-
|
|
22030
|
-
|
|
21958
|
+
if ($truthy((last_dot_idx = filename.$rindex(".")))) {
|
|
21959
|
+
if ($truthy(filename.$index("/", last_dot_idx))) {
|
|
21960
|
+
return filename
|
|
21961
|
+
} else {
|
|
21962
|
+
|
|
21963
|
+
return filename.$slice(0, last_dot_idx);
|
|
21964
|
+
}
|
|
21965
|
+
} else {
|
|
21966
|
+
return filename
|
|
21967
|
+
}
|
|
21968
|
+
}, $Helpers_rootname$13.$$arity = 1);
|
|
21969
|
+
|
|
21970
|
+
Opal.def(self, '$basename', $Helpers_basename$14 = function $$basename(filename, drop_ext) {
|
|
22031
21971
|
var self = this;
|
|
22032
21972
|
|
|
22033
21973
|
|
|
@@ -22038,15 +21978,65 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22038
21978
|
if ($truthy(drop_ext)) {
|
|
22039
21979
|
return $$$('::', 'File').$basename(filename, (function() {if (drop_ext['$=='](true)) {
|
|
22040
21980
|
|
|
22041
|
-
return
|
|
21981
|
+
return self.$extname(filename);
|
|
22042
21982
|
} else {
|
|
22043
21983
|
return drop_ext
|
|
22044
21984
|
}; return nil; })())
|
|
22045
21985
|
} else {
|
|
22046
21986
|
return $$$('::', 'File').$basename(filename)
|
|
22047
21987
|
};
|
|
22048
|
-
}, $Helpers_basename$
|
|
22049
|
-
|
|
21988
|
+
}, $Helpers_basename$14.$$arity = -2);
|
|
21989
|
+
|
|
21990
|
+
Opal.def(self, '$extname?', $Helpers_extname$ques$15 = function(path) {
|
|
21991
|
+
var $a, self = this, last_dot_idx = nil;
|
|
21992
|
+
|
|
21993
|
+
return ($truthy($a = (last_dot_idx = path.$rindex("."))) ? path.$index("/", last_dot_idx)['$!']() : $a)
|
|
21994
|
+
}, $Helpers_extname$ques$15.$$arity = 1);
|
|
21995
|
+
if ($truthy($$$($$$('::', 'File'), 'ALT_SEPARATOR'))) {
|
|
21996
|
+
|
|
21997
|
+
Opal.def(self, '$extname', $Helpers_extname$16 = function $$extname(path, fallback) {
|
|
21998
|
+
var $a, self = this, last_dot_idx = nil;
|
|
21999
|
+
|
|
22000
|
+
|
|
22001
|
+
|
|
22002
|
+
if (fallback == null) {
|
|
22003
|
+
fallback = "";
|
|
22004
|
+
};
|
|
22005
|
+
if ($truthy((last_dot_idx = path.$rindex(".")))) {
|
|
22006
|
+
if ($truthy(($truthy($a = path.$index("/", last_dot_idx)) ? $a : path.$index($$$($$$('::', 'File'), 'ALT_SEPARATOR'), last_dot_idx)))) {
|
|
22007
|
+
return fallback
|
|
22008
|
+
} else {
|
|
22009
|
+
|
|
22010
|
+
return path.$slice(last_dot_idx, path.$length());
|
|
22011
|
+
}
|
|
22012
|
+
} else {
|
|
22013
|
+
return fallback
|
|
22014
|
+
};
|
|
22015
|
+
}, $Helpers_extname$16.$$arity = -2)
|
|
22016
|
+
} else {
|
|
22017
|
+
|
|
22018
|
+
Opal.def(self, '$extname', $Helpers_extname$17 = function $$extname(path, fallback) {
|
|
22019
|
+
var self = this, last_dot_idx = nil;
|
|
22020
|
+
|
|
22021
|
+
|
|
22022
|
+
|
|
22023
|
+
if (fallback == null) {
|
|
22024
|
+
fallback = "";
|
|
22025
|
+
};
|
|
22026
|
+
if ($truthy((last_dot_idx = path.$rindex(".")))) {
|
|
22027
|
+
if ($truthy(path.$index("/", last_dot_idx))) {
|
|
22028
|
+
return fallback
|
|
22029
|
+
} else {
|
|
22030
|
+
|
|
22031
|
+
return path.$slice(last_dot_idx, path.$length());
|
|
22032
|
+
}
|
|
22033
|
+
} else {
|
|
22034
|
+
return fallback
|
|
22035
|
+
};
|
|
22036
|
+
}, $Helpers_extname$17.$$arity = -2)
|
|
22037
|
+
};
|
|
22038
|
+
|
|
22039
|
+
Opal.def(self, '$mkdir_p', $Helpers_mkdir_p$18 = function $$mkdir_p(dir) {
|
|
22050
22040
|
var self = this, parent_dir = nil;
|
|
22051
22041
|
|
|
22052
22042
|
if ($truthy($$$('::', 'File')['$directory?'](dir))) {
|
|
@@ -22072,12 +22062,14 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22072
22062
|
} else { throw $err; }
|
|
22073
22063
|
};;
|
|
22074
22064
|
}
|
|
22075
|
-
}, $Helpers_mkdir_p$
|
|
22065
|
+
}, $Helpers_mkdir_p$18.$$arity = 1);
|
|
22076
22066
|
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}));
|
|
22077
|
-
|
|
22078
|
-
|
|
22067
|
+
self.$private_constant("ROMAN_NUMERALS");
|
|
22068
|
+
|
|
22069
|
+
Opal.def(self, '$int_to_roman', $Helpers_int_to_roman$19 = function $$int_to_roman(val) {
|
|
22070
|
+
var $$20, self = this;
|
|
22079
22071
|
|
|
22080
|
-
return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$
|
|
22072
|
+
return $send($$($nesting, 'ROMAN_NUMERALS'), 'map', [], ($$20 = function(l, i){var self = $$20.$$s || this, $a, $b, repeat = nil;
|
|
22081
22073
|
|
|
22082
22074
|
|
|
22083
22075
|
|
|
@@ -22089,9 +22081,10 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22089
22081
|
i = nil;
|
|
22090
22082
|
};
|
|
22091
22083
|
$b = val.$divmod(i), $a = Opal.to_ary($b), (repeat = ($a[0] == null ? nil : $a[0])), (val = ($a[1] == null ? nil : $a[1])), $b;
|
|
22092
|
-
return $rb_times(l, repeat);}, $$
|
|
22093
|
-
}, $Helpers_int_to_roman$
|
|
22094
|
-
|
|
22084
|
+
return $rb_times(l, repeat);}, $$20.$$s = self, $$20.$$arity = 2, $$20)).$join()
|
|
22085
|
+
}, $Helpers_int_to_roman$19.$$arity = 1);
|
|
22086
|
+
|
|
22087
|
+
Opal.def(self, '$nextval', $Helpers_nextval$21 = function $$nextval(current) {
|
|
22095
22088
|
var self = this, intval = nil;
|
|
22096
22089
|
|
|
22097
22090
|
if ($truthy($$$('::', 'Integer')['$==='](current))) {
|
|
@@ -22105,8 +22098,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22105
22098
|
return $rb_plus(intval, 1)
|
|
22106
22099
|
};
|
|
22107
22100
|
}
|
|
22108
|
-
}, $Helpers_nextval$
|
|
22109
|
-
|
|
22101
|
+
}, $Helpers_nextval$21.$$arity = 1);
|
|
22102
|
+
|
|
22103
|
+
Opal.def(self, '$resolve_class', $Helpers_resolve_class$22 = function $$resolve_class(object) {
|
|
22110
22104
|
var self = this;
|
|
22111
22105
|
|
|
22112
22106
|
if ($truthy($$$('::', 'Class')['$==='](object))) {
|
|
@@ -22120,8 +22114,9 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22120
22114
|
return nil
|
|
22121
22115
|
};
|
|
22122
22116
|
}
|
|
22123
|
-
}, $Helpers_resolve_class$
|
|
22124
|
-
|
|
22117
|
+
}, $Helpers_resolve_class$22.$$arity = 1);
|
|
22118
|
+
|
|
22119
|
+
Opal.def(self, '$class_for_name', $Helpers_class_for_name$23 = function $$class_for_name(qualified_name) {
|
|
22125
22120
|
var self = this, resolved = nil;
|
|
22126
22121
|
|
|
22127
22122
|
try {
|
|
@@ -22138,7 +22133,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {
|
|
|
22138
22133
|
} finally { Opal.pop_exception() }
|
|
22139
22134
|
} else { throw $err; }
|
|
22140
22135
|
}
|
|
22141
|
-
}, $Helpers_class_for_name$
|
|
22136
|
+
}, $Helpers_class_for_name$23.$$arity = 1);
|
|
22142
22137
|
})($nesting[0], $nesting)
|
|
22143
22138
|
})($nesting[0], $nesting)
|
|
22144
22139
|
};
|
|
@@ -22695,6 +22690,148 @@ Opal.modules["asciidoctor/logging"] = function(Opal) {
|
|
|
22695
22690
|
})($nesting[0], $nesting);
|
|
22696
22691
|
};
|
|
22697
22692
|
|
|
22693
|
+
/* Generated by Opal 0.11.99.dev */
|
|
22694
|
+
Opal.modules["asciidoctor/rx"] = function(Opal) {
|
|
22695
|
+
function $rb_minus(lhs, rhs) {
|
|
22696
|
+
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
|
|
22697
|
+
}
|
|
22698
|
+
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;
|
|
22699
|
+
|
|
22700
|
+
Opal.add_stubs(['$==', '$join', '$to_a', '$new', '$empty?', '$escape', '$[]=', '$-']);
|
|
22701
|
+
return (function($base, $parent_nesting) {
|
|
22702
|
+
var self = $module($base, 'Asciidoctor');
|
|
22703
|
+
|
|
22704
|
+
var $nesting = [self].concat($parent_nesting), $Asciidoctor$1, $Asciidoctor$2;
|
|
22705
|
+
|
|
22706
|
+
|
|
22707
|
+
(function($base, $parent_nesting) {
|
|
22708
|
+
var self = $module($base, 'Rx');
|
|
22709
|
+
|
|
22710
|
+
var $nesting = [self].concat($parent_nesting);
|
|
22711
|
+
|
|
22712
|
+
nil
|
|
22713
|
+
})($nesting[0], $nesting);
|
|
22714
|
+
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')) + "\\-'.]*))?(?: +<([^>]+)>)?$"));
|
|
22715
|
+
Opal.const_set($nesting[0], 'AuthorDelimiterRx', /;(?: |$)/);
|
|
22716
|
+
Opal.const_set($nesting[0], 'RevisionInfoLineRx', new RegExp("" + "^(?:[^\\d{]*(" + ($$($nesting, 'CC_ANY')) + "*?),)? *(?!:)(" + ($$($nesting, 'CC_ANY')) + "*?)(?: *(?!^),?: *(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
|
|
22717
|
+
Opal.const_set($nesting[0], 'ManpageTitleVolnumRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *\\( *(" + ($$($nesting, 'CC_ANY')) + "+?) *\\)$"));
|
|
22718
|
+
Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
|
|
22719
|
+
Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
22720
|
+
Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
|
|
22721
|
+
Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
22722
|
+
Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
|
|
22723
|
+
Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
|
|
22724
|
+
Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^" + ($$($nesting, 'CC_WORD')) + "-]"));
|
|
22725
|
+
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
22726
|
+
Opal.const_set($nesting[0], 'AttributeEntryPassMacroRx', new RegExp("" + "^pass:([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*)\\]$"))
|
|
22727
|
+
} else {
|
|
22728
|
+
nil
|
|
22729
|
+
};
|
|
22730
|
+
Opal.const_set($nesting[0], 'AttributeReferenceRx', new RegExp("" + "(\\\\)?\\{(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*|(set|counter2?):" + ($$($nesting, 'CC_ANY')) + "+?)(\\\\)?\\}"));
|
|
22731
|
+
Opal.const_set($nesting[0], 'BlockAnchorRx', new RegExp("" + "^\\[\\[(?:|([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?)\\]\\]$"));
|
|
22732
|
+
Opal.const_set($nesting[0], 'BlockAttributeListRx', new RegExp("" + "^\\[(|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*)\\]$"));
|
|
22733
|
+
Opal.const_set($nesting[0], 'BlockAttributeLineRx', new RegExp("" + "^\\[(?:|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*|\\[(?:|[" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*(?:, *" + ($$($nesting, 'CC_ANY')) + "+)?)\\])\\]$"));
|
|
22734
|
+
Opal.const_set($nesting[0], 'BlockTitleRx', new RegExp("" + "^\\.(\\.?[^ \\t.]" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
22735
|
+
Opal.const_set($nesting[0], 'AdmonitionParagraphRx', new RegExp("" + "^(" + ($$($nesting, 'ADMONITION_STYLES').$to_a().$join("|")) + "):[ \\t]+"));
|
|
22736
|
+
Opal.const_set($nesting[0], 'LiteralParagraphRx', new RegExp("" + "^([ \\t]+" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
22737
|
+
Opal.const_set($nesting[0], 'AtxSectionTitleRx', new RegExp("" + "^(=={0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
|
|
22738
|
+
Opal.const_set($nesting[0], 'ExtAtxSectionTitleRx', new RegExp("" + "^(=={0,5}|#\\\#{0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
|
|
22739
|
+
Opal.const_set($nesting[0], 'SetextSectionTitleRx', new RegExp("" + "^((?!\\.)" + ($$($nesting, 'CC_ANY')) + "*?" + ($$($nesting, 'CG_ALNUM')) + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
22740
|
+
Opal.const_set($nesting[0], 'InlineSectionAnchorRx', new RegExp("" + " (\\\\)?\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?\\]\\]$"));
|
|
22741
|
+
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')) + "\\-.]+?"));
|
|
22742
|
+
Opal.const_set($nesting[0], 'SectionLevelStyleRx', /^sect\d$/);
|
|
22743
|
+
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])"));
|
|
22744
|
+
Opal.const_set($nesting[0], 'UnorderedListRx', new RegExp("" + "^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
22745
|
+
Opal.const_set($nesting[0], 'OrderedListRx', new RegExp("" + "^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
22746
|
+
Opal.const_set($nesting[0], 'OrderedListMarkerRxMap', $hash2(["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"], {"arabic": /\d+\./, "loweralpha": /[a-z]\./, "lowerroman": /[ivx]+\)/, "upperalpha": /[A-Z]\./, "upperroman": /[IVX]+\)/}));
|
|
22747
|
+
Opal.const_set($nesting[0], 'DescriptionListRx', new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(:::{0,2}|;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"));
|
|
22748
|
+
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')) + "*)$)")}));
|
|
22749
|
+
Opal.const_set($nesting[0], 'CalloutListRx', new RegExp("" + "^<(\\d+|\\.)>[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
22750
|
+
Opal.const_set($nesting[0], 'CalloutExtractRx', /((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/);
|
|
22751
|
+
Opal.const_set($nesting[0], 'CalloutExtractRxt', "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)");
|
|
22752
|
+
Opal.const_set($nesting[0], 'CalloutExtractRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$1 = function(h, k){var self = $Asciidoctor$1.$$s || this, $writer = nil;
|
|
22753
|
+
|
|
22754
|
+
|
|
22755
|
+
|
|
22756
|
+
if (h == null) {
|
|
22757
|
+
h = nil;
|
|
22758
|
+
};
|
|
22759
|
+
|
|
22760
|
+
if (k == null) {
|
|
22761
|
+
k = nil;
|
|
22762
|
+
};
|
|
22763
|
+
$writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
|
|
22764
|
+
return ""
|
|
22765
|
+
} else {
|
|
22766
|
+
return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
|
|
22767
|
+
}; return nil; })()) + ")?" + ($$($nesting, 'CalloutExtractRxt')))];
|
|
22768
|
+
$send(h, '[]=', Opal.to_a($writer));
|
|
22769
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$1.$$s = self, $Asciidoctor$1.$$arity = 2, $Asciidoctor$1)));
|
|
22770
|
+
Opal.const_set($nesting[0], 'CalloutScanRx', new RegExp("" + "\\\\?<!?(|--)(\\d+|\\.)\\1>(?=(?: ?\\\\?<!?\\1(?:\\d+|\\.)\\1>)*" + ($$($nesting, 'CC_EOL')) + ")"));
|
|
22771
|
+
Opal.const_set($nesting[0], 'CalloutSourceRx', new RegExp("" + "((?://|#|--|;;) ?)?(\\\\)?<!?(|--)(\\d+|\\.)\\3>(?=(?: ?\\\\?<!?\\3(?:\\d+|\\.)\\3>)*" + ($$($nesting, 'CC_EOL')) + ")"));
|
|
22772
|
+
Opal.const_set($nesting[0], 'CalloutSourceRxt', "" + "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*" + ($$($nesting, 'CC_EOL')) + ")");
|
|
22773
|
+
Opal.const_set($nesting[0], 'CalloutSourceRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$2 = function(h, k){var self = $Asciidoctor$2.$$s || this, $writer = nil;
|
|
22774
|
+
|
|
22775
|
+
|
|
22776
|
+
|
|
22777
|
+
if (h == null) {
|
|
22778
|
+
h = nil;
|
|
22779
|
+
};
|
|
22780
|
+
|
|
22781
|
+
if (k == null) {
|
|
22782
|
+
k = nil;
|
|
22783
|
+
};
|
|
22784
|
+
$writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
|
|
22785
|
+
return ""
|
|
22786
|
+
} else {
|
|
22787
|
+
return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
|
|
22788
|
+
}; return nil; })()) + ")?" + ($$($nesting, 'CalloutSourceRxt')))];
|
|
22789
|
+
$send(h, '[]=', Opal.to_a($writer));
|
|
22790
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$2.$$s = self, $Asciidoctor$2.$$arity = 2, $Asciidoctor$2)));
|
|
22791
|
+
Opal.const_set($nesting[0], 'ListRxMap', $hash2(["ulist", "olist", "dlist", "colist"], {"ulist": $$($nesting, 'UnorderedListRx'), "olist": $$($nesting, 'OrderedListRx'), "dlist": $$($nesting, 'DescriptionListRx'), "colist": $$($nesting, 'CalloutListRx')}));
|
|
22792
|
+
Opal.const_set($nesting[0], 'ColumnSpecRx', /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/);
|
|
22793
|
+
Opal.const_set($nesting[0], 'CellSpecStartRx', /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
|
|
22794
|
+
Opal.const_set($nesting[0], 'CellSpecEndRx', /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
|
|
22795
|
+
Opal.const_set($nesting[0], 'CustomBlockMacroRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*)::(|\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
22796
|
+
Opal.const_set($nesting[0], 'BlockMediaMacroRx', new RegExp("" + "^(image|video|audio)::(\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
22797
|
+
Opal.const_set($nesting[0], 'BlockTocMacroRx', new RegExp("" + "^toc::\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
22798
|
+
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')) + "*?[^\\\\])\\]))"));
|
|
22799
|
+
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')) + "*?[^\\\\])\\])"));
|
|
22800
|
+
Opal.const_set($nesting[0], 'LeadingInlineAnchorRx', new RegExp("" + "^\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]"));
|
|
22801
|
+
Opal.const_set($nesting[0], 'InlineBiblioAnchorRx', new RegExp("" + "^\\[\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + "\\-:.]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]\\]"));
|
|
22802
|
+
Opal.const_set($nesting[0], 'InlineEmailRx', new RegExp("" + "([\\\\>:/])?" + ($$($nesting, 'CG_WORD')) + "(?:&|[" + ($$($nesting, 'CC_WORD')) + "\\-.%+])*@" + ($$($nesting, 'CG_ALNUM')) + "[" + ($$($nesting, 'CC_ALNUM')) + "_\\-.]*\\.[a-zA-Z]{2,5}\\b"));
|
|
22803
|
+
Opal.const_set($nesting[0], 'InlineFootnoteMacroRx', new RegExp("" + "\\\\?footnote(?:(ref):|:([" + ($$($nesting, 'CC_WORD')) + "-]+)?)\\[(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
|
|
22804
|
+
Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22805
|
+
Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
|
|
22806
|
+
Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22807
|
+
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\];])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
|
|
22808
|
+
Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22809
|
+
Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
|
|
22810
|
+
Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
22811
|
+
Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))?\\]", 'm'));
|
|
22812
|
+
Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+>[ \\n]+[^\"]*)\""));
|
|
22813
|
+
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')]));
|
|
22814
|
+
Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
|
|
22815
|
+
Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
|
|
22816
|
+
Opal.const_set($nesting[0], 'InlineXrefMacroRx', new RegExp("" + "\\\\?(?:<<([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)>>|xref:([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)\\[(?:\\]|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]))", 'm'));
|
|
22817
|
+
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
22818
|
+
Opal.const_set($nesting[0], 'HardLineBreakRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "*) \\+$", 'm'))
|
|
22819
|
+
} else {
|
|
22820
|
+
nil
|
|
22821
|
+
};
|
|
22822
|
+
Opal.const_set($nesting[0], 'MarkdownThematicBreakRx', /^ {0,3}([-*_])( *)\1\2\1$/);
|
|
22823
|
+
Opal.const_set($nesting[0], 'ExtLayoutBreakRx', /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/);
|
|
22824
|
+
Opal.const_set($nesting[0], 'BlankLineRx', /\n{2,}/);
|
|
22825
|
+
Opal.const_set($nesting[0], 'EscapedSpaceRx', /\\([ \t\n])/);
|
|
22826
|
+
Opal.const_set($nesting[0], 'ReplaceableTextRx', /[&']|--|\.\.\.|\([CRT]M?\)/);
|
|
22827
|
+
Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
|
|
22828
|
+
Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
|
|
22829
|
+
Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
|
|
22830
|
+
Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
|
|
22831
|
+
Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
|
|
22832
|
+
})($nesting[0], $nesting)
|
|
22833
|
+
};
|
|
22834
|
+
|
|
22698
22835
|
/* Generated by Opal 0.11.99.dev */
|
|
22699
22836
|
Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
22700
22837
|
function $rb_plus(lhs, rhs) {
|
|
@@ -22714,7 +22851,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
22714
22851
|
}
|
|
22715
22852
|
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;
|
|
22716
22853
|
|
|
22717
|
-
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']);
|
|
22854
|
+
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']);
|
|
22718
22855
|
return (function($base, $parent_nesting) {
|
|
22719
22856
|
var self = $module($base, 'Asciidoctor');
|
|
22720
22857
|
|
|
@@ -23207,7 +23344,12 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23207
23344
|
attrs = self.$parse_attributes((($c = $gvars['~']) === nil ? nil : $c['$[]'](2)), posattrs, $hash2(["unescape_input"], {"unescape_input": true}));
|
|
23208
23345
|
if (type['$==']("icon")) {
|
|
23209
23346
|
} else {
|
|
23210
|
-
|
|
23347
|
+
|
|
23348
|
+
doc.$register("images", target);
|
|
23349
|
+
|
|
23350
|
+
$writer = ["imagesdir", doc_attrs['$[]']("imagesdir")];
|
|
23351
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
23352
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
23211
23353
|
};
|
|
23212
23354
|
($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)]));
|
|
23213
23355
|
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))};
|
|
@@ -23548,7 +23690,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23548
23690
|
};
|
|
23549
23691
|
return $$($nesting, 'Inline').$new(self, "anchor", reftext, $hash2(["type", "id"], {"type": "ref", "id": id})).$convert();}, $$37.$$s = self, $$37.$$arity = 0, $$37))};
|
|
23550
23692
|
if ($truthy(($truthy($a = ($truthy($b = text['$include?']("&")) ? text['$include?'](";&l") : $b)) ? $a : ($truthy($b = found_macroish) ? text['$include?']("xref:") : $b)))) {
|
|
23551
|
-
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,
|
|
23693
|
+
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;
|
|
23552
23694
|
|
|
23553
23695
|
|
|
23554
23696
|
if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](0))['$start_with?']($$($nesting, 'RS')))) {
|
|
@@ -23582,20 +23724,24 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23582
23724
|
};
|
|
23583
23725
|
if ($truthy(macro)) {
|
|
23584
23726
|
if ($truthy(path['$end_with?'](".adoc"))) {
|
|
23585
|
-
src2src = (path = path.$slice(0, $rb_minus(path.$length(), 5)))
|
|
23586
|
-
|
|
23587
|
-
|
|
23727
|
+
src2src = (path = path.$slice(0, $rb_minus(path.$length(), 5)))
|
|
23728
|
+
} else if ($truthy($$($nesting, 'Helpers')['$extname?'](path)['$!']())) {
|
|
23729
|
+
src2src = path}
|
|
23730
|
+
} else if ($truthy($send(path, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys())))) {
|
|
23731
|
+
src2src = (path = path.$slice(0, path.$rindex(".")))
|
|
23588
23732
|
} else {
|
|
23589
23733
|
src2src = path
|
|
23590
23734
|
};
|
|
23591
23735
|
} else {
|
|
23592
23736
|
$c = [refid, refid.$slice(1, refid.$length())], (target = $c[0]), (fragment = $c[1]), $c
|
|
23593
23737
|
}
|
|
23594
|
-
} else if ($truthy(
|
|
23738
|
+
} else if ($truthy(macro)) {
|
|
23595
23739
|
if ($truthy(refid['$end_with?'](".adoc"))) {
|
|
23596
23740
|
src2src = (path = refid.$slice(0, $rb_minus(refid.$length(), 5)))
|
|
23597
|
-
} else {
|
|
23741
|
+
} else if ($truthy($$($nesting, 'Helpers')['$extname?'](refid))) {
|
|
23598
23742
|
path = refid
|
|
23743
|
+
} else {
|
|
23744
|
+
fragment = refid
|
|
23599
23745
|
}
|
|
23600
23746
|
} else {
|
|
23601
23747
|
fragment = refid
|
|
@@ -23636,7 +23782,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23636
23782
|
self.$logger().$info("" + "possible invalid reference: " + (refid))};
|
|
23637
23783
|
} else if ($truthy(doc.$catalog()['$[]']("refs")['$[]'](fragment))) {
|
|
23638
23784
|
$c = [fragment, "" + "#" + (fragment)], (refid = $c[0]), (target = $c[1]), $c
|
|
23639
|
-
} else if ($truthy(($truthy($c = (
|
|
23785
|
+
} else if ($truthy(($truthy($c = ($truthy($d = fragment['$include?'](" ")) ? $d : fragment.$downcase()['$!='](fragment))) ? (refid = doc.$resolve_id(fragment)) : $c))) {
|
|
23640
23786
|
$c = [refid, "" + "#" + (refid)], (fragment = $c[0]), (target = $c[1]), $c
|
|
23641
23787
|
} else {
|
|
23642
23788
|
|
|
@@ -24572,7 +24718,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
|
|
|
24572
24718
|
|
|
24573
24719
|
var $nesting = [self].concat($parent_nesting);
|
|
24574
24720
|
|
|
24575
|
-
Opal.const_set($nesting[0], 'VERSION', "2.0.
|
|
24721
|
+
Opal.const_set($nesting[0], 'VERSION', "2.0.9")
|
|
24576
24722
|
})($nesting[0], $nesting)
|
|
24577
24723
|
};
|
|
24578
24724
|
|
|
@@ -24586,7 +24732,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24586
24732
|
}
|
|
24587
24733
|
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;
|
|
24588
24734
|
|
|
24589
|
-
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?', '$
|
|
24735
|
+
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']);
|
|
24590
24736
|
return (function($base, $parent_nesting) {
|
|
24591
24737
|
var self = $module($base, 'Asciidoctor');
|
|
24592
24738
|
|
|
@@ -24595,7 +24741,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24595
24741
|
(function($base, $super, $parent_nesting) {
|
|
24596
24742
|
var self = $klass($base, $super, 'AbstractNode');
|
|
24597
24743
|
|
|
24598
|
-
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, $
|
|
24744
|
+
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;
|
|
24599
24745
|
|
|
24600
24746
|
self.$$prototype.document = self.$$prototype.attributes = self.$$prototype.parent = nil;
|
|
24601
24747
|
|
|
@@ -24758,7 +24904,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24758
24904
|
return nil;
|
|
24759
24905
|
}, $AbstractNode_set_option$11.$$arity = 1);
|
|
24760
24906
|
|
|
24761
|
-
Opal.def(self, '$
|
|
24907
|
+
Opal.def(self, '$enabled_options', $AbstractNode_enabled_options$12 = function $$enabled_options() {
|
|
24762
24908
|
var $$13, self = this;
|
|
24763
24909
|
|
|
24764
24910
|
return $send($$$('::', 'Set').$new(), 'tap', [], ($$13 = function(accum){var self = $$13.$$s || this, $$14;
|
|
@@ -24781,7 +24927,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24781
24927
|
} else {
|
|
24782
24928
|
return nil
|
|
24783
24929
|
};}, $$14.$$s = self, $$14.$$arity = 1, $$14));}, $$13.$$s = self, $$13.$$arity = 1, $$13))
|
|
24784
|
-
}, $
|
|
24930
|
+
}, $AbstractNode_enabled_options$12.$$arity = 0);
|
|
24785
24931
|
|
|
24786
24932
|
Opal.def(self, '$update_attributes', $AbstractNode_update_attributes$15 = function $$update_attributes(new_attributes) {
|
|
24787
24933
|
var self = this;
|
|
@@ -24897,8 +25043,12 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24897
25043
|
|
|
24898
25044
|
|
|
24899
25045
|
if ($truthy(self['$attr?']("icon"))) {
|
|
24900
|
-
|
|
24901
|
-
|
|
25046
|
+
|
|
25047
|
+
icon = self.$attr("icon");
|
|
25048
|
+
if ($truthy($$($nesting, 'Helpers')['$extname?'](icon))) {
|
|
25049
|
+
} else {
|
|
25050
|
+
icon = "" + (icon) + "." + (self.document.$attr("icontype", "png"))
|
|
25051
|
+
};
|
|
24902
25052
|
} else {
|
|
24903
25053
|
icon = "" + (name) + "." + (self.document.$attr("icontype", "png"))
|
|
24904
25054
|
};
|
|
@@ -24914,9 +25064,10 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24914
25064
|
asset_dir_key = "imagesdir";
|
|
24915
25065
|
};
|
|
24916
25066
|
if ($truthy(($truthy($a = $rb_lt((doc = self.document).$safe(), $$$($$($nesting, 'SafeMode'), 'SECURE'))) ? doc['$attr?']("data-uri") : $a))) {
|
|
24917
|
-
if ($truthy(($truthy($a = ($truthy($b = $$($nesting, 'Helpers')['$uriish?'](target_image)) ? (target_image = $$($nesting, 'Helpers').$
|
|
25067
|
+
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)))) {
|
|
24918
25068
|
if ($truthy(doc['$attr?']("allow-uri-read"))) {
|
|
24919
|
-
|
|
25069
|
+
|
|
25070
|
+
return self.$generate_data_uri_from_uri(target_image, doc['$attr?']("cache-uri"));
|
|
24920
25071
|
} else {
|
|
24921
25072
|
return target_image
|
|
24922
25073
|
}
|
|
@@ -24956,12 +25107,15 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
24956
25107
|
if (asset_dir_key == null) {
|
|
24957
25108
|
asset_dir_key = nil;
|
|
24958
25109
|
};
|
|
24959
|
-
ext =
|
|
24960
|
-
|
|
24961
|
-
|
|
25110
|
+
if ($truthy((ext = $$($nesting, 'Helpers').$extname(target_image, nil)))) {
|
|
25111
|
+
mimetype = (function() {if (ext['$=='](".svg")) {
|
|
25112
|
+
return "image/svg+xml"
|
|
25113
|
+
} else {
|
|
25114
|
+
return "" + "image/" + (ext.$slice(1, ext.$length()))
|
|
25115
|
+
}; return nil; })()
|
|
24962
25116
|
} else {
|
|
24963
|
-
|
|
24964
|
-
};
|
|
25117
|
+
mimetype = "application/octet-stream"
|
|
25118
|
+
};
|
|
24965
25119
|
if ($truthy(asset_dir_key)) {
|
|
24966
25120
|
image_path = self.$normalize_system_path(target_image, self.document.$attr(asset_dir_key), nil, $hash2(["target_name"], {"target_name": "image"}))
|
|
24967
25121
|
} else {
|
|
@@ -25078,7 +25232,7 @@ Opal.modules["asciidoctor/abstract_node"] = function(Opal) {
|
|
|
25078
25232
|
preserve_uri_target = true;
|
|
25079
25233
|
};
|
|
25080
25234
|
if ($truthy(($truthy($a = preserve_uri_target) ? $$($nesting, 'Helpers')['$uriish?'](target) : $a))) {
|
|
25081
|
-
return $$($nesting, 'Helpers').$
|
|
25235
|
+
return $$($nesting, 'Helpers').$encode_spaces_in_uri(target)
|
|
25082
25236
|
} else {
|
|
25083
25237
|
return self.document.$path_resolver().$web_path(target, start)
|
|
25084
25238
|
};
|
|
@@ -25192,7 +25346,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25192
25346
|
}
|
|
25193
25347
|
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;
|
|
25194
25348
|
|
|
25195
|
-
Opal.add_stubs(['$attr_reader', '$attr_writer', '$attr_accessor', '$===', '$level', '$file', '$lineno', '$playback_attributes', '$convert', '$converter', '$join', '$map', '$to_s', '
|
|
25349
|
+
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']);
|
|
25196
25350
|
return (function($base, $parent_nesting) {
|
|
25197
25351
|
var self = $module($base, 'Asciidoctor');
|
|
25198
25352
|
|
|
@@ -25215,7 +25369,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25215
25369
|
self.$attr_reader("subs");
|
|
25216
25370
|
|
|
25217
25371
|
Opal.def(self, '$initialize', $AbstractBlock_initialize$1 = function $$initialize(parent, context, opts) {
|
|
25218
|
-
var $iter = $AbstractBlock_initialize$1.$$p, $yield = $iter || nil, self = this, $
|
|
25372
|
+
var $a, $iter = $AbstractBlock_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil;
|
|
25219
25373
|
|
|
25220
25374
|
if ($iter) $AbstractBlock_initialize$1.$$p = null;
|
|
25221
25375
|
// Prepare super implicit arguments
|
|
@@ -25232,15 +25386,15 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25232
25386
|
self.blocks = [];
|
|
25233
25387
|
self.subs = [];
|
|
25234
25388
|
self.id = (self.title = (self.caption = (self.numeral = (self.style = (self.default_subs = (self.source_location = nil))))));
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
|
|
25238
|
-
|
|
25239
|
-
else
|
|
25240
|
-
return parent.$level()
|
|
25389
|
+
if ($truthy(($truthy($a = context['$==']("document")) ? $a : context['$==']("section")))) {
|
|
25390
|
+
|
|
25391
|
+
self.level = (self.next_section_index = 0);
|
|
25392
|
+
return (self.next_section_ordinal = 1);
|
|
25393
|
+
} else if ($truthy($$($nesting, 'AbstractBlock')['$==='](parent))) {
|
|
25394
|
+
return (self.level = parent.$level())
|
|
25241
25395
|
} else {
|
|
25242
|
-
return nil
|
|
25243
|
-
};
|
|
25396
|
+
return (self.level = nil)
|
|
25397
|
+
};
|
|
25244
25398
|
}, $AbstractBlock_initialize$1.$$arity = -3);
|
|
25245
25399
|
|
|
25246
25400
|
Opal.def(self, '$block?', $AbstractBlock_block$ques$2 = function() {
|
|
@@ -25424,7 +25578,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25424
25578
|
};
|
|
25425
25579
|
}
|
|
25426
25580
|
} else {
|
|
25427
|
-
return
|
|
25581
|
+
return ""
|
|
25428
25582
|
}
|
|
25429
25583
|
}, $AbstractBlock_alt$19.$$arity = 0);
|
|
25430
25584
|
|
|
@@ -25532,10 +25686,6 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25532
25686
|
|
|
25533
25687
|
|
|
25534
25688
|
|
|
25535
|
-
if (value == null) {
|
|
25536
|
-
value = nil;
|
|
25537
|
-
};
|
|
25538
|
-
|
|
25539
25689
|
if (caption_context == null) {
|
|
25540
25690
|
caption_context = self.context;
|
|
25541
25691
|
};
|
|
@@ -25548,7 +25698,7 @@ Opal.modules["asciidoctor/abstract_block"] = function(Opal) {
|
|
|
25548
25698
|
} else {
|
|
25549
25699
|
return nil
|
|
25550
25700
|
};
|
|
25551
|
-
}, $AbstractBlock_assign_caption$29.$$arity = -
|
|
25701
|
+
}, $AbstractBlock_assign_caption$29.$$arity = -2);
|
|
25552
25702
|
|
|
25553
25703
|
Opal.def(self, '$assign_numeral', $AbstractBlock_assign_numeral$30 = function $$assign_numeral(section) {
|
|
25554
25704
|
var $a, self = this, $writer = nil, like = nil, sectname = nil, caption = nil;
|
|
@@ -26331,7 +26481,7 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26331
26481
|
}
|
|
26332
26482
|
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;
|
|
26333
26483
|
|
|
26334
|
-
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', '$
|
|
26484
|
+
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']);
|
|
26335
26485
|
return (function($base, $parent_nesting) {
|
|
26336
26486
|
var self = $module($base, 'Asciidoctor');
|
|
26337
26487
|
|
|
@@ -26340,7 +26490,7 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26340
26490
|
(function($base, $parent_nesting) {
|
|
26341
26491
|
var self = $module($base, 'Converter');
|
|
26342
26492
|
|
|
26343
|
-
var $nesting = [self].concat($parent_nesting), $Converter_initialize$1, $Converter_convert$2, $Converter_handles$ques$3, $Converter_derive_backend_traits$4, $a, $Converter_included$
|
|
26493
|
+
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;
|
|
26344
26494
|
|
|
26345
26495
|
|
|
26346
26496
|
self.$autoload("CompositeConverter", "" + (self.$__dir__()) + "/converter/composite");
|
|
@@ -26532,23 +26682,30 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26532
26682
|
|
|
26533
26683
|
|
|
26534
26684
|
Opal.def(self, '$register_for', $Config_register_for$14 = function $$register_for($a) {
|
|
26535
|
-
var $post_args, backends, self = this;
|
|
26685
|
+
var $post_args, backends, $$15, self = this;
|
|
26536
26686
|
|
|
26537
26687
|
|
|
26538
26688
|
|
|
26539
26689
|
$post_args = Opal.slice.call(arguments, 0, arguments.length);
|
|
26540
26690
|
|
|
26541
26691
|
backends = $post_args;;
|
|
26542
|
-
return $send($$($nesting, 'Converter'), 'register', [self].concat(Opal.to_a(backends)
|
|
26692
|
+
return $send($$($nesting, 'Converter'), 'register', [self].concat(Opal.to_a($send(backends, 'map', [], ($$15 = function(backend){var self = $$15.$$s || this;
|
|
26693
|
+
|
|
26694
|
+
|
|
26695
|
+
|
|
26696
|
+
if (backend == null) {
|
|
26697
|
+
backend = nil;
|
|
26698
|
+
};
|
|
26699
|
+
return backend.$to_s();}, $$15.$$s = self, $$15.$$arity = 1, $$15)))));
|
|
26543
26700
|
}, $Config_register_for$14.$$arity = -1)
|
|
26544
26701
|
})($nesting[0], $nesting);
|
|
26545
26702
|
(function($base, $parent_nesting) {
|
|
26546
26703
|
var self = $module($base, 'Factory');
|
|
26547
26704
|
|
|
26548
|
-
var $nesting = [self].concat($parent_nesting), $Factory_new$
|
|
26705
|
+
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;
|
|
26549
26706
|
|
|
26550
26707
|
|
|
26551
|
-
Opal.defs(self, '$new', $Factory_new$
|
|
26708
|
+
Opal.defs(self, '$new', $Factory_new$16 = function($a, $b) {
|
|
26552
26709
|
var $post_args, $kwargs, converters, proxy_default, self = this;
|
|
26553
26710
|
|
|
26554
26711
|
|
|
@@ -26582,8 +26739,8 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26582
26739
|
|
|
26583
26740
|
return $$($nesting, 'CustomFactory').$new(converters);
|
|
26584
26741
|
};
|
|
26585
|
-
}, $Factory_new$
|
|
26586
|
-
Opal.defs(self, '$default', $Factory_default$
|
|
26742
|
+
}, $Factory_new$16.$$arity = -1);
|
|
26743
|
+
Opal.defs(self, '$default', $Factory_default$17 = function($a) {
|
|
26587
26744
|
var $post_args, args, self = this;
|
|
26588
26745
|
|
|
26589
26746
|
|
|
@@ -26592,8 +26749,8 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26592
26749
|
|
|
26593
26750
|
args = $post_args;;
|
|
26594
26751
|
return $$($nesting, 'Converter');
|
|
26595
|
-
}, $Factory_default$
|
|
26596
|
-
Opal.defs(self, '$create', $Factory_create$
|
|
26752
|
+
}, $Factory_default$17.$$arity = -1);
|
|
26753
|
+
Opal.defs(self, '$create', $Factory_create$18 = function $$create(backend, opts) {
|
|
26597
26754
|
var self = this;
|
|
26598
26755
|
|
|
26599
26756
|
|
|
@@ -26602,17 +26759,17 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26602
26759
|
opts = $hash2([], {});
|
|
26603
26760
|
};
|
|
26604
26761
|
return self.$default().$create(backend, opts);
|
|
26605
|
-
}, $Factory_create$
|
|
26762
|
+
}, $Factory_create$18.$$arity = -2);
|
|
26606
26763
|
|
|
26607
|
-
Opal.def(self, '$register', $Factory_register$
|
|
26608
|
-
var $post_args, backends, $$
|
|
26764
|
+
Opal.def(self, '$register', $Factory_register$19 = function $$register(converter, $a) {
|
|
26765
|
+
var $post_args, backends, $$20, self = this;
|
|
26609
26766
|
|
|
26610
26767
|
|
|
26611
26768
|
|
|
26612
26769
|
$post_args = Opal.slice.call(arguments, 1, arguments.length);
|
|
26613
26770
|
|
|
26614
26771
|
backends = $post_args;;
|
|
26615
|
-
return $send(backends, 'each', [], ($$
|
|
26772
|
+
return $send(backends, 'each', [], ($$20 = function(backend){var self = $$20.$$s || this, $writer = nil;
|
|
26616
26773
|
|
|
26617
26774
|
|
|
26618
26775
|
|
|
@@ -26631,16 +26788,16 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26631
26788
|
$writer = [backend, converter];
|
|
26632
26789
|
$send(self.$registry(), '[]=', Opal.to_a($writer));
|
|
26633
26790
|
return $writer[$rb_minus($writer["length"], 1)];;
|
|
26634
|
-
};}, $$
|
|
26635
|
-
}, $Factory_register$
|
|
26791
|
+
};}, $$20.$$s = self, $$20.$$arity = 1, $$20));
|
|
26792
|
+
}, $Factory_register$19.$$arity = -2);
|
|
26636
26793
|
|
|
26637
|
-
Opal.def(self, '$for', $Factory_for$
|
|
26794
|
+
Opal.def(self, '$for', $Factory_for$21 = function(backend) {
|
|
26638
26795
|
var self = this;
|
|
26639
26796
|
|
|
26640
26797
|
return self.$registry()['$[]'](backend)
|
|
26641
|
-
}, $Factory_for$
|
|
26798
|
+
}, $Factory_for$21.$$arity = 1);
|
|
26642
26799
|
|
|
26643
|
-
Opal.def(self, '$create', $Factory_create$
|
|
26800
|
+
Opal.def(self, '$create', $Factory_create$22 = function $$create(backend, opts) {
|
|
26644
26801
|
var $a, $b, self = this, converter = nil, template_dirs = nil, delegate_backend = nil;
|
|
26645
26802
|
|
|
26646
26803
|
|
|
@@ -26669,30 +26826,30 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26669
26826
|
} else {
|
|
26670
26827
|
return nil
|
|
26671
26828
|
};
|
|
26672
|
-
}, $Factory_create$
|
|
26829
|
+
}, $Factory_create$22.$$arity = -2);
|
|
26673
26830
|
|
|
26674
|
-
Opal.def(self, '$converters', $Factory_converters$
|
|
26831
|
+
Opal.def(self, '$converters', $Factory_converters$23 = function $$converters() {
|
|
26675
26832
|
var self = this;
|
|
26676
26833
|
|
|
26677
26834
|
return self.$registry().$merge()
|
|
26678
|
-
}, $Factory_converters$
|
|
26835
|
+
}, $Factory_converters$23.$$arity = 0);
|
|
26679
26836
|
self.$private();
|
|
26680
26837
|
|
|
26681
|
-
Opal.def(self, '$registry', $Factory_registry$
|
|
26838
|
+
Opal.def(self, '$registry', $Factory_registry$24 = function $$registry() {
|
|
26682
26839
|
var self = this;
|
|
26683
26840
|
|
|
26684
26841
|
return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method")
|
|
26685
|
-
}, $Factory_registry$
|
|
26842
|
+
}, $Factory_registry$24.$$arity = 0);
|
|
26686
26843
|
})($nesting[0], $nesting);
|
|
26687
26844
|
(function($base, $super, $parent_nesting) {
|
|
26688
26845
|
var self = $klass($base, $super, 'CustomFactory');
|
|
26689
26846
|
|
|
26690
|
-
var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$
|
|
26847
|
+
var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$25, $CustomFactory_unregister_all$26;
|
|
26691
26848
|
|
|
26692
26849
|
|
|
26693
26850
|
self.$include($$($nesting, 'Factory'));
|
|
26694
26851
|
|
|
26695
|
-
Opal.def(self, '$initialize', $CustomFactory_initialize$
|
|
26852
|
+
Opal.def(self, '$initialize', $CustomFactory_initialize$25 = function $$initialize(seed_registry) {
|
|
26696
26853
|
var self = this, $writer = nil;
|
|
26697
26854
|
|
|
26698
26855
|
|
|
@@ -26710,34 +26867,34 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26710
26867
|
} else {
|
|
26711
26868
|
return (self.registry = $hash2([], {}))
|
|
26712
26869
|
};
|
|
26713
|
-
}, $CustomFactory_initialize$
|
|
26870
|
+
}, $CustomFactory_initialize$25.$$arity = -1);
|
|
26714
26871
|
|
|
26715
|
-
Opal.def(self, '$unregister_all', $CustomFactory_unregister_all$
|
|
26872
|
+
Opal.def(self, '$unregister_all', $CustomFactory_unregister_all$26 = function $$unregister_all() {
|
|
26716
26873
|
var self = this, $writer = nil;
|
|
26717
26874
|
|
|
26718
26875
|
|
|
26719
26876
|
$writer = [nil];
|
|
26720
26877
|
$send(self.$registry().$clear(), 'default=', Opal.to_a($writer));
|
|
26721
26878
|
return $writer[$rb_minus($writer["length"], 1)];
|
|
26722
|
-
}, $CustomFactory_unregister_all$
|
|
26879
|
+
}, $CustomFactory_unregister_all$26.$$arity = 0);
|
|
26723
26880
|
self.$private();
|
|
26724
26881
|
return self.$attr_reader("registry");
|
|
26725
26882
|
})($nesting[0], null, $nesting);
|
|
26726
26883
|
(function($base, $parent_nesting) {
|
|
26727
26884
|
var self = $module($base, 'DefaultFactory');
|
|
26728
26885
|
|
|
26729
|
-
var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$
|
|
26886
|
+
var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$27;
|
|
26730
26887
|
|
|
26731
26888
|
|
|
26732
26889
|
self.$include($$($nesting, 'Factory'));
|
|
26733
26890
|
self.$private();
|
|
26734
26891
|
(Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {})));
|
|
26735
26892
|
|
|
26736
|
-
Opal.def(self, '$registry', $DefaultFactory_registry$
|
|
26893
|
+
Opal.def(self, '$registry', $DefaultFactory_registry$27 = function $$registry() {
|
|
26737
26894
|
var $a, self = this;
|
|
26738
26895
|
|
|
26739
26896
|
return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a)
|
|
26740
|
-
}, $DefaultFactory_registry$
|
|
26897
|
+
}, $DefaultFactory_registry$27.$$arity = 0);
|
|
26741
26898
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
26742
26899
|
} else {
|
|
26743
26900
|
nil
|
|
@@ -26756,23 +26913,23 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26756
26913
|
return nil
|
|
26757
26914
|
};
|
|
26758
26915
|
})($nesting[0], $$($nesting, 'CustomFactory'), $nesting);
|
|
26759
|
-
self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Converter_included$
|
|
26916
|
+
self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $Converter_included$28 = function $$included(into) {
|
|
26760
26917
|
var self = this;
|
|
26761
26918
|
|
|
26762
26919
|
|
|
26763
26920
|
into.$send("include", $$($nesting, 'BackendTraits'));
|
|
26764
26921
|
return into.$extend($$($nesting, 'Config'));
|
|
26765
|
-
}, $Converter_included$
|
|
26922
|
+
}, $Converter_included$28.$$arity = 1), nil) && 'included') ? $a : "included"));
|
|
26766
26923
|
(function($base, $super, $parent_nesting) {
|
|
26767
26924
|
var self = $klass($base, $super, 'Base');
|
|
26768
26925
|
|
|
26769
|
-
var $nesting = [self].concat($parent_nesting), $Base_convert$
|
|
26926
|
+
var $nesting = [self].concat($parent_nesting), $Base_convert$29, $Base_handles$ques$30, $Base_content_only$31, $Base_skip$32;
|
|
26770
26927
|
|
|
26771
26928
|
self.$$prototype.backend = nil;
|
|
26772
26929
|
|
|
26773
26930
|
self.$include($$($nesting, 'Converter'), $$($nesting, 'Logging'));
|
|
26774
26931
|
|
|
26775
|
-
Opal.def(self, '$convert', $Base_convert$
|
|
26932
|
+
Opal.def(self, '$convert', $Base_convert$29 = function $$convert(node, transform, opts) {
|
|
26776
26933
|
var $a, $b, self = this, ex = nil;
|
|
26777
26934
|
if ($gvars["!"] == null) $gvars["!"] = nil;
|
|
26778
26935
|
|
|
@@ -26806,24 +26963,24 @@ Opal.modules["asciidoctor/converter"] = function(Opal) {
|
|
|
26806
26963
|
} finally { Opal.pop_exception() }
|
|
26807
26964
|
} else { throw $err; }
|
|
26808
26965
|
};
|
|
26809
|
-
}, $Base_convert$
|
|
26966
|
+
}, $Base_convert$29.$$arity = -2);
|
|
26810
26967
|
|
|
26811
|
-
Opal.def(self, '$handles?', $Base_handles$ques$
|
|
26968
|
+
Opal.def(self, '$handles?', $Base_handles$ques$30 = function(transform) {
|
|
26812
26969
|
var self = this;
|
|
26813
26970
|
|
|
26814
26971
|
return self['$respond_to?']("" + "convert_" + (transform))
|
|
26815
|
-
}, $Base_handles$ques$
|
|
26972
|
+
}, $Base_handles$ques$30.$$arity = 1);
|
|
26816
26973
|
|
|
26817
|
-
Opal.def(self, '$content_only', $Base_content_only$
|
|
26974
|
+
Opal.def(self, '$content_only', $Base_content_only$31 = function $$content_only(node) {
|
|
26818
26975
|
var self = this;
|
|
26819
26976
|
|
|
26820
26977
|
return node.$content()
|
|
26821
|
-
}, $Base_content_only$
|
|
26822
|
-
return (Opal.def(self, '$skip', $Base_skip$
|
|
26978
|
+
}, $Base_content_only$31.$$arity = 1);
|
|
26979
|
+
return (Opal.def(self, '$skip', $Base_skip$32 = function $$skip(node) {
|
|
26823
26980
|
var self = this;
|
|
26824
26981
|
|
|
26825
26982
|
return nil
|
|
26826
|
-
}, $Base_skip$
|
|
26983
|
+
}, $Base_skip$32.$$arity = 1), nil) && 'skip';
|
|
26827
26984
|
})($nesting[0], null, $nesting);
|
|
26828
26985
|
self.$extend($$($nesting, 'DefaultFactory'));
|
|
26829
26986
|
})($nesting[0], $nesting)
|
|
@@ -26849,7 +27006,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
26849
27006
|
}
|
|
26850
27007
|
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;
|
|
26851
27008
|
|
|
26852
|
-
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', '$
|
|
27009
|
+
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']);
|
|
26853
27010
|
return (function($base, $parent_nesting) {
|
|
26854
27011
|
var self = $module($base, 'Asciidoctor');
|
|
26855
27012
|
|
|
@@ -27057,7 +27214,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27057
27214
|
return $writer[$rb_minus($writer["length"], 1)];;}, $$9.$$s = self, $$9.$$arity = 2, $$9));
|
|
27058
27215
|
if ($truthy((to_file = options['$[]']("to_file")))) {
|
|
27059
27216
|
|
|
27060
|
-
$writer = ["outfilesuffix",
|
|
27217
|
+
$writer = ["outfilesuffix", $$($nesting, 'Helpers').$extname(to_file)];
|
|
27061
27218
|
$send(attr_overrides, '[]=', Opal.to_a($writer));
|
|
27062
27219
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
27063
27220
|
if ($truthy((safe_mode = options['$[]']("safe"))['$!']())) {
|
|
@@ -27093,8 +27250,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27093
27250
|
$send(options, '[]=', Opal.to_a($writer));
|
|
27094
27251
|
$writer[$rb_minus($writer["length"], 1)];};
|
|
27095
27252
|
};
|
|
27096
|
-
self.parsed =
|
|
27097
|
-
self.header = (self.header_attributes = nil);
|
|
27253
|
+
self.parsed = (self.reftexts = (self.header = (self.header_attributes = nil)));
|
|
27098
27254
|
self.counters = $hash2([], {});
|
|
27099
27255
|
self.attributes_modified = $$$('::', 'Set').$new();
|
|
27100
27256
|
self.docinfo_processor_extensions = $hash2([], {});
|
|
@@ -27493,7 +27649,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27493
27649
|
else {if ($truthy(self.options['$[]']("catalog_assets"))) {
|
|
27494
27650
|
return self.catalog['$[]'](type)['$<<']((function() {if (type['$==']("images")) {
|
|
27495
27651
|
|
|
27496
|
-
return $$($nesting, 'ImageReference').$new(value
|
|
27652
|
+
return $$($nesting, 'ImageReference').$new(value, self.attributes['$[]']("imagesdir"));
|
|
27497
27653
|
} else {
|
|
27498
27654
|
return value
|
|
27499
27655
|
}; return nil; })())
|
|
@@ -27503,10 +27659,12 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27503
27659
|
}, $Document_register$17.$$arity = 2);
|
|
27504
27660
|
|
|
27505
27661
|
Opal.def(self, '$resolve_id', $Document_resolve_id$18 = function $$resolve_id(text) {
|
|
27506
|
-
var
|
|
27662
|
+
var $$19, $$21, self = this, resolved_id = nil;
|
|
27507
27663
|
|
|
27508
|
-
|
|
27509
|
-
return $
|
|
27664
|
+
if ($truthy(self.reftexts)) {
|
|
27665
|
+
return self.reftexts['$[]'](text)
|
|
27666
|
+
} else if ($truthy(self.parsed)) {
|
|
27667
|
+
return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20;
|
|
27510
27668
|
if (self.catalog == null) self.catalog = nil;
|
|
27511
27669
|
|
|
27512
27670
|
|
|
@@ -27514,7 +27672,7 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27514
27672
|
if (accum == null) {
|
|
27515
27673
|
accum = nil;
|
|
27516
27674
|
};
|
|
27517
|
-
return $send(self.catalog['$[]']("refs"), 'each', [], ($$20 = function(id, ref){var self = $$20.$$s || this, $writer = nil;
|
|
27675
|
+
return $send(self.catalog['$[]']("refs"), 'each', [], ($$20 = function(id, ref){var self = $$20.$$s || this, $a, $writer = nil;
|
|
27518
27676
|
|
|
27519
27677
|
|
|
27520
27678
|
|
|
@@ -27525,38 +27683,42 @@ Opal.modules["asciidoctor/document"] = function(Opal) {
|
|
|
27525
27683
|
if (ref == null) {
|
|
27526
27684
|
ref = nil;
|
|
27527
27685
|
};
|
|
27528
|
-
$writer = [ref.$xreftext(), id];
|
|
27529
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
27530
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$20.$$s = self, $$20.$$arity = 2, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))
|
|
27686
|
+
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)
|
|
27531
27687
|
} else {
|
|
27532
|
-
return nil
|
|
27533
|
-
}; return nil; })()))) ? $a : $send($hash2([], {}), 'tap', [], ($$21 = function(accum){var self = $$21.$$s || this, $$22;
|
|
27534
|
-
if (self.catalog == null) self.catalog = nil;
|
|
27535
|
-
|
|
27536
|
-
|
|
27537
27688
|
|
|
27538
|
-
|
|
27539
|
-
|
|
27540
|
-
|
|
27541
|
-
return $send(self.catalog['$[]']("refs"), 'find', [], ($$22 = function(id, ref){var self = $$22.$$s || this, $writer = nil;
|
|
27689
|
+
resolved_id = nil;
|
|
27690
|
+
(function(){var $brk = Opal.new_brk(); try {return $send((self.reftexts = $hash2([], {})), 'tap', [], ($$21 = function(accum){var self = $$21.$$s || this, $$22;
|
|
27691
|
+
if (self.catalog == null) self.catalog = nil;
|
|
27542
27692
|
|
|
27543
27693
|
|
|
27544
27694
|
|
|
27545
|
-
if (
|
|
27546
|
-
|
|
27695
|
+
if (accum == null) {
|
|
27696
|
+
accum = nil;
|
|
27547
27697
|
};
|
|
27698
|
+
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;
|
|
27699
|
+
|
|
27548
27700
|
|
|
27549
|
-
if (ref == null) {
|
|
27550
|
-
ref = nil;
|
|
27551
|
-
};
|
|
27552
|
-
if (ref.$xreftext()['$=='](text)) {
|
|
27553
27701
|
|
|
27554
|
-
|
|
27555
|
-
|
|
27556
|
-
|
|
27557
|
-
|
|
27558
|
-
|
|
27559
|
-
|
|
27702
|
+
if (id == null) {
|
|
27703
|
+
id = nil;
|
|
27704
|
+
};
|
|
27705
|
+
|
|
27706
|
+
if (ref == null) {
|
|
27707
|
+
ref = nil;
|
|
27708
|
+
};
|
|
27709
|
+
if ((xreftext = ref.$xreftext())['$=='](text)) {
|
|
27710
|
+
|
|
27711
|
+
|
|
27712
|
+
Opal.brk((resolved_id = id), $brk);
|
|
27713
|
+
} else {
|
|
27714
|
+
|
|
27715
|
+
return ($truthy($a = accum['$[]'](xreftext)) ? $a : (($writer = [xreftext, id]), $send(accum, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
27716
|
+
};}, $$22.$$s = self, $$22.$$brk = $brk, $$22.$$arity = 2, $$22))
|
|
27717
|
+
} catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();}, $$21.$$s = self, $$21.$$brk = $brk, $$21.$$arity = 1, $$21))
|
|
27718
|
+
} catch (err) { if (err === $brk) { return err.$v } else { throw err } }})();
|
|
27719
|
+
self.reftexts = nil;
|
|
27720
|
+
return resolved_id;
|
|
27721
|
+
}
|
|
27560
27722
|
}, $Document_resolve_id$18.$$arity = 1);
|
|
27561
27723
|
|
|
27562
27724
|
Opal.def(self, '$footnotes?', $Document_footnotes$ques$23 = function() {
|
|
@@ -28681,9 +28843,9 @@ Opal.modules["asciidoctor/inline"] = function(Opal) {
|
|
|
28681
28843
|
Opal.alias(self, "render", "convert");
|
|
28682
28844
|
|
|
28683
28845
|
Opal.def(self, '$alt', $Inline_alt$5 = function $$alt() {
|
|
28684
|
-
var self = this;
|
|
28846
|
+
var $a, self = this;
|
|
28685
28847
|
|
|
28686
|
-
return self.$attr("alt")
|
|
28848
|
+
return ($truthy($a = self.$attr("alt")) ? $a : "")
|
|
28687
28849
|
}, $Inline_alt$5.$$arity = 0);
|
|
28688
28850
|
|
|
28689
28851
|
Opal.def(self, '$reftext?', $Inline_reftext$ques$6 = function() {
|
|
@@ -28882,7 +29044,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
28882
29044
|
}
|
|
28883
29045
|
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;
|
|
28884
29046
|
|
|
28885
|
-
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', '$
|
|
29047
|
+
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', '$%']);
|
|
28886
29048
|
return (function($base, $parent_nesting) {
|
|
28887
29049
|
var self = $module($base, 'Asciidoctor');
|
|
28888
29050
|
|
|
@@ -29490,7 +29652,11 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
29490
29652
|
}};
|
|
29491
29653
|
if (blk_ctx['$==']("image")) {
|
|
29492
29654
|
|
|
29493
|
-
document.$register("images",
|
|
29655
|
+
document.$register("images", target);
|
|
29656
|
+
|
|
29657
|
+
$writer = ["imagesdir", doc_attrs['$[]']("imagesdir")];
|
|
29658
|
+
$send(attributes, '[]=', Opal.to_a($writer));
|
|
29659
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
29494
29660
|
($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)]));
|
|
29495
29661
|
if ($truthy((scaledwidth = attributes.$delete("scaledwidth"))['$nil_or_empty?']())) {
|
|
29496
29662
|
} else {
|
|
@@ -30675,7 +30841,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
30675
30841
|
if ($truthy(this_line)) {
|
|
30676
30842
|
reader.$unshift_line(this_line)};
|
|
30677
30843
|
if ($truthy(detached_continuation)) {
|
|
30678
|
-
|
|
30844
|
+
|
|
30845
|
+
$writer = [detached_continuation, ""];
|
|
30846
|
+
$send(buffer, '[]=', Opal.to_a($writer));
|
|
30847
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
30679
30848
|
while (!($truthy(buffer['$empty?']()))) {
|
|
30680
30849
|
if ($truthy((last_line = buffer['$[]'](-1))['$empty?']())) {
|
|
30681
30850
|
buffer.$pop()
|
|
@@ -32165,9 +32334,9 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
|
|
|
32165
32334
|
function $rb_gt(lhs, rhs) {
|
|
32166
32335
|
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs > rhs : lhs['$>'](rhs);
|
|
32167
32336
|
}
|
|
32168
|
-
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;
|
|
32337
|
+
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;
|
|
32169
32338
|
|
|
32170
|
-
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?', '$
|
|
32339
|
+
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', '$=~']);
|
|
32171
32340
|
return (function($base, $parent_nesting) {
|
|
32172
32341
|
var self = $module($base, 'Asciidoctor');
|
|
32173
32342
|
|
|
@@ -32176,7 +32345,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
|
|
|
32176
32345
|
(function($base, $super, $parent_nesting) {
|
|
32177
32346
|
var self = $klass($base, $super, 'PathResolver');
|
|
32178
32347
|
|
|
32179
|
-
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;
|
|
32348
|
+
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;
|
|
32180
32349
|
|
|
32181
32350
|
self.$$prototype.file_separator = self.$$prototype._partition_path_web = self.$$prototype._partition_path_sys = self.$$prototype.working_dir = nil;
|
|
32182
32351
|
|
|
@@ -32534,7 +32703,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
|
|
|
32534
32703
|
return self.$join_path(resolved_segments, jail_root)
|
|
32535
32704
|
};
|
|
32536
32705
|
}, $PathResolver_system_path$13.$$arity = -2);
|
|
32537
|
-
|
|
32706
|
+
|
|
32707
|
+
Opal.def(self, '$web_path', $PathResolver_web_path$16 = function $$web_path(target, start) {
|
|
32538
32708
|
var $a, $b, $$17, self = this, uri_prefix = nil, target_segments = nil, target_root = nil, resolved_segments = nil, resolved_path = nil;
|
|
32539
32709
|
|
|
32540
32710
|
|
|
@@ -32544,17 +32714,13 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
|
|
|
32544
32714
|
};
|
|
32545
32715
|
target = self.$posixify(target);
|
|
32546
32716
|
start = self.$posixify(start);
|
|
32547
|
-
uri_prefix = nil;
|
|
32548
32717
|
if ($truthy(($truthy($a = start['$nil_or_empty?']()) ? $a : self['$web_root?'](target)))) {
|
|
32549
32718
|
} else {
|
|
32550
|
-
|
|
32551
|
-
|
|
32552
|
-
return "" + (start) + (target)
|
|
32719
|
+
$b = self.$extract_uri_prefix("" + (start) + ((function() {if ($truthy(start['$end_with?']($$($nesting, 'SLASH')))) {
|
|
32720
|
+
return ""
|
|
32553
32721
|
} else {
|
|
32554
|
-
return
|
|
32555
|
-
}; return nil; })()
|
|
32556
|
-
if ($truthy((uri_prefix = $$($nesting, 'Helpers').$uri_prefix(target)))) {
|
|
32557
|
-
target = target['$[]'](Opal.Range.$new(uri_prefix.$length(), -1, false))};
|
|
32722
|
+
return $$($nesting, 'SLASH')
|
|
32723
|
+
}; return nil; })()) + (target)), $a = Opal.to_ary($b), (target = ($a[0] == null ? nil : $a[0])), (uri_prefix = ($a[1] == null ? nil : $a[1])), $b
|
|
32558
32724
|
};
|
|
32559
32725
|
$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;
|
|
32560
32726
|
resolved_segments = [];
|
|
@@ -32587,7 +32753,17 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {
|
|
|
32587
32753
|
} else {
|
|
32588
32754
|
return resolved_path
|
|
32589
32755
|
};
|
|
32590
|
-
}, $PathResolver_web_path$16.$$arity = -2)
|
|
32756
|
+
}, $PathResolver_web_path$16.$$arity = -2);
|
|
32757
|
+
self.$private();
|
|
32758
|
+
return (Opal.def(self, '$extract_uri_prefix', $PathResolver_extract_uri_prefix$18 = function $$extract_uri_prefix(str) {
|
|
32759
|
+
var $a, self = this;
|
|
32760
|
+
|
|
32761
|
+
if ($truthy(($truthy($a = str['$include?'](":")) ? $$($nesting, 'UriSniffRx')['$=~'](str) : $a))) {
|
|
32762
|
+
return [str.$slice((($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$length(), str.$length()), (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))]
|
|
32763
|
+
} else {
|
|
32764
|
+
return str
|
|
32765
|
+
}
|
|
32766
|
+
}, $PathResolver_extract_uri_prefix$18.$$arity = 1), nil) && 'extract_uri_prefix';
|
|
32591
32767
|
})($nesting[0], null, $nesting)
|
|
32592
32768
|
})($nesting[0], $nesting)
|
|
32593
32769
|
};
|
|
@@ -32617,7 +32793,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
|
|
|
32617
32793
|
}
|
|
32618
32794
|
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;
|
|
32619
32795
|
|
|
32620
|
-
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', '$
|
|
32796
|
+
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']);
|
|
32621
32797
|
return (function($base, $parent_nesting) {
|
|
32622
32798
|
var self = $module($base, 'Asciidoctor');
|
|
32623
32799
|
|
|
@@ -33385,17 +33561,21 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
|
|
|
33385
33561
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
33386
33562
|
file = file.$to_s();
|
|
33387
33563
|
};
|
|
33388
|
-
path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file));
|
|
33389
|
-
self.process_lines =
|
|
33564
|
+
self.path = (path = ($truthy($a = path) ? $a : $$$('::', 'File').$basename(file)));
|
|
33565
|
+
if ($truthy((self.process_lines = $send(file, 'end_with?', Opal.to_a($$($nesting, 'ASCIIDOC_EXTENSIONS').$keys()))))) {
|
|
33566
|
+
|
|
33567
|
+
$writer = [path.$slice(0, path.$rindex(".")), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
|
|
33568
|
+
return nil
|
|
33569
|
+
} else {
|
|
33570
|
+
return true
|
|
33571
|
+
}; return nil; })()];
|
|
33572
|
+
$send(self.includes, '[]=', Opal.to_a($writer));
|
|
33573
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
33390
33574
|
} else {
|
|
33391
33575
|
|
|
33392
33576
|
self.dir = ".";
|
|
33393
33577
|
self.process_lines = true;
|
|
33394
|
-
|
|
33395
|
-
if ($truthy(path)) {
|
|
33396
|
-
|
|
33397
|
-
self.path = path;
|
|
33398
|
-
if ($truthy(self.process_lines)) {
|
|
33578
|
+
if ($truthy((self.path = path))) {
|
|
33399
33579
|
|
|
33400
33580
|
$writer = [$$($nesting, 'Helpers').$rootname(path), (function() {if ($truthy(attributes['$[]']("partial-option"))) {
|
|
33401
33581
|
return nil
|
|
@@ -33403,9 +33583,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
|
|
|
33403
33583
|
return true
|
|
33404
33584
|
}; return nil; })()];
|
|
33405
33585
|
$send(self.includes, '[]=', Opal.to_a($writer));
|
|
33406
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
33407
|
-
|
|
33408
|
-
|
|
33586
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
33587
|
+
} else {
|
|
33588
|
+
self.path = "<stdin>"
|
|
33589
|
+
};
|
|
33409
33590
|
};
|
|
33410
33591
|
self.lineno = lineno;
|
|
33411
33592
|
if ($truthy(($truthy($a = self.maxdepth) ? attributes['$key?']("depth") : $a))) {
|
|
@@ -35510,6 +35691,423 @@ Opal.modules["asciidoctor/writer"] = function(Opal) {
|
|
|
35510
35691
|
})($nesting[0], $nesting)
|
|
35511
35692
|
};
|
|
35512
35693
|
|
|
35694
|
+
/* Generated by Opal 0.11.99.dev */
|
|
35695
|
+
Opal.modules["asciidoctor/load"] = function(Opal) {
|
|
35696
|
+
function $rb_minus(lhs, rhs) {
|
|
35697
|
+
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
|
|
35698
|
+
}
|
|
35699
|
+
function $rb_plus(lhs, rhs) {
|
|
35700
|
+
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
|
|
35701
|
+
}
|
|
35702
|
+
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;
|
|
35703
|
+
|
|
35704
|
+
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']);
|
|
35705
|
+
return (function($base, $parent_nesting) {
|
|
35706
|
+
var self = $module($base, 'Asciidoctor');
|
|
35707
|
+
|
|
35708
|
+
var $nesting = [self].concat($parent_nesting), $Asciidoctor_load$1, $Asciidoctor_load_file$8;
|
|
35709
|
+
|
|
35710
|
+
|
|
35711
|
+
self.$module_function();
|
|
35712
|
+
|
|
35713
|
+
Opal.def(self, '$load', $Asciidoctor_load$1 = function $$load(input, options) {
|
|
35714
|
+
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;
|
|
35715
|
+
|
|
35716
|
+
|
|
35717
|
+
|
|
35718
|
+
if (options == null) {
|
|
35719
|
+
options = $hash2([], {});
|
|
35720
|
+
};
|
|
35721
|
+
try {
|
|
35722
|
+
|
|
35723
|
+
options = options.$merge();
|
|
35724
|
+
if ($truthy((timings = options['$[]']("timings")))) {
|
|
35725
|
+
timings.$start("read")};
|
|
35726
|
+
if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
|
|
35727
|
+
|
|
35728
|
+
$writer = [logger];
|
|
35729
|
+
$send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
|
|
35730
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
35731
|
+
if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
|
|
35732
|
+
attrs = $hash2([], {})
|
|
35733
|
+
} else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
|
|
35734
|
+
attrs = attrs.$merge()
|
|
35735
|
+
} 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))) {
|
|
35736
|
+
attrs = attrs.$dup()
|
|
35737
|
+
} else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
|
|
35738
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$2 = function(accum){var self = $$2.$$s || this, $$3;
|
|
35739
|
+
|
|
35740
|
+
|
|
35741
|
+
|
|
35742
|
+
if (accum == null) {
|
|
35743
|
+
accum = nil;
|
|
35744
|
+
};
|
|
35745
|
+
return $send(attrs, 'each', [], ($$3 = function(entry){var self = $$3.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
|
|
35746
|
+
|
|
35747
|
+
|
|
35748
|
+
|
|
35749
|
+
if (entry == null) {
|
|
35750
|
+
entry = nil;
|
|
35751
|
+
};
|
|
35752
|
+
$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;
|
|
35753
|
+
|
|
35754
|
+
$writer = [k, v];
|
|
35755
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
35756
|
+
return $writer[$rb_minus($writer["length"], 1)];;}, $$3.$$s = self, $$3.$$arity = 1, $$3));}, $$2.$$s = self, $$2.$$arity = 1, $$2))
|
|
35757
|
+
} else if ($truthy($$$('::', 'String')['$==='](attrs))) {
|
|
35758
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$4 = function(accum){var self = $$4.$$s || this, $$5;
|
|
35759
|
+
|
|
35760
|
+
|
|
35761
|
+
|
|
35762
|
+
if (accum == null) {
|
|
35763
|
+
accum = nil;
|
|
35764
|
+
};
|
|
35765
|
+
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;
|
|
35766
|
+
|
|
35767
|
+
|
|
35768
|
+
|
|
35769
|
+
if (entry == null) {
|
|
35770
|
+
entry = nil;
|
|
35771
|
+
};
|
|
35772
|
+
$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;
|
|
35773
|
+
|
|
35774
|
+
$writer = [k, v];
|
|
35775
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
35776
|
+
return $writer[$rb_minus($writer["length"], 1)];;}, $$5.$$s = self, $$5.$$arity = 1, $$5));}, $$4.$$s = self, $$4.$$arity = 1, $$4))
|
|
35777
|
+
} else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
|
|
35778
|
+
attrs = $send($hash2([], {}), 'tap', [], ($$6 = function(accum){var self = $$6.$$s || this, $$7;
|
|
35779
|
+
|
|
35780
|
+
|
|
35781
|
+
|
|
35782
|
+
if (accum == null) {
|
|
35783
|
+
accum = nil;
|
|
35784
|
+
};
|
|
35785
|
+
return $send(attrs.$keys(), 'each', [], ($$7 = function(k){var self = $$7.$$s || this;
|
|
35786
|
+
|
|
35787
|
+
|
|
35788
|
+
|
|
35789
|
+
if (k == null) {
|
|
35790
|
+
k = nil;
|
|
35791
|
+
};
|
|
35792
|
+
$writer = [k, attrs['$[]'](k)];
|
|
35793
|
+
$send(accum, '[]=', Opal.to_a($writer));
|
|
35794
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$7.$$s = self, $$7.$$arity = 1, $$7));}, $$6.$$s = self, $$6.$$arity = 1, $$6))
|
|
35795
|
+
} else {
|
|
35796
|
+
self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
|
|
35797
|
+
};
|
|
35798
|
+
if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
35799
|
+
|
|
35800
|
+
|
|
35801
|
+
$writer = ["input_mtime", input.$mtime()];
|
|
35802
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35803
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35804
|
+
|
|
35805
|
+
$writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
|
|
35806
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
35807
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35808
|
+
|
|
35809
|
+
$writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
|
|
35810
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
35811
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35812
|
+
|
|
35813
|
+
$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)]))];
|
|
35814
|
+
$send(attrs, '[]=', Opal.to_a($writer));
|
|
35815
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35816
|
+
source = input.$read();
|
|
35817
|
+
} else if ($truthy(input['$respond_to?']("read"))) {
|
|
35818
|
+
|
|
35819
|
+
try {
|
|
35820
|
+
input.$rewind()
|
|
35821
|
+
} catch ($err) {
|
|
35822
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
35823
|
+
try {
|
|
35824
|
+
nil
|
|
35825
|
+
} finally { Opal.pop_exception() }
|
|
35826
|
+
} else { throw $err; }
|
|
35827
|
+
};
|
|
35828
|
+
source = input.$read();
|
|
35829
|
+
} else if ($truthy($$$('::', 'String')['$==='](input))) {
|
|
35830
|
+
source = input
|
|
35831
|
+
} else if ($truthy($$$('::', 'Array')['$==='](input))) {
|
|
35832
|
+
source = input.$drop(0)
|
|
35833
|
+
} else if ($truthy(input)) {
|
|
35834
|
+
self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
|
|
35835
|
+
if ($truthy(timings)) {
|
|
35836
|
+
|
|
35837
|
+
timings.$record("read");
|
|
35838
|
+
timings.$start("parse");};
|
|
35839
|
+
|
|
35840
|
+
$writer = ["attributes", attrs];
|
|
35841
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35842
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35843
|
+
doc = (function() {if (options['$[]']("parse")['$=='](false)) {
|
|
35844
|
+
|
|
35845
|
+
return $$($nesting, 'Document').$new(source, options);
|
|
35846
|
+
} else {
|
|
35847
|
+
return $$($nesting, 'Document').$new(source, options).$parse()
|
|
35848
|
+
}; return nil; })();
|
|
35849
|
+
if ($truthy(timings)) {
|
|
35850
|
+
timings.$record("parse")};
|
|
35851
|
+
return doc;
|
|
35852
|
+
} catch ($err) {
|
|
35853
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
|
|
35854
|
+
try {
|
|
35855
|
+
|
|
35856
|
+
|
|
35857
|
+
try {
|
|
35858
|
+
|
|
35859
|
+
context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
|
|
35860
|
+
if ($truthy(ex['$respond_to?']("exception"))) {
|
|
35861
|
+
|
|
35862
|
+
wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
|
|
35863
|
+
wrapped_ex.$set_backtrace(ex.$backtrace());
|
|
35864
|
+
wrapped_ex.stack = ex.stack;
|
|
35865
|
+
} else {
|
|
35866
|
+
|
|
35867
|
+
wrapped_ex = ex.$class().$new(context, ex);
|
|
35868
|
+
|
|
35869
|
+
$writer = [ex.$stack_trace()];
|
|
35870
|
+
$send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
|
|
35871
|
+
$writer[$rb_minus($writer["length"], 1)];;
|
|
35872
|
+
};
|
|
35873
|
+
} catch ($err) {
|
|
35874
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
35875
|
+
try {
|
|
35876
|
+
wrapped_ex = ex
|
|
35877
|
+
} finally { Opal.pop_exception() }
|
|
35878
|
+
} else { throw $err; }
|
|
35879
|
+
};;
|
|
35880
|
+
return self.$raise(wrapped_ex);
|
|
35881
|
+
} finally { Opal.pop_exception() }
|
|
35882
|
+
} else { throw $err; }
|
|
35883
|
+
};
|
|
35884
|
+
}, $Asciidoctor_load$1.$$arity = -2);
|
|
35885
|
+
|
|
35886
|
+
Opal.def(self, '$load_file', $Asciidoctor_load_file$8 = function $$load_file(filename, options) {
|
|
35887
|
+
var $$9, self = this;
|
|
35888
|
+
|
|
35889
|
+
|
|
35890
|
+
|
|
35891
|
+
if (options == null) {
|
|
35892
|
+
options = $hash2([], {});
|
|
35893
|
+
};
|
|
35894
|
+
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$9 = function(file){var self = $$9.$$s || this;
|
|
35895
|
+
|
|
35896
|
+
|
|
35897
|
+
|
|
35898
|
+
if (file == null) {
|
|
35899
|
+
file = nil;
|
|
35900
|
+
};
|
|
35901
|
+
return self.$load(file, options);}, $$9.$$s = self, $$9.$$arity = 1, $$9));
|
|
35902
|
+
}, $Asciidoctor_load_file$8.$$arity = -2);
|
|
35903
|
+
})($nesting[0], $nesting)
|
|
35904
|
+
};
|
|
35905
|
+
|
|
35906
|
+
/* Generated by Opal 0.11.99.dev */
|
|
35907
|
+
Opal.modules["asciidoctor/convert"] = function(Opal) {
|
|
35908
|
+
function $rb_minus(lhs, rhs) {
|
|
35909
|
+
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
|
|
35910
|
+
}
|
|
35911
|
+
function $rb_ge(lhs, rhs) {
|
|
35912
|
+
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs);
|
|
35913
|
+
}
|
|
35914
|
+
function $rb_lt(lhs, rhs) {
|
|
35915
|
+
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
|
|
35916
|
+
}
|
|
35917
|
+
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;
|
|
35918
|
+
|
|
35919
|
+
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']);
|
|
35920
|
+
return (function($base, $parent_nesting) {
|
|
35921
|
+
var self = $module($base, 'Asciidoctor');
|
|
35922
|
+
|
|
35923
|
+
var $nesting = [self].concat($parent_nesting), $Asciidoctor_convert$1, $Asciidoctor_convert_file$2;
|
|
35924
|
+
|
|
35925
|
+
|
|
35926
|
+
self.$module_function();
|
|
35927
|
+
|
|
35928
|
+
Opal.def(self, '$convert', $Asciidoctor_convert$1 = function $$convert(input, options) {
|
|
35929
|
+
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;
|
|
35930
|
+
|
|
35931
|
+
|
|
35932
|
+
|
|
35933
|
+
if (options == null) {
|
|
35934
|
+
options = $hash2([], {});
|
|
35935
|
+
};
|
|
35936
|
+
(options = options.$merge()).$delete("parse");
|
|
35937
|
+
to_dir = options.$delete("to_dir");
|
|
35938
|
+
mkdirs = options.$delete("mkdirs");
|
|
35939
|
+
$case = (to_file = options.$delete("to_file"));
|
|
35940
|
+
if (true['$===']($case) || nil['$===']($case)) {
|
|
35941
|
+
if ($truthy((write_to_target = to_dir))) {
|
|
35942
|
+
} else if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
35943
|
+
sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
|
|
35944
|
+
to_file = nil;}
|
|
35945
|
+
else if (false['$===']($case)) {to_file = nil}
|
|
35946
|
+
else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
|
|
35947
|
+
else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
|
|
35948
|
+
} else {
|
|
35949
|
+
|
|
35950
|
+
$writer = ["to_file", (write_to_target = to_file)];
|
|
35951
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35952
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
35953
|
+
}};
|
|
35954
|
+
if ($truthy(options['$key?']("standalone"))) {
|
|
35955
|
+
} else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
|
|
35956
|
+
|
|
35957
|
+
$writer = ["standalone", true];
|
|
35958
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35959
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
35960
|
+
} else if ($truthy(options['$key?']("header_footer"))) {
|
|
35961
|
+
|
|
35962
|
+
$writer = ["standalone", options['$[]']("header_footer")];
|
|
35963
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35964
|
+
$writer[$rb_minus($writer["length"], 1)];};
|
|
35965
|
+
if ($truthy(sibling_path)) {
|
|
35966
|
+
|
|
35967
|
+
$writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
|
|
35968
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35969
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
35970
|
+
} else if ($truthy(write_to_target)) {
|
|
35971
|
+
if ($truthy(to_dir)) {
|
|
35972
|
+
if ($truthy(to_file)) {
|
|
35973
|
+
|
|
35974
|
+
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path($$$('::', 'File').$join(to_dir, to_file)))];
|
|
35975
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35976
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
35977
|
+
} else {
|
|
35978
|
+
|
|
35979
|
+
$writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
|
|
35980
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35981
|
+
$writer[$rb_minus($writer["length"], 1)];
|
|
35982
|
+
}
|
|
35983
|
+
} else if ($truthy(to_file)) {
|
|
35984
|
+
|
|
35985
|
+
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
|
|
35986
|
+
$send(options, '[]=', Opal.to_a($writer));
|
|
35987
|
+
$writer[$rb_minus($writer["length"], 1)];}};
|
|
35988
|
+
doc = self.$load(input, options);
|
|
35989
|
+
if ($truthy(sibling_path)) {
|
|
35990
|
+
|
|
35991
|
+
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
|
|
35992
|
+
if (outfile['$=='](sibling_path)) {
|
|
35993
|
+
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
35994
|
+
} else if ($truthy(write_to_target)) {
|
|
35995
|
+
|
|
35996
|
+
working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
|
|
35997
|
+
|
|
35998
|
+
return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
|
|
35999
|
+
} else {
|
|
36000
|
+
return $$$('::', 'Dir').$pwd()
|
|
36001
|
+
}; return nil; })();
|
|
36002
|
+
jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36003
|
+
return working_dir
|
|
36004
|
+
} else {
|
|
36005
|
+
return nil
|
|
36006
|
+
}; return nil; })();
|
|
36007
|
+
if ($truthy(to_dir)) {
|
|
36008
|
+
|
|
36009
|
+
outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
36010
|
+
if ($truthy(to_file)) {
|
|
36011
|
+
|
|
36012
|
+
outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
36013
|
+
outdir = $$$('::', 'File').$dirname(outfile);
|
|
36014
|
+
} else {
|
|
36015
|
+
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
|
|
36016
|
+
};
|
|
36017
|
+
} else if ($truthy(to_file)) {
|
|
36018
|
+
|
|
36019
|
+
outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
36020
|
+
outdir = $$$('::', 'File').$dirname(outfile);};
|
|
36021
|
+
if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
|
|
36022
|
+
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
36023
|
+
if ($truthy(mkdirs)) {
|
|
36024
|
+
$$($nesting, 'Helpers').$mkdir_p(outdir)
|
|
36025
|
+
} else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
|
|
36026
|
+
} else {
|
|
36027
|
+
self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
|
|
36028
|
+
};
|
|
36029
|
+
} else {
|
|
36030
|
+
|
|
36031
|
+
outfile = to_file;
|
|
36032
|
+
outdir = nil;
|
|
36033
|
+
};
|
|
36034
|
+
if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
|
|
36035
|
+
output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
|
|
36036
|
+
} else {
|
|
36037
|
+
output = doc.$convert()
|
|
36038
|
+
};
|
|
36039
|
+
if ($truthy(outfile)) {
|
|
36040
|
+
|
|
36041
|
+
doc.$write(output, outfile);
|
|
36042
|
+
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))) {
|
|
36043
|
+
|
|
36044
|
+
if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
|
|
36045
|
+
if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
|
|
36046
|
+
copy_asciidoctor_stylesheet = true
|
|
36047
|
+
} else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
|
|
36048
|
+
copy_user_stylesheet = true}};
|
|
36049
|
+
copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
|
|
36050
|
+
if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
|
|
36051
|
+
|
|
36052
|
+
stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36053
|
+
return outdir
|
|
36054
|
+
} else {
|
|
36055
|
+
return nil
|
|
36056
|
+
}; return nil; })());
|
|
36057
|
+
if ($truthy(mkdirs)) {
|
|
36058
|
+
$$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
|
|
36059
|
+
} else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
|
|
36060
|
+
} else {
|
|
36061
|
+
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
|
|
36062
|
+
};
|
|
36063
|
+
if ($truthy(copy_asciidoctor_stylesheet)) {
|
|
36064
|
+
$$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
|
|
36065
|
+
} else if ($truthy(copy_user_stylesheet)) {
|
|
36066
|
+
|
|
36067
|
+
if ($truthy((stylesheet_src = doc.$attr("copycss"))['$empty?']())) {
|
|
36068
|
+
stylesheet_src = doc.$normalize_system_path(stylesheet)
|
|
36069
|
+
} else {
|
|
36070
|
+
stylesheet_src = doc.$normalize_system_path(stylesheet_src)
|
|
36071
|
+
};
|
|
36072
|
+
stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
36073
|
+
return outdir
|
|
36074
|
+
} else {
|
|
36075
|
+
return nil
|
|
36076
|
+
}; return nil; })());
|
|
36077
|
+
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))) {
|
|
36078
|
+
$$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))};};
|
|
36079
|
+
if ($truthy(copy_syntax_hl_stylesheet)) {
|
|
36080
|
+
syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
|
|
36081
|
+
return doc;
|
|
36082
|
+
} else {
|
|
36083
|
+
return output
|
|
36084
|
+
};
|
|
36085
|
+
}, $Asciidoctor_convert$1.$$arity = -2);
|
|
36086
|
+
|
|
36087
|
+
Opal.def(self, '$convert_file', $Asciidoctor_convert_file$2 = function $$convert_file(filename, options) {
|
|
36088
|
+
var $$3, self = this;
|
|
36089
|
+
|
|
36090
|
+
|
|
36091
|
+
|
|
36092
|
+
if (options == null) {
|
|
36093
|
+
options = $hash2([], {});
|
|
36094
|
+
};
|
|
36095
|
+
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$3 = function(file){var self = $$3.$$s || this;
|
|
36096
|
+
|
|
36097
|
+
|
|
36098
|
+
|
|
36099
|
+
if (file == null) {
|
|
36100
|
+
file = nil;
|
|
36101
|
+
};
|
|
36102
|
+
return self.$convert(file, options);}, $$3.$$s = self, $$3.$$arity = 1, $$3));
|
|
36103
|
+
}, $Asciidoctor_convert_file$2.$$arity = -2);
|
|
36104
|
+
Opal.alias(self, "render", "convert");
|
|
36105
|
+
self.$module_function("render");
|
|
36106
|
+
Opal.alias(self, "render_file", "convert_file");
|
|
36107
|
+
self.$module_function("render_file");
|
|
36108
|
+
})($nesting[0], $nesting)
|
|
36109
|
+
};
|
|
36110
|
+
|
|
35513
36111
|
/* Generated by Opal 0.11.99.dev */
|
|
35514
36112
|
Opal.modules["asciidoctor/syntax_highlighter/highlightjs"] = function(Opal) {
|
|
35515
36113
|
function $rb_minus(lhs, rhs) {
|
|
@@ -35600,9 +36198,9 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35600
36198
|
function $rb_minus(lhs, rhs) {
|
|
35601
36199
|
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
|
|
35602
36200
|
}
|
|
35603
|
-
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, $
|
|
36201
|
+
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;
|
|
35604
36202
|
|
|
35605
|
-
Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$
|
|
36203
|
+
Opal.add_stubs(['$attr_reader', '$raise', '$class', '$private_class_method', '$extend', '$register', '$map', '$to_s', '$each', '$[]=', '$registry', '$-', '$[]', '$for', '$===', '$new', '$name', '$private', '$include', '$==', '$join', '$content']);
|
|
35606
36204
|
|
|
35607
36205
|
(function($base, $parent_nesting) {
|
|
35608
36206
|
var self = $module($base, 'Asciidoctor');
|
|
@@ -35612,7 +36210,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35612
36210
|
(function($base, $parent_nesting) {
|
|
35613
36211
|
var self = $module($base, 'SyntaxHighlighter');
|
|
35614
36212
|
|
|
35615
|
-
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;
|
|
36213
|
+
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;
|
|
35616
36214
|
|
|
35617
36215
|
|
|
35618
36216
|
self.$attr_reader("name");
|
|
@@ -35673,43 +36271,51 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35673
36271
|
|
|
35674
36272
|
return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'SyntaxHighlighter')) + " subclass " + (self.$class()) + " must implement the #" + ("write_stylesheet") + " method since #write_stylesheet? returns true")
|
|
35675
36273
|
}, $SyntaxHighlighter_write_stylesheet$8.$$arity = 2);
|
|
35676
|
-
self.$private_class_method((Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) {
|
|
36274
|
+
self.$private_class_method(($truthy($a = (Opal.defs(self, '$included', $SyntaxHighlighter_included$9 = function $$included(into) {
|
|
35677
36275
|
var self = this;
|
|
35678
36276
|
|
|
35679
36277
|
return into.$extend($$($nesting, 'Config'))
|
|
35680
|
-
}, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included');
|
|
36278
|
+
}, $SyntaxHighlighter_included$9.$$arity = 1), nil) && 'included') ? $a : "included"));
|
|
35681
36279
|
(function($base, $parent_nesting) {
|
|
35682
36280
|
var self = $module($base, 'Config');
|
|
35683
36281
|
|
|
35684
36282
|
var $nesting = [self].concat($parent_nesting), $Config_register_for$10;
|
|
35685
36283
|
|
|
35686
|
-
|
|
35687
|
-
|
|
36284
|
+
|
|
36285
|
+
Opal.def(self, '$register_for', $Config_register_for$10 = function $$register_for($a) {
|
|
36286
|
+
var $post_args, names, $$11, self = this;
|
|
35688
36287
|
|
|
35689
36288
|
|
|
35690
36289
|
|
|
35691
36290
|
$post_args = Opal.slice.call(arguments, 0, arguments.length);
|
|
35692
36291
|
|
|
35693
36292
|
names = $post_args;;
|
|
35694
|
-
return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a(names)
|
|
35695
|
-
|
|
36293
|
+
return $send($$($nesting, 'SyntaxHighlighter'), 'register', [self].concat(Opal.to_a($send(names, 'map', [], ($$11 = function(name){var self = $$11.$$s || this;
|
|
36294
|
+
|
|
36295
|
+
|
|
36296
|
+
|
|
36297
|
+
if (name == null) {
|
|
36298
|
+
name = nil;
|
|
36299
|
+
};
|
|
36300
|
+
return name.$to_s();}, $$11.$$s = self, $$11.$$arity = 1, $$11)))));
|
|
36301
|
+
}, $Config_register_for$10.$$arity = -1)
|
|
35696
36302
|
})($nesting[0], $nesting);
|
|
35697
36303
|
(function($base, $parent_nesting) {
|
|
35698
36304
|
var self = $module($base, 'Factory');
|
|
35699
36305
|
|
|
35700
|
-
var $nesting = [self].concat($parent_nesting), $Factory_register$
|
|
36306
|
+
var $nesting = [self].concat($parent_nesting), $Factory_register$12, $Factory_for$14, $Factory_create$15, $Factory_registry$16;
|
|
35701
36307
|
|
|
35702
36308
|
|
|
35703
36309
|
|
|
35704
|
-
Opal.def(self, '$register', $Factory_register$
|
|
35705
|
-
var $post_args, names, $$
|
|
36310
|
+
Opal.def(self, '$register', $Factory_register$12 = function $$register(syntax_highlighter, $a) {
|
|
36311
|
+
var $post_args, names, $$13, self = this;
|
|
35706
36312
|
|
|
35707
36313
|
|
|
35708
36314
|
|
|
35709
36315
|
$post_args = Opal.slice.call(arguments, 1, arguments.length);
|
|
35710
36316
|
|
|
35711
36317
|
names = $post_args;;
|
|
35712
|
-
return $send(names, 'each', [], ($$
|
|
36318
|
+
return $send(names, 'each', [], ($$13 = function(name){var self = $$13.$$s || this, $writer = nil;
|
|
35713
36319
|
|
|
35714
36320
|
|
|
35715
36321
|
|
|
@@ -35718,16 +36324,16 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35718
36324
|
};
|
|
35719
36325
|
$writer = [name, syntax_highlighter];
|
|
35720
36326
|
$send(self.$registry(), '[]=', Opal.to_a($writer));
|
|
35721
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$
|
|
35722
|
-
}, $Factory_register$
|
|
36327
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$13.$$s = self, $$13.$$arity = 1, $$13));
|
|
36328
|
+
}, $Factory_register$12.$$arity = -2);
|
|
35723
36329
|
|
|
35724
|
-
Opal.def(self, '$for', $Factory_for$
|
|
36330
|
+
Opal.def(self, '$for', $Factory_for$14 = function(name) {
|
|
35725
36331
|
var self = this;
|
|
35726
36332
|
|
|
35727
36333
|
return self.$registry()['$[]'](name)
|
|
35728
|
-
}, $Factory_for$
|
|
36334
|
+
}, $Factory_for$14.$$arity = 1);
|
|
35729
36335
|
|
|
35730
|
-
Opal.def(self, '$create', $Factory_create$
|
|
36336
|
+
Opal.def(self, '$create', $Factory_create$15 = function $$create(name, backend, opts) {
|
|
35731
36337
|
var self = this, syntax_hl = nil;
|
|
35732
36338
|
|
|
35733
36339
|
|
|
@@ -35751,23 +36357,25 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35751
36357
|
} else {
|
|
35752
36358
|
return nil
|
|
35753
36359
|
};
|
|
35754
|
-
}, $Factory_create$
|
|
35755
|
-
self.$private(
|
|
36360
|
+
}, $Factory_create$15.$$arity = -2);
|
|
36361
|
+
self.$private();
|
|
36362
|
+
|
|
36363
|
+
Opal.def(self, '$registry', $Factory_registry$16 = function $$registry() {
|
|
35756
36364
|
var self = this;
|
|
35757
36365
|
|
|
35758
36366
|
return self.$raise($$$('::', 'NotImplementedError'), "" + ($$($nesting, 'Factory')) + " subclass " + (self.$class()) + " must implement the #" + ("registry") + " method")
|
|
35759
|
-
}, $Factory_registry$
|
|
36367
|
+
}, $Factory_registry$16.$$arity = 0);
|
|
35760
36368
|
})($nesting[0], $nesting);
|
|
35761
36369
|
(function($base, $super, $parent_nesting) {
|
|
35762
36370
|
var self = $klass($base, $super, 'CustomFactory');
|
|
35763
36371
|
|
|
35764
|
-
var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$
|
|
36372
|
+
var $nesting = [self].concat($parent_nesting), $CustomFactory_initialize$17, $CustomFactory_registry$18;
|
|
35765
36373
|
|
|
35766
36374
|
self.$$prototype.registry = nil;
|
|
35767
36375
|
|
|
35768
36376
|
self.$include($$($nesting, 'Factory'));
|
|
35769
36377
|
|
|
35770
|
-
Opal.def(self, '$initialize', $CustomFactory_initialize$
|
|
36378
|
+
Opal.def(self, '$initialize', $CustomFactory_initialize$17 = function $$initialize(seed_registry) {
|
|
35771
36379
|
var $a, self = this;
|
|
35772
36380
|
|
|
35773
36381
|
|
|
@@ -35776,28 +36384,29 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35776
36384
|
seed_registry = nil;
|
|
35777
36385
|
};
|
|
35778
36386
|
return (self.registry = ($truthy($a = seed_registry) ? $a : $hash2([], {})));
|
|
35779
|
-
}, $CustomFactory_initialize$
|
|
35780
|
-
|
|
36387
|
+
}, $CustomFactory_initialize$17.$$arity = -1);
|
|
36388
|
+
self.$private();
|
|
36389
|
+
return (Opal.def(self, '$registry', $CustomFactory_registry$18 = function $$registry() {
|
|
35781
36390
|
var self = this;
|
|
35782
36391
|
|
|
35783
36392
|
return self.registry
|
|
35784
|
-
}, $CustomFactory_registry$
|
|
36393
|
+
}, $CustomFactory_registry$18.$$arity = 0), nil) && 'registry';
|
|
35785
36394
|
})($nesting[0], null, $nesting);
|
|
35786
36395
|
(function($base, $parent_nesting) {
|
|
35787
36396
|
var self = $module($base, 'DefaultFactory');
|
|
35788
36397
|
|
|
35789
|
-
var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$
|
|
36398
|
+
var $nesting = [self].concat($parent_nesting), $DefaultFactory_registry$19;
|
|
35790
36399
|
|
|
35791
36400
|
|
|
35792
36401
|
self.$include($$($nesting, 'Factory'));
|
|
35793
36402
|
self.$private();
|
|
35794
36403
|
(Opal.class_variable_set($nesting[0], '@@registry', $hash2([], {})));
|
|
35795
36404
|
|
|
35796
|
-
Opal.def(self, '$registry', $DefaultFactory_registry$
|
|
36405
|
+
Opal.def(self, '$registry', $DefaultFactory_registry$19 = function $$registry() {
|
|
35797
36406
|
var $a, self = this;
|
|
35798
36407
|
|
|
35799
36408
|
return (($a = $nesting[0].$$cvars['@@registry']) == null ? nil : $a)
|
|
35800
|
-
}, $DefaultFactory_registry$
|
|
36409
|
+
}, $DefaultFactory_registry$19.$$arity = 0);
|
|
35801
36410
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
35802
36411
|
} else {
|
|
35803
36412
|
nil
|
|
@@ -35819,13 +36428,13 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35819
36428
|
(function($base, $super, $parent_nesting) {
|
|
35820
36429
|
var self = $klass($base, $super, 'Base');
|
|
35821
36430
|
|
|
35822
|
-
var $nesting = [self].concat($parent_nesting), $Base_format$
|
|
36431
|
+
var $nesting = [self].concat($parent_nesting), $Base_format$20;
|
|
35823
36432
|
|
|
35824
36433
|
self.$$prototype.pre_class = nil;
|
|
35825
36434
|
|
|
35826
36435
|
self.$include($$($nesting, 'SyntaxHighlighter'));
|
|
35827
|
-
return (Opal.def(self, '$format', $Base_format$
|
|
35828
|
-
var $$
|
|
36436
|
+
return (Opal.def(self, '$format', $Base_format$20 = function $$format(node, lang, opts) {
|
|
36437
|
+
var $$21, $$22, self = this, class_attr_val = nil, transform = nil, pre = nil, code = nil;
|
|
35829
36438
|
|
|
35830
36439
|
|
|
35831
36440
|
class_attr_val = (function() {if ($truthy(opts['$[]']("nowrap"))) {
|
|
@@ -35842,7 +36451,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35842
36451
|
return $hash2([], {})
|
|
35843
36452
|
}; return nil; })();
|
|
35844
36453
|
transform['$[]'](pre, code);
|
|
35845
|
-
return "" + "<pre" + ($send(pre, 'map', [], ($$
|
|
36454
|
+
return "" + "<pre" + ($send(pre, 'map', [], ($$21 = function(k, v){var self = $$21.$$s || this;
|
|
35846
36455
|
|
|
35847
36456
|
|
|
35848
36457
|
|
|
@@ -35853,7 +36462,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35853
36462
|
if (v == null) {
|
|
35854
36463
|
v = nil;
|
|
35855
36464
|
};
|
|
35856
|
-
return "" + " " + (k) + "=\"" + (v) + "\"";}, $$
|
|
36465
|
+
return "" + " " + (k) + "=\"" + (v) + "\"";}, $$21.$$s = self, $$21.$$arity = 2, $$21)).$join()) + "><code" + ($send(code, 'map', [], ($$22 = function(k, v){var self = $$22.$$s || this;
|
|
35857
36466
|
|
|
35858
36467
|
|
|
35859
36468
|
|
|
@@ -35864,7 +36473,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35864
36473
|
if (v == null) {
|
|
35865
36474
|
v = nil;
|
|
35866
36475
|
};
|
|
35867
|
-
return "" + " " + (k) + "=\"" + (v) + "\"";}, $$
|
|
36476
|
+
return "" + " " + (k) + "=\"" + (v) + "\"";}, $$22.$$s = self, $$22.$$arity = 2, $$22)).$join()) + ">" + (node.$content()) + "</code></pre>";
|
|
35868
36477
|
} else {
|
|
35869
36478
|
return "" + "<pre class=\"" + (class_attr_val) + "\"><code" + ((function() {if ($truthy(lang)) {
|
|
35870
36479
|
return "" + " data-lang=\"" + (lang) + "\""
|
|
@@ -35872,7 +36481,7 @@ Opal.modules["asciidoctor/syntax_highlighter"] = function(Opal) {
|
|
|
35872
36481
|
return ""
|
|
35873
36482
|
}; return nil; })()) + ">" + (node.$content()) + "</code></pre>"
|
|
35874
36483
|
};
|
|
35875
|
-
}, $Base_format$
|
|
36484
|
+
}, $Base_format$20.$$arity = 3), nil) && 'format';
|
|
35876
36485
|
})($nesting[0], null, $nesting);
|
|
35877
36486
|
self.$extend($$($nesting, 'DefaultFactory'));
|
|
35878
36487
|
})($nesting[0], $nesting)
|
|
@@ -36207,9 +36816,14 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
36207
36816
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
36208
36817
|
Opal.const_set($nesting[0], 'DropAnchorRx', /<(?:a[^>+]+|\/a)>/);
|
|
36209
36818
|
Opal.const_set($nesting[0], 'StemBreakRx', / *\\\n(?:\\?\n)*|\n\n+/);
|
|
36210
|
-
|
|
36211
|
-
|
|
36212
|
-
|
|
36819
|
+
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
36820
|
+
|
|
36821
|
+
Opal.const_set($nesting[0], 'SvgPreambleRx', new RegExp("" + "^" + ($$($nesting, 'CC_ALL')) + "*?(?=<svg\\b)"));
|
|
36822
|
+
Opal.const_set($nesting[0], 'SvgStartTagRx', /^<svg[^>]*>/);
|
|
36823
|
+
} else {
|
|
36824
|
+
nil
|
|
36825
|
+
};
|
|
36826
|
+
Opal.const_set($nesting[0], 'DimensionAttributeRx', new RegExp("" + "\\s(?:width|height|style)=([\"'])" + ($$($nesting, 'CC_ANY')) + "*?\\1"));
|
|
36213
36827
|
|
|
36214
36828
|
Opal.def(self, '$initialize', $Html5Converter_initialize$1 = function $$initialize(backend, opts) {
|
|
36215
36829
|
var self = this, syntax = nil;
|
|
@@ -36371,13 +36985,17 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
36371
36985
|
if ($truthy(node['$attr?']("favicon"))) {
|
|
36372
36986
|
|
|
36373
36987
|
if ($truthy((icon_href = node.$attr("favicon"))['$empty?']())) {
|
|
36374
|
-
|
|
36375
|
-
|
|
36376
|
-
icon_type =
|
|
36988
|
+
|
|
36989
|
+
icon_href = "favicon.ico";
|
|
36990
|
+
icon_type = "image/x-icon";
|
|
36991
|
+
} else if ($truthy((icon_ext = $$($nesting, 'Helpers').$extname(icon_href, nil)))) {
|
|
36992
|
+
icon_type = (function() {if (icon_ext['$=='](".ico")) {
|
|
36377
36993
|
return "image/x-icon"
|
|
36378
36994
|
} else {
|
|
36379
36995
|
return "" + "image/" + (icon_ext.$slice(1, icon_ext.$length()))
|
|
36380
36996
|
}; return nil; })()
|
|
36997
|
+
} else {
|
|
36998
|
+
icon_type = "image/x-icon"
|
|
36381
36999
|
};
|
|
36382
37000
|
result['$<<']("" + "<link rel=\"icon\" type=\"" + (icon_type) + "\" href=\"" + (icon_href) + "\"" + (slash) + ">");};
|
|
36383
37001
|
result['$<<']("" + "<title>" + (node.$doctitle($hash2(["sanitize", "use_fallback"], {"sanitize": true, "use_fallback": true}))) + "</title>");
|
|
@@ -38043,10 +38661,10 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {
|
|
|
38043
38661
|
}, $Html5Converter_convert_inline_footnote$53.$$arity = 1);
|
|
38044
38662
|
|
|
38045
38663
|
Opal.def(self, '$convert_inline_image', $Html5Converter_convert_inline_image$54 = function $$convert_inline_image(node) {
|
|
38046
|
-
var $a, $$55, $$56, $
|
|
38664
|
+
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;
|
|
38047
38665
|
|
|
38048
38666
|
|
|
38049
|
-
if ($truthy((($a = (type = node.$type())['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = node.$type())['$==']("icon")))) {
|
|
38667
|
+
if ($truthy((($a = (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")) ? node.$document()['$attr?']("icons", "font") : (type = ($truthy($b = node.$type()) ? $b : "image"))['$==']("icon")))) {
|
|
38050
38668
|
|
|
38051
38669
|
class_attr_val = "" + "fa fa-" + (node.$target());
|
|
38052
38670
|
$send($hash2(["size", "rotate", "flip"], {"size": "fa-", "rotate": "fa-rotate-", "flip": "fa-flip-"}), 'each', [], ($$55 = function(key, prefix){var self = $$55.$$s || this;
|
|
@@ -39171,7 +39789,7 @@ Opal.modules["asciidoctor/extensions"] = function(Opal) {
|
|
|
39171
39789
|
return "(){0}"
|
|
39172
39790
|
} else {
|
|
39173
39791
|
return "(\\S+?)"
|
|
39174
|
-
}; return nil; })()) + "\\[(
|
|
39792
|
+
}; 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)]));
|
|
39175
39793
|
}, $InlineMacroProcessor_resolve_regexp$46.$$arity = 2), nil) && 'resolve_regexp';
|
|
39176
39794
|
})($nesting[0], $$($nesting, 'MacroProcessor'), $nesting);
|
|
39177
39795
|
(function($base, $parent_nesting) {
|
|
@@ -40270,18 +40888,9 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40270
40888
|
function $rb_minus(lhs, rhs) {
|
|
40271
40889
|
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs - rhs : lhs['$-'](rhs);
|
|
40272
40890
|
}
|
|
40273
|
-
|
|
40274
|
-
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs + rhs : lhs['$+'](rhs);
|
|
40275
|
-
}
|
|
40276
|
-
function $rb_ge(lhs, rhs) {
|
|
40277
|
-
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs >= rhs : lhs['$>='](rhs);
|
|
40278
|
-
}
|
|
40279
|
-
function $rb_lt(lhs, rhs) {
|
|
40280
|
-
return (typeof(lhs) === 'number' && typeof(rhs) === 'number') ? lhs < rhs : lhs['$<'](rhs);
|
|
40281
|
-
}
|
|
40282
|
-
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;
|
|
40891
|
+
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;
|
|
40283
40892
|
|
|
40284
|
-
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', '$
|
|
40893
|
+
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']);
|
|
40285
40894
|
|
|
40286
40895
|
self.$require("set");
|
|
40287
40896
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
@@ -40292,7 +40901,7 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40292
40901
|
(function($base, $parent_nesting) {
|
|
40293
40902
|
var self = $module($base, 'Asciidoctor');
|
|
40294
40903
|
|
|
40295
|
-
var $nesting = [self].concat($parent_nesting), $a, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$
|
|
40904
|
+
var $nesting = [self].concat($parent_nesting), $a, $b, $Asciidoctor$7, $Asciidoctor$9, $Asciidoctor$11, $Asciidoctor$13, $writer = nil;
|
|
40296
40905
|
|
|
40297
40906
|
|
|
40298
40907
|
Opal.const_set($nesting[0], 'RUBY_ENGINE_OPAL', Opal.const_set($nesting[0], 'RUBY_ENGINE', $$$('::', 'RUBY_ENGINE'))['$==']("opal"));
|
|
@@ -40381,7 +40990,16 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40381
40990
|
};
|
|
40382
40991
|
Opal.const_set($nesting[0], 'LIB_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "lib"));
|
|
40383
40992
|
Opal.const_set($nesting[0], 'DATA_DIR', $$$('::', 'File').$join($$($nesting, 'ROOT_DIR'), "data"));
|
|
40384
|
-
Opal.const_set($nesting[0], 'USER_HOME',
|
|
40993
|
+
Opal.const_set($nesting[0], 'USER_HOME', (function() { try {
|
|
40994
|
+
return $$$('::', 'Dir').$home()
|
|
40995
|
+
} catch ($err) {
|
|
40996
|
+
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
40997
|
+
try {
|
|
40998
|
+
|
|
40999
|
+
return ($truthy($b = $$$('::', 'ENV')['$[]']("HOME")) ? $b : $$$('::', 'Dir').$pwd());
|
|
41000
|
+
} finally { Opal.pop_exception() }
|
|
41001
|
+
} else { throw $err; }
|
|
41002
|
+
}})());
|
|
40385
41003
|
Opal.const_set($nesting[0], 'LF', "\n");
|
|
40386
41004
|
Opal.const_set($nesting[0], 'NULL', "\u0000");
|
|
40387
41005
|
Opal.const_set($nesting[0], 'TAB', "\t");
|
|
@@ -40411,18 +41029,32 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40411
41029
|
Opal.const_set($nesting[0], 'ASCIIDOC_EXTENSIONS', $hash2([".adoc", ".asciidoc", ".asc", ".ad", ".txt"], {".adoc": true, ".asciidoc": true, ".asc": true, ".ad": true, ".txt": true}));
|
|
40412
41030
|
Opal.const_set($nesting[0], 'SETEXT_SECTION_LEVELS', $hash2(["=", "-", "~", "^", "+"], {"=": 0, "-": 1, "~": 2, "^": 3, "+": 4}));
|
|
40413
41031
|
Opal.const_set($nesting[0], 'ADMONITION_STYLES', ["NOTE", "TIP", "IMPORTANT", "WARNING", "CAUTION"].$to_set());
|
|
40414
|
-
Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS',
|
|
41032
|
+
Opal.const_set($nesting[0], 'ADMONITION_STYLE_HEADS', $send($$$('::', 'Set').$new(), 'tap', [], ($Asciidoctor$7 = function(accum){var self = $Asciidoctor$7.$$s || this, $$8;
|
|
41033
|
+
|
|
41034
|
+
|
|
41035
|
+
|
|
41036
|
+
if (accum == null) {
|
|
41037
|
+
accum = nil;
|
|
41038
|
+
};
|
|
41039
|
+
return $send($$($nesting, 'ADMONITION_STYLES'), 'each', [], ($$8 = function(s){var self = $$8.$$s || this;
|
|
41040
|
+
|
|
41041
|
+
|
|
41042
|
+
|
|
41043
|
+
if (s == null) {
|
|
41044
|
+
s = nil;
|
|
41045
|
+
};
|
|
41046
|
+
return accum['$<<'](s.$chr());}, $$8.$$s = self, $$8.$$arity = 1, $$8));}, $Asciidoctor$7.$$s = self, $Asciidoctor$7.$$arity = 1, $Asciidoctor$7)));
|
|
40415
41047
|
Opal.const_set($nesting[0], 'PARAGRAPH_STYLES', ["comment", "example", "literal", "listing", "normal", "open", "pass", "quote", "sidebar", "source", "verse", "abstract", "partintro"].$to_set());
|
|
40416
41048
|
Opal.const_set($nesting[0], 'VERBATIM_STYLES', ["literal", "listing", "source", "verse"].$to_set());
|
|
40417
41049
|
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()]}));
|
|
40418
|
-
Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$
|
|
41050
|
+
Opal.const_set($nesting[0], 'DELIMITED_BLOCK_HEADS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$9 = function(accum){var self = $Asciidoctor$9.$$s || this, $$10;
|
|
40419
41051
|
|
|
40420
41052
|
|
|
40421
41053
|
|
|
40422
41054
|
if (accum == null) {
|
|
40423
41055
|
accum = nil;
|
|
40424
41056
|
};
|
|
40425
|
-
return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$
|
|
41057
|
+
return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$10 = function(k){var self = $$10.$$s || this, $writer = nil;
|
|
40426
41058
|
|
|
40427
41059
|
|
|
40428
41060
|
|
|
@@ -40431,15 +41063,15 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40431
41063
|
};
|
|
40432
41064
|
$writer = [k.$slice(0, 2), true];
|
|
40433
41065
|
$send(accum, '[]=', Opal.to_a($writer));
|
|
40434
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$
|
|
40435
|
-
Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$
|
|
41066
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$10.$$s = self, $$10.$$arity = 1, $$10));}, $Asciidoctor$9.$$s = self, $Asciidoctor$9.$$arity = 1, $Asciidoctor$9)));
|
|
41067
|
+
Opal.const_set($nesting[0], 'DELIMITED_BLOCK_TAILS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$11 = function(accum){var self = $Asciidoctor$11.$$s || this, $$12;
|
|
40436
41068
|
|
|
40437
41069
|
|
|
40438
41070
|
|
|
40439
41071
|
if (accum == null) {
|
|
40440
41072
|
accum = nil;
|
|
40441
41073
|
};
|
|
40442
|
-
return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$
|
|
41074
|
+
return $send($$($nesting, 'DELIMITED_BLOCKS'), 'each_key', [], ($$12 = function(k){var self = $$12.$$s || this, $writer = nil;
|
|
40443
41075
|
|
|
40444
41076
|
|
|
40445
41077
|
|
|
@@ -40453,7 +41085,7 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40453
41085
|
return $writer[$rb_minus($writer["length"], 1)];
|
|
40454
41086
|
} else {
|
|
40455
41087
|
return nil
|
|
40456
|
-
};}, $$
|
|
41088
|
+
};}, $$12.$$s = self, $$12.$$arity = 1, $$12));}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 1, $Asciidoctor$11)));
|
|
40457
41089
|
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"}));
|
|
40458
41090
|
Opal.const_set($nesting[0], 'LAYOUT_BREAK_CHARS', $hash2(["'", "<"], {"'": "thematic_break", "<": "page_break"}));
|
|
40459
41091
|
Opal.const_set($nesting[0], 'MARKDOWN_THEMATIC_BREAK_CHARS', $hash2(["-", "*", "_"], {"-": "thematic_break", "*": "thematic_break", "_": "thematic_break"}));
|
|
@@ -40476,129 +41108,11 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40476
41108
|
Opal.const_set($nesting[0], 'HIGHLIGHT_JS_VERSION', "9.15.6");
|
|
40477
41109
|
Opal.const_set($nesting[0], 'MATHJAX_VERSION', "2.7.5");
|
|
40478
41110
|
Opal.const_set($nesting[0], 'FLEXIBLE_ATTRIBUTES', ["sectnums"]);
|
|
41111
|
+
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": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"}));
|
|
40479
41112
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
40480
41113
|
} else {
|
|
40481
41114
|
nil
|
|
40482
41115
|
};
|
|
40483
|
-
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')) + "\\-'.]*))?(?: +<([^>]+)>)?$"));
|
|
40484
|
-
Opal.const_set($nesting[0], 'AuthorDelimiterRx', /;(?: |$)/);
|
|
40485
|
-
Opal.const_set($nesting[0], 'RevisionInfoLineRx', new RegExp("" + "^(?:[^\\d{]*(" + ($$($nesting, 'CC_ANY')) + "*?),)? *(?!:)(" + ($$($nesting, 'CC_ANY')) + "*?)(?: *(?!^),?: *(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
|
|
40486
|
-
Opal.const_set($nesting[0], 'ManpageTitleVolnumRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *\\( *(" + ($$($nesting, 'CC_ANY')) + "+?) *\\)$"));
|
|
40487
|
-
Opal.const_set($nesting[0], 'ManpageNamePurposeRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) +- +(" + ($$($nesting, 'CC_ANY')) + "+)$"));
|
|
40488
|
-
Opal.const_set($nesting[0], 'ConditionalDirectiveRx', new RegExp("" + "^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
40489
|
-
Opal.const_set($nesting[0], 'EvalExpressionRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "+?) *([=!><]=|[><]) *(" + ($$($nesting, 'CC_ANY')) + "+)$"));
|
|
40490
|
-
Opal.const_set($nesting[0], 'IncludeDirectiveRx', new RegExp("" + "^(\\\\)?include::([^\\[][^\\[]*)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
40491
|
-
Opal.const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
|
|
40492
|
-
Opal.const_set($nesting[0], 'AttributeEntryRx', new RegExp("" + "^:(!?" + ($$($nesting, 'CG_WORD')) + "[^:]*):(?:[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*))?$"));
|
|
40493
|
-
Opal.const_set($nesting[0], 'InvalidAttributeNameCharsRx', new RegExp("" + "[^-" + ($$($nesting, 'CC_WORD')) + "]"));
|
|
40494
|
-
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
40495
|
-
Opal.const_set($nesting[0], 'AttributeEntryPassMacroRx', new RegExp("" + "^pass:([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*)\\]$"))
|
|
40496
|
-
} else {
|
|
40497
|
-
nil
|
|
40498
|
-
};
|
|
40499
|
-
Opal.const_set($nesting[0], 'AttributeReferenceRx', new RegExp("" + "(\\\\)?\\{(" + ($$($nesting, 'CG_WORD')) + "[-" + ($$($nesting, 'CC_WORD')) + "]*|(set|counter2?):" + ($$($nesting, 'CC_ANY')) + "+?)(\\\\)?\\}"));
|
|
40500
|
-
Opal.const_set($nesting[0], 'BlockAnchorRx', new RegExp("" + "^\\[\\[(?:|([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?)\\]\\]$"));
|
|
40501
|
-
Opal.const_set($nesting[0], 'BlockAttributeListRx', new RegExp("" + "^\\[(|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*)\\]$"));
|
|
40502
|
-
Opal.const_set($nesting[0], 'BlockAttributeLineRx', new RegExp("" + "^\\[(?:|[" + ($$($nesting, 'CC_WORD')) + ".#%{,\"']" + ($$($nesting, 'CC_ANY')) + "*|\\[(?:|[" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*(?:, *" + ($$($nesting, 'CC_ANY')) + "+)?)\\])\\]$"));
|
|
40503
|
-
Opal.const_set($nesting[0], 'BlockTitleRx', new RegExp("" + "^\\.(\\.?[^ \\t.]" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
40504
|
-
Opal.const_set($nesting[0], 'AdmonitionParagraphRx', new RegExp("" + "^(" + ($$($nesting, 'ADMONITION_STYLES').$to_a().$join("|")) + "):[ \\t]+"));
|
|
40505
|
-
Opal.const_set($nesting[0], 'LiteralParagraphRx', new RegExp("" + "^([ \\t]+" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
40506
|
-
Opal.const_set($nesting[0], 'AtxSectionTitleRx', new RegExp("" + "^(=={0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
|
|
40507
|
-
Opal.const_set($nesting[0], 'ExtAtxSectionTitleRx', new RegExp("" + "^(=={0,5}|#\\\#{0,5})[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "+?)(?:[ \\t]+\\1)?$"));
|
|
40508
|
-
Opal.const_set($nesting[0], 'SetextSectionTitleRx', new RegExp("" + "^((?!\\.)" + ($$($nesting, 'CC_ANY')) + "*?" + ($$($nesting, 'CG_ALNUM')) + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
40509
|
-
Opal.const_set($nesting[0], 'InlineSectionAnchorRx', new RegExp("" + " (\\\\)?\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+))?\\]\\]$"));
|
|
40510
|
-
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')) + "\\-.]+?"));
|
|
40511
|
-
Opal.const_set($nesting[0], 'SectionLevelStyleRx', /^sect\d$/);
|
|
40512
|
-
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])"));
|
|
40513
|
-
Opal.const_set($nesting[0], 'UnorderedListRx', new RegExp("" + "^[ \\t]*(-|\\*\\**|\\u2022)[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
40514
|
-
Opal.const_set($nesting[0], 'OrderedListRx', new RegExp("" + "^[ \\t]*(\\.\\.*|\\d+\\.|[a-zA-Z]\\.|[IVXivx]+\\))[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
40515
|
-
Opal.const_set($nesting[0], 'OrderedListMarkerRxMap', $hash2(["arabic", "loweralpha", "lowerroman", "upperalpha", "upperroman"], {"arabic": /\d+\./, "loweralpha": /[a-z]\./, "lowerroman": /[ivx]+\)/, "upperalpha": /[A-Z]\./, "upperroman": /[IVX]+\)/}));
|
|
40516
|
-
Opal.const_set($nesting[0], 'DescriptionListRx', new RegExp("" + "^(?!//[^/])[ \\t]*([^ \\t]" + ($$($nesting, 'CC_ANY')) + "*?)(:::{0,2}|;;)(?:$|[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$)"));
|
|
40517
|
-
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')) + "*)$)")}));
|
|
40518
|
-
Opal.const_set($nesting[0], 'CalloutListRx', new RegExp("" + "^<(\\d+|\\.)>[ \\t]+(" + ($$($nesting, 'CC_ANY')) + "*)$"));
|
|
40519
|
-
Opal.const_set($nesting[0], 'CalloutExtractRx', /((?:\/\/|#|--|;;) ?)?(\\)?<!?(|--)(\d+|\.)\3>(?=(?: ?\\?<!?\3(?:\d+|\.)\3>)*$)/);
|
|
40520
|
-
Opal.const_set($nesting[0], 'CalloutExtractRxt', "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*$)");
|
|
40521
|
-
Opal.const_set($nesting[0], 'CalloutExtractRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$11 = function(h, k){var self = $Asciidoctor$11.$$s || this;
|
|
40522
|
-
|
|
40523
|
-
|
|
40524
|
-
|
|
40525
|
-
if (h == null) {
|
|
40526
|
-
h = nil;
|
|
40527
|
-
};
|
|
40528
|
-
|
|
40529
|
-
if (k == null) {
|
|
40530
|
-
k = nil;
|
|
40531
|
-
};
|
|
40532
|
-
$writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
|
|
40533
|
-
return ""
|
|
40534
|
-
} else {
|
|
40535
|
-
return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
|
|
40536
|
-
}; return nil; })()) + ")?" + ($$($nesting, 'CalloutExtractRxt')))];
|
|
40537
|
-
$send(h, '[]=', Opal.to_a($writer));
|
|
40538
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$11.$$s = self, $Asciidoctor$11.$$arity = 2, $Asciidoctor$11)));
|
|
40539
|
-
Opal.const_set($nesting[0], 'CalloutScanRx', new RegExp("" + "\\\\?<!?(|--)(\\d+|\\.)\\1>(?=(?: ?\\\\?<!?\\1(?:\\d+|\\.)\\1>)*" + ($$($nesting, 'CC_EOL')) + ")"));
|
|
40540
|
-
Opal.const_set($nesting[0], 'CalloutSourceRx', new RegExp("" + "((?://|#|--|;;) ?)?(\\\\)?<!?(|--)(\\d+|\\.)\\3>(?=(?: ?\\\\?<!?\\3(?:\\d+|\\.)\\3>)*" + ($$($nesting, 'CC_EOL')) + ")"));
|
|
40541
|
-
Opal.const_set($nesting[0], 'CalloutSourceRxt', "" + "(\\\\)?<()(\\d+|\\.)>(?=(?: ?\\\\?<(?:\\d+|\\.)>)*" + ($$($nesting, 'CC_EOL')) + ")");
|
|
40542
|
-
Opal.const_set($nesting[0], 'CalloutSourceRxMap', $send($$$('::', 'Hash'), 'new', [], ($Asciidoctor$12 = function(h, k){var self = $Asciidoctor$12.$$s || this;
|
|
40543
|
-
|
|
40544
|
-
|
|
40545
|
-
|
|
40546
|
-
if (h == null) {
|
|
40547
|
-
h = nil;
|
|
40548
|
-
};
|
|
40549
|
-
|
|
40550
|
-
if (k == null) {
|
|
40551
|
-
k = nil;
|
|
40552
|
-
};
|
|
40553
|
-
$writer = [k, new RegExp("" + "(" + ((function() {if ($truthy(k['$empty?']())) {
|
|
40554
|
-
return ""
|
|
40555
|
-
} else {
|
|
40556
|
-
return "" + ($$$('::', 'Regexp').$escape(k)) + " ?"
|
|
40557
|
-
}; return nil; })()) + ")?" + ($$($nesting, 'CalloutSourceRxt')))];
|
|
40558
|
-
$send(h, '[]=', Opal.to_a($writer));
|
|
40559
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $Asciidoctor$12.$$s = self, $Asciidoctor$12.$$arity = 2, $Asciidoctor$12)));
|
|
40560
|
-
Opal.const_set($nesting[0], 'ListRxMap', $hash2(["ulist", "olist", "dlist", "colist"], {"ulist": $$($nesting, 'UnorderedListRx'), "olist": $$($nesting, 'OrderedListRx'), "dlist": $$($nesting, 'DescriptionListRx'), "colist": $$($nesting, 'CalloutListRx')}));
|
|
40561
|
-
Opal.const_set($nesting[0], 'ColumnSpecRx', /^(?:(\d+)\*)?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?(\d+%?|~)?([a-z])?$/);
|
|
40562
|
-
Opal.const_set($nesting[0], 'CellSpecStartRx', /^[ \t]*(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
|
|
40563
|
-
Opal.const_set($nesting[0], 'CellSpecEndRx', /[ \t]+(?:(\d+(?:\.\d*)?|(?:\d*\.)?\d+)([*+]))?([<^>](?:\.[<^>]?)?|(?:[<^>]?\.)?[<^>])?([a-z])?$/);
|
|
40564
|
-
Opal.const_set($nesting[0], 'CustomBlockMacroRx', new RegExp("" + "^(" + ($$($nesting, 'CG_WORD')) + "[-" + ($$($nesting, 'CC_WORD')) + "]*)::(|\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
40565
|
-
Opal.const_set($nesting[0], 'BlockMediaMacroRx', new RegExp("" + "^(image|video|audio)::(\\S|\\S" + ($$($nesting, 'CC_ANY')) + "*?\\S)\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
40566
|
-
Opal.const_set($nesting[0], 'BlockTocMacroRx', new RegExp("" + "^toc::\\[(" + ($$($nesting, 'CC_ANY')) + "+)?\\]$"));
|
|
40567
|
-
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')) + "*?[^\\\\])\\]))"));
|
|
40568
|
-
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')) + "*?[^\\\\])\\])"));
|
|
40569
|
-
Opal.const_set($nesting[0], 'LeadingInlineAnchorRx', new RegExp("" + "^\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]"));
|
|
40570
|
-
Opal.const_set($nesting[0], 'InlineBiblioAnchorRx', new RegExp("" + "^\\[\\[\\[([" + ($$($nesting, 'CC_ALPHA')) + "_:][" + ($$($nesting, 'CC_WORD')) + ":.-]*)(?:, *(" + ($$($nesting, 'CC_ANY')) + "+?))?\\]\\]\\]"));
|
|
40571
|
-
Opal.const_set($nesting[0], 'InlineEmailRx', new RegExp("" + "([\\\\>:/])?" + ($$($nesting, 'CG_WORD')) + "(?:&|[" + ($$($nesting, 'CC_WORD')) + ".%+-])*@" + ($$($nesting, 'CG_ALNUM')) + "[" + ($$($nesting, 'CC_ALNUM')) + "_.-]*\\.[a-zA-Z]{2,5}\\b"));
|
|
40572
|
-
Opal.const_set($nesting[0], 'InlineFootnoteMacroRx', new RegExp("" + "\\\\?footnote(?:(ref):|:([\\w-]+)?)\\[(?:|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\]))\\]", 'm'));
|
|
40573
|
-
Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
40574
|
-
Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
|
|
40575
|
-
Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
40576
|
-
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|<|[>\\(\\)\\[\\];])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])?", 'm'));
|
|
40577
|
-
Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
40578
|
-
Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[-" + ($$($nesting, 'CC_WORD')) + "]*$"));
|
|
40579
|
-
Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
40580
|
-
Opal.const_set($nesting[0], 'InlineMenuMacroRx', new RegExp("" + "\\\\?menu:(" + ($$($nesting, 'CG_WORD')) + "|[" + ($$($nesting, 'CC_WORD')) + "&][^\\n\\[]*[^\\s\\[])\\[ *(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])?\\]", 'm'));
|
|
40581
|
-
Opal.const_set($nesting[0], 'InlineMenuRx', new RegExp("" + "\\\\?\"([" + ($$($nesting, 'CC_WORD')) + "&][^\"]*?[ \\n]+>[ \\n]+[^\"]*)\""));
|
|
40582
|
-
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')]));
|
|
40583
|
-
Opal.const_set($nesting[0], 'SinglePlusInlinePassRx', new RegExp("" + "^(\\\\)?\\+(\\S|\\S" + ($$($nesting, 'CC_ALL')) + "*?\\S)\\+$", 'm'));
|
|
40584
|
-
Opal.const_set($nesting[0], 'InlinePassMacroRx', new RegExp("" + "(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(" + ($$($nesting, 'CC_ALL')) + "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\])", 'm'));
|
|
40585
|
-
Opal.const_set($nesting[0], 'InlineXrefMacroRx', new RegExp("" + "\\\\?(?:<<([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)>>|xref:([" + ($$($nesting, 'CC_WORD')) + "#/.:{]" + ($$($nesting, 'CC_ALL')) + "*?)\\[(?:\\]|(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]))", 'm'));
|
|
40586
|
-
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
40587
|
-
Opal.const_set($nesting[0], 'HardLineBreakRx', new RegExp("" + "^(" + ($$($nesting, 'CC_ANY')) + "*) \\+$", 'm'))
|
|
40588
|
-
} else {
|
|
40589
|
-
nil
|
|
40590
|
-
};
|
|
40591
|
-
Opal.const_set($nesting[0], 'MarkdownThematicBreakRx', /^ {0,3}([-*_])( *)\1\2\1$/);
|
|
40592
|
-
Opal.const_set($nesting[0], 'ExtLayoutBreakRx', /^(?:'{3,}|<{3,}|([-*_])( *)\1\2\1)$/);
|
|
40593
|
-
Opal.const_set($nesting[0], 'BlankLineRx', /\n{2,}/);
|
|
40594
|
-
Opal.const_set($nesting[0], 'EscapedSpaceRx', /\\([ \t\n])/);
|
|
40595
|
-
Opal.const_set($nesting[0], 'ReplaceableTextRx', /[&']|--|\.\.\.|\([CRT]M?\)/);
|
|
40596
|
-
Opal.const_set($nesting[0], 'SpaceDelimiterRx', /([^\\])[ \t\n]+/);
|
|
40597
|
-
Opal.const_set($nesting[0], 'SubModifierSniffRx', /[+-]/);
|
|
40598
|
-
Opal.const_set($nesting[0], 'TrailingDigitsRx', /\d+$/);
|
|
40599
|
-
Opal.const_set($nesting[0], 'UriSniffRx', new RegExp("" + "^" + ($$($nesting, 'CG_ALPHA')) + "[" + ($$($nesting, 'CC_ALNUM')) + ".+-]+:/{0,2}"));
|
|
40600
|
-
Opal.const_set($nesting[0], 'XmlSanitizeRx', /<[^>]+>/);
|
|
40601
|
-
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": "+", "backslash": "\\", "backtick": "`", "blank": "", "empty": "", "sp": " ", "two-colons": "::", "two-semicolons": ";;", "nbsp": " ", "deg": "°", "zwsp": "​", "quot": """, "apos": "'", "lsquo": "‘", "rsquo": "’", "ldquo": "“", "rdquo": "”", "wj": "⁠", "brvbar": "¦", "pp": "++", "cpp": "C++", "amp": "&", "lt": "<", "gt": ">"}));
|
|
40602
41116
|
Opal.const_set($nesting[0], 'QUOTE_SUBS', $send($hash2([], {}), 'tap', [], ($Asciidoctor$13 = function(accum){var self = $Asciidoctor$13.$$s || this, normal = nil, compat = nil;
|
|
40603
41117
|
|
|
40604
41118
|
|
|
@@ -40632,386 +41146,10 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
40632
41146
|
$writer[$rb_minus($writer["length"], 1)];;
|
|
40633
41147
|
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)));
|
|
40634
41148
|
Opal.const_set($nesting[0], 'REPLACEMENTS', [[/\\?\(C\)/, "©", "none"], [/\\?\(R\)/, "®", "none"], [/\\?\(TM\)/, "™", "none"], [/(^|\n| |\\)--( |\n|$)/, " — ", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_WORD')) + ")\\\\?--(?=" + ($$($nesting, 'CG_WORD')) + ")"), "—​", "leading"], [/\\?\.\.\./, "…​", "none"], [/\\?`'/, "’", "none"], [new RegExp("" + "(" + ($$($nesting, 'CG_ALNUM')) + ")\\\\?'(?=" + ($$($nesting, 'CG_ALPHA')) + ")"), "’", "leading"], [/\\?->/, "→", "none"], [/\\?=>/, "⇒", "none"], [/\\?<-/, "←", "none"], [/\\?<=/, "⇐", "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"]]);
|
|
40635
|
-
(
|
|
40636
|
-
|
|
40637
|
-
|
|
40638
|
-
|
|
40639
|
-
|
|
40640
|
-
Opal.def(self, '$load', $load$14 = function $$load(input, options) {
|
|
40641
|
-
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;
|
|
40642
|
-
|
|
40643
|
-
|
|
40644
|
-
|
|
40645
|
-
if (options == null) {
|
|
40646
|
-
options = $hash2([], {});
|
|
40647
|
-
};
|
|
40648
|
-
try {
|
|
40649
|
-
|
|
40650
|
-
options = options.$merge();
|
|
40651
|
-
if ($truthy((timings = options['$[]']("timings")))) {
|
|
40652
|
-
timings.$start("read")};
|
|
40653
|
-
if ($truthy(($truthy($a = (logger = options['$[]']("logger"))) ? logger['$!=']($$($nesting, 'LoggerManager').$logger()) : $a))) {
|
|
40654
|
-
|
|
40655
|
-
$writer = [logger];
|
|
40656
|
-
$send($$($nesting, 'LoggerManager'), 'logger=', Opal.to_a($writer));
|
|
40657
|
-
$writer[$rb_minus($writer["length"], 1)];};
|
|
40658
|
-
if ($truthy((attrs = options['$[]']("attributes"))['$!']())) {
|
|
40659
|
-
attrs = $hash2([], {})
|
|
40660
|
-
} else if ($truthy($$$('::', 'Hash')['$==='](attrs))) {
|
|
40661
|
-
attrs = attrs.$merge()
|
|
40662
|
-
} 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))) {
|
|
40663
|
-
attrs = attrs.$dup()
|
|
40664
|
-
} else if ($truthy($$$('::', 'Array')['$==='](attrs))) {
|
|
40665
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$15 = function(accum){var self = $$15.$$s || this, $$16;
|
|
40666
|
-
|
|
40667
|
-
|
|
40668
|
-
|
|
40669
|
-
if (accum == null) {
|
|
40670
|
-
accum = nil;
|
|
40671
|
-
};
|
|
40672
|
-
return $send(attrs, 'each', [], ($$16 = function(entry){var self = $$16.$$s || this, $e, $f, k = nil, _ = nil, v = nil;
|
|
40673
|
-
|
|
40674
|
-
|
|
40675
|
-
|
|
40676
|
-
if (entry == null) {
|
|
40677
|
-
entry = nil;
|
|
40678
|
-
};
|
|
40679
|
-
$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;
|
|
40680
|
-
|
|
40681
|
-
$writer = [k, v];
|
|
40682
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
40683
|
-
return $writer[$rb_minus($writer["length"], 1)];;}, $$16.$$s = self, $$16.$$arity = 1, $$16));}, $$15.$$s = self, $$15.$$arity = 1, $$15))
|
|
40684
|
-
} else if ($truthy($$$('::', 'String')['$==='](attrs))) {
|
|
40685
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$17 = function(accum){var self = $$17.$$s || this, $$18;
|
|
40686
|
-
|
|
40687
|
-
|
|
40688
|
-
|
|
40689
|
-
if (accum == null) {
|
|
40690
|
-
accum = nil;
|
|
40691
|
-
};
|
|
40692
|
-
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;
|
|
40693
|
-
|
|
40694
|
-
|
|
40695
|
-
|
|
40696
|
-
if (entry == null) {
|
|
40697
|
-
entry = nil;
|
|
40698
|
-
};
|
|
40699
|
-
$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;
|
|
40700
|
-
|
|
40701
|
-
$writer = [k, v];
|
|
40702
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
40703
|
-
return $writer[$rb_minus($writer["length"], 1)];;}, $$18.$$s = self, $$18.$$arity = 1, $$18));}, $$17.$$s = self, $$17.$$arity = 1, $$17))
|
|
40704
|
-
} else if ($truthy(($truthy($a = attrs['$respond_to?']("keys")) ? attrs['$respond_to?']("[]") : $a))) {
|
|
40705
|
-
attrs = $send($hash2([], {}), 'tap', [], ($$19 = function(accum){var self = $$19.$$s || this, $$20;
|
|
40706
|
-
|
|
40707
|
-
|
|
40708
|
-
|
|
40709
|
-
if (accum == null) {
|
|
40710
|
-
accum = nil;
|
|
40711
|
-
};
|
|
40712
|
-
return $send(attrs.$keys(), 'each', [], ($$20 = function(k){var self = $$20.$$s || this;
|
|
40713
|
-
|
|
40714
|
-
|
|
40715
|
-
|
|
40716
|
-
if (k == null) {
|
|
40717
|
-
k = nil;
|
|
40718
|
-
};
|
|
40719
|
-
$writer = [k, attrs['$[]'](k)];
|
|
40720
|
-
$send(accum, '[]=', Opal.to_a($writer));
|
|
40721
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$20.$$s = self, $$20.$$arity = 1, $$20));}, $$19.$$s = self, $$19.$$arity = 1, $$19))
|
|
40722
|
-
} else {
|
|
40723
|
-
self.$raise($$$('::', 'ArgumentError'), "" + "illegal type for attributes option: " + (attrs.$class().$ancestors().$join(" < ")))
|
|
40724
|
-
};
|
|
40725
|
-
if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
40726
|
-
|
|
40727
|
-
|
|
40728
|
-
$writer = ["input_mtime", input.$mtime()];
|
|
40729
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40730
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
40731
|
-
|
|
40732
|
-
$writer = ["docfile", (input_path = $$$('::', 'File').$absolute_path(input.$path()))];
|
|
40733
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
40734
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
40735
|
-
|
|
40736
|
-
$writer = ["docdir", $$$('::', 'File').$dirname(input_path)];
|
|
40737
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
40738
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
40739
|
-
|
|
40740
|
-
$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)]))];
|
|
40741
|
-
$send(attrs, '[]=', Opal.to_a($writer));
|
|
40742
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
40743
|
-
source = input.$read();
|
|
40744
|
-
} else if ($truthy(input['$respond_to?']("read"))) {
|
|
40745
|
-
|
|
40746
|
-
try {
|
|
40747
|
-
input.$rewind()
|
|
40748
|
-
} catch ($err) {
|
|
40749
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
40750
|
-
try {
|
|
40751
|
-
nil
|
|
40752
|
-
} finally { Opal.pop_exception() }
|
|
40753
|
-
} else { throw $err; }
|
|
40754
|
-
};
|
|
40755
|
-
source = input.$read();
|
|
40756
|
-
} else if ($truthy($$$('::', 'String')['$==='](input))) {
|
|
40757
|
-
source = input
|
|
40758
|
-
} else if ($truthy($$$('::', 'Array')['$==='](input))) {
|
|
40759
|
-
source = input.$drop(0)
|
|
40760
|
-
} else if ($truthy(input)) {
|
|
40761
|
-
self.$raise($$$('::', 'ArgumentError'), "" + "unsupported input type: " + (input.$class()))};
|
|
40762
|
-
if ($truthy(timings)) {
|
|
40763
|
-
|
|
40764
|
-
timings.$record("read");
|
|
40765
|
-
timings.$start("parse");};
|
|
40766
|
-
|
|
40767
|
-
$writer = ["attributes", attrs];
|
|
40768
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40769
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
40770
|
-
doc = (function() {if (options['$[]']("parse")['$=='](false)) {
|
|
40771
|
-
|
|
40772
|
-
return $$($nesting, 'Document').$new(source, options);
|
|
40773
|
-
} else {
|
|
40774
|
-
return $$($nesting, 'Document').$new(source, options).$parse()
|
|
40775
|
-
}; return nil; })();
|
|
40776
|
-
if ($truthy(timings)) {
|
|
40777
|
-
timings.$record("parse")};
|
|
40778
|
-
return doc;
|
|
40779
|
-
} catch ($err) {
|
|
40780
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {ex = $err;
|
|
40781
|
-
try {
|
|
40782
|
-
|
|
40783
|
-
|
|
40784
|
-
try {
|
|
40785
|
-
|
|
40786
|
-
context = "" + "asciidoctor: FAILED: " + (($truthy($a = attrs['$[]']("docfile")) ? $a : "<stdin>")) + ": Failed to load AsciiDoc document";
|
|
40787
|
-
if ($truthy(ex['$respond_to?']("exception"))) {
|
|
40788
|
-
|
|
40789
|
-
wrapped_ex = ex.$exception("" + (context) + " - " + (ex.$message()));
|
|
40790
|
-
wrapped_ex.$set_backtrace(ex.$backtrace());
|
|
40791
|
-
wrapped_ex.stack = ex.stack;
|
|
40792
|
-
} else {
|
|
40793
|
-
|
|
40794
|
-
wrapped_ex = ex.$class().$new(context, ex);
|
|
40795
|
-
|
|
40796
|
-
$writer = [ex.$stack_trace()];
|
|
40797
|
-
$send(wrapped_ex, 'stack_trace=', Opal.to_a($writer));
|
|
40798
|
-
$writer[$rb_minus($writer["length"], 1)];;
|
|
40799
|
-
};
|
|
40800
|
-
} catch ($err) {
|
|
40801
|
-
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {
|
|
40802
|
-
try {
|
|
40803
|
-
wrapped_ex = ex
|
|
40804
|
-
} finally { Opal.pop_exception() }
|
|
40805
|
-
} else { throw $err; }
|
|
40806
|
-
};;
|
|
40807
|
-
return self.$raise(wrapped_ex);
|
|
40808
|
-
} finally { Opal.pop_exception() }
|
|
40809
|
-
} else { throw $err; }
|
|
40810
|
-
};
|
|
40811
|
-
}, $load$14.$$arity = -2);
|
|
40812
|
-
|
|
40813
|
-
Opal.def(self, '$load_file', $load_file$21 = function $$load_file(filename, options) {
|
|
40814
|
-
var $$22, self = this;
|
|
40815
|
-
|
|
40816
|
-
|
|
40817
|
-
|
|
40818
|
-
if (options == null) {
|
|
40819
|
-
options = $hash2([], {});
|
|
40820
|
-
};
|
|
40821
|
-
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$22 = function(file){var self = $$22.$$s || this;
|
|
40822
|
-
|
|
40823
|
-
|
|
40824
|
-
|
|
40825
|
-
if (file == null) {
|
|
40826
|
-
file = nil;
|
|
40827
|
-
};
|
|
40828
|
-
return self.$load(file, options);}, $$22.$$s = self, $$22.$$arity = 1, $$22));
|
|
40829
|
-
}, $load_file$21.$$arity = -2);
|
|
40830
|
-
|
|
40831
|
-
Opal.def(self, '$convert', $convert$23 = function $$convert(input, options) {
|
|
40832
|
-
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;
|
|
40833
|
-
|
|
40834
|
-
|
|
40835
|
-
|
|
40836
|
-
if (options == null) {
|
|
40837
|
-
options = $hash2([], {});
|
|
40838
|
-
};
|
|
40839
|
-
(options = options.$merge()).$delete("parse");
|
|
40840
|
-
to_dir = options.$delete("to_dir");
|
|
40841
|
-
mkdirs = options.$delete("mkdirs");
|
|
40842
|
-
$case = (to_file = options.$delete("to_file"));
|
|
40843
|
-
if (true['$===']($case) || nil['$===']($case)) {
|
|
40844
|
-
if ($truthy((write_to_target = to_dir))) {
|
|
40845
|
-
} else if ($truthy($$$('::', 'File')['$==='](input))) {
|
|
40846
|
-
sibling_path = $$$('::', 'File').$absolute_path(input.$path())};
|
|
40847
|
-
to_file = nil;}
|
|
40848
|
-
else if (false['$===']($case)) {to_file = nil}
|
|
40849
|
-
else if ("/dev/null"['$===']($case)) {return self.$load(input, options)}
|
|
40850
|
-
else {if ($truthy((stream_output = to_file['$respond_to?']("write")))) {
|
|
40851
|
-
} else {
|
|
40852
|
-
|
|
40853
|
-
$writer = ["to_file", (write_to_target = to_file)];
|
|
40854
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40855
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
40856
|
-
}};
|
|
40857
|
-
if ($truthy(options['$key?']("standalone"))) {
|
|
40858
|
-
} else if ($truthy(($truthy($a = sibling_path) ? $a : write_to_target))) {
|
|
40859
|
-
|
|
40860
|
-
$writer = ["standalone", true];
|
|
40861
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40862
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
40863
|
-
} else if ($truthy(options['$key?']("header_footer"))) {
|
|
40864
|
-
|
|
40865
|
-
$writer = ["standalone", options['$[]']("header_footer")];
|
|
40866
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40867
|
-
$writer[$rb_minus($writer["length"], 1)];};
|
|
40868
|
-
if ($truthy(sibling_path)) {
|
|
40869
|
-
|
|
40870
|
-
$writer = ["to_dir", (outdir = $$$('::', 'File').$dirname(sibling_path))];
|
|
40871
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40872
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
40873
|
-
} else if ($truthy(write_to_target)) {
|
|
40874
|
-
if ($truthy(to_dir)) {
|
|
40875
|
-
if ($truthy(to_file)) {
|
|
40876
|
-
|
|
40877
|
-
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path($$$('::', 'File').$join(to_dir, to_file)))];
|
|
40878
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40879
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
40880
|
-
} else {
|
|
40881
|
-
|
|
40882
|
-
$writer = ["to_dir", $$$('::', 'File').$expand_path(to_dir)];
|
|
40883
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40884
|
-
$writer[$rb_minus($writer["length"], 1)];
|
|
40885
|
-
}
|
|
40886
|
-
} else if ($truthy(to_file)) {
|
|
40887
|
-
|
|
40888
|
-
$writer = ["to_dir", $$$('::', 'File').$dirname($$$('::', 'File').$expand_path(to_file))];
|
|
40889
|
-
$send(options, '[]=', Opal.to_a($writer));
|
|
40890
|
-
$writer[$rb_minus($writer["length"], 1)];}};
|
|
40891
|
-
doc = self.$load(input, options);
|
|
40892
|
-
if ($truthy(sibling_path)) {
|
|
40893
|
-
|
|
40894
|
-
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()));
|
|
40895
|
-
if (outfile['$=='](sibling_path)) {
|
|
40896
|
-
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
40897
|
-
} else if ($truthy(write_to_target)) {
|
|
40898
|
-
|
|
40899
|
-
working_dir = (function() {if ($truthy(options['$key?']("base_dir"))) {
|
|
40900
|
-
|
|
40901
|
-
return $$$('::', 'File').$expand_path(options['$[]']("base_dir"));
|
|
40902
|
-
} else {
|
|
40903
|
-
return $$$('::', 'Dir').$pwd()
|
|
40904
|
-
}; return nil; })();
|
|
40905
|
-
jail = (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
40906
|
-
return working_dir
|
|
40907
|
-
} else {
|
|
40908
|
-
return nil
|
|
40909
|
-
}; return nil; })();
|
|
40910
|
-
if ($truthy(to_dir)) {
|
|
40911
|
-
|
|
40912
|
-
outdir = doc.$normalize_system_path(to_dir, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
40913
|
-
if ($truthy(to_file)) {
|
|
40914
|
-
|
|
40915
|
-
outfile = doc.$normalize_system_path(to_file, outdir, nil, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
40916
|
-
outdir = $$$('::', 'File').$dirname(outfile);
|
|
40917
|
-
} else {
|
|
40918
|
-
outfile = $$$('::', 'File').$join(outdir, "" + (doc.$attributes()['$[]']("docname")) + (doc.$outfilesuffix()))
|
|
40919
|
-
};
|
|
40920
|
-
} else if ($truthy(to_file)) {
|
|
40921
|
-
|
|
40922
|
-
outfile = doc.$normalize_system_path(to_file, working_dir, jail, $hash2(["target_name", "recover"], {"target_name": "to_dir", "recover": false}));
|
|
40923
|
-
outdir = $$$('::', 'File').$dirname(outfile);};
|
|
40924
|
-
if ($truthy(($truthy($a = $$$('::', 'File')['$==='](input)) ? outfile['$==']($$$('::', 'File').$absolute_path(input.$path())) : $a))) {
|
|
40925
|
-
self.$raise($$$('::', 'IOError'), "" + "input file and output file cannot be the same: " + (outfile))};
|
|
40926
|
-
if ($truthy(mkdirs)) {
|
|
40927
|
-
$$($nesting, 'Helpers').$mkdir_p(outdir)
|
|
40928
|
-
} else if ($truthy($$$('::', 'File')['$directory?'](outdir))) {
|
|
40929
|
-
} else {
|
|
40930
|
-
self.$raise($$$('::', 'IOError'), "" + "target directory does not exist: " + (to_dir) + " (hint: set :mkdirs option)")
|
|
40931
|
-
};
|
|
40932
|
-
} else {
|
|
40933
|
-
|
|
40934
|
-
outfile = to_file;
|
|
40935
|
-
outdir = nil;
|
|
40936
|
-
};
|
|
40937
|
-
if ($truthy(($truthy($a = outfile) ? stream_output['$!']() : $a))) {
|
|
40938
|
-
output = doc.$convert($hash2(["outfile", "outdir"], {"outfile": outfile, "outdir": outdir}))
|
|
40939
|
-
} else {
|
|
40940
|
-
output = doc.$convert()
|
|
40941
|
-
};
|
|
40942
|
-
if ($truthy(outfile)) {
|
|
40943
|
-
|
|
40944
|
-
doc.$write(output, outfile);
|
|
40945
|
-
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))) {
|
|
40946
|
-
|
|
40947
|
-
if ($truthy((stylesheet = doc.$attr("stylesheet")))) {
|
|
40948
|
-
if ($truthy($$($nesting, 'DEFAULT_STYLESHEET_KEYS')['$include?'](stylesheet))) {
|
|
40949
|
-
copy_asciidoctor_stylesheet = true
|
|
40950
|
-
} else if ($truthy($$($nesting, 'Helpers')['$uriish?'](stylesheet)['$!']())) {
|
|
40951
|
-
copy_user_stylesheet = true}};
|
|
40952
|
-
copy_syntax_hl_stylesheet = ($truthy($a = (syntax_hl = doc.$syntax_highlighter())) ? syntax_hl['$write_stylesheet?'](doc) : $a);
|
|
40953
|
-
if ($truthy(($truthy($a = ($truthy($b = copy_asciidoctor_stylesheet) ? $b : copy_user_stylesheet)) ? $a : copy_syntax_hl_stylesheet))) {
|
|
40954
|
-
|
|
40955
|
-
stylesoutdir = doc.$normalize_system_path(stylesdir, outdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
40956
|
-
return outdir
|
|
40957
|
-
} else {
|
|
40958
|
-
return nil
|
|
40959
|
-
}; return nil; })());
|
|
40960
|
-
if ($truthy(mkdirs)) {
|
|
40961
|
-
$$($nesting, 'Helpers').$mkdir_p(stylesoutdir)
|
|
40962
|
-
} else if ($truthy($$$('::', 'File')['$directory?'](stylesoutdir))) {
|
|
40963
|
-
} else {
|
|
40964
|
-
self.$raise($$$('::', 'IOError'), "" + "target stylesheet directory does not exist: " + (stylesoutdir) + " (hint: set :mkdirs option)")
|
|
40965
|
-
};
|
|
40966
|
-
if ($truthy(copy_asciidoctor_stylesheet)) {
|
|
40967
|
-
$$($nesting, 'Stylesheets').$instance().$write_primary_stylesheet(stylesoutdir)
|
|
40968
|
-
} else if ($truthy(copy_user_stylesheet)) {
|
|
40969
|
-
|
|
40970
|
-
if ($truthy((stylesheet_src = doc.$attr("copycss"))['$empty?']())) {
|
|
40971
|
-
stylesheet_src = doc.$normalize_system_path(stylesheet)
|
|
40972
|
-
} else {
|
|
40973
|
-
stylesheet_src = doc.$normalize_system_path(stylesheet_src)
|
|
40974
|
-
};
|
|
40975
|
-
stylesheet_dest = doc.$normalize_system_path(stylesheet, stylesoutdir, (function() {if ($truthy($rb_ge(doc.$safe(), $$$($$($nesting, 'SafeMode'), 'SAFE')))) {
|
|
40976
|
-
return outdir
|
|
40977
|
-
} else {
|
|
40978
|
-
return nil
|
|
40979
|
-
}; return nil; })());
|
|
40980
|
-
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))) {
|
|
40981
|
-
$$$('::', 'File').$write(stylesheet_dest, stylesheet_data, $hash2(["mode"], {"mode": $$($nesting, 'FILE_WRITE_MODE')}))};};
|
|
40982
|
-
if ($truthy(copy_syntax_hl_stylesheet)) {
|
|
40983
|
-
syntax_hl.$write_stylesheet(doc, stylesoutdir)};};};
|
|
40984
|
-
return doc;
|
|
40985
|
-
} else {
|
|
40986
|
-
return output
|
|
40987
|
-
};
|
|
40988
|
-
}, $convert$23.$$arity = -2);
|
|
40989
|
-
Opal.alias(self, "render", "convert");
|
|
40990
|
-
|
|
40991
|
-
Opal.def(self, '$convert_file', $convert_file$24 = function $$convert_file(filename, options) {
|
|
40992
|
-
var $$25, self = this;
|
|
40993
|
-
|
|
40994
|
-
|
|
40995
|
-
|
|
40996
|
-
if (options == null) {
|
|
40997
|
-
options = $hash2([], {});
|
|
40998
|
-
};
|
|
40999
|
-
return $send($$$('::', 'File'), 'open', [filename, $$($nesting, 'FILE_READ_MODE')], ($$25 = function(file){var self = $$25.$$s || this;
|
|
41000
|
-
|
|
41001
|
-
|
|
41002
|
-
|
|
41003
|
-
if (file == null) {
|
|
41004
|
-
file = nil;
|
|
41005
|
-
};
|
|
41006
|
-
return self.$convert(file, options);}, $$25.$$s = self, $$25.$$arity = 1, $$25));
|
|
41007
|
-
}, $convert_file$24.$$arity = -2);
|
|
41008
|
-
Opal.alias(self, "render_file", "convert_file");
|
|
41009
|
-
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
41010
|
-
return nil
|
|
41011
|
-
} else {
|
|
41012
|
-
return nil
|
|
41013
|
-
};
|
|
41014
|
-
})(Opal.get_singleton_class(self), $nesting);
|
|
41149
|
+
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
41150
|
+
} else {
|
|
41151
|
+
nil
|
|
41152
|
+
};
|
|
41015
41153
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
41016
41154
|
} else {
|
|
41017
41155
|
nil
|
|
@@ -41020,6 +41158,7 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
41020
41158
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/core_ext");
|
|
41021
41159
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/helpers");
|
|
41022
41160
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/logging");
|
|
41161
|
+
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/rx");
|
|
41023
41162
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/substitutors");
|
|
41024
41163
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/version");
|
|
41025
41164
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/abstract_node");
|
|
@@ -41038,6 +41177,8 @@ Opal.modules["asciidoctor/js/postscript"] = function(Opal) {
|
|
|
41038
41177
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/stylesheets");
|
|
41039
41178
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/table");
|
|
41040
41179
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/writer");
|
|
41180
|
+
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/load");
|
|
41181
|
+
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/convert");
|
|
41041
41182
|
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
41042
41183
|
|
|
41043
41184
|
self.$require("asciidoctor.rb"+ '/../' + "asciidoctor/syntax_highlighter");
|
|
@@ -41072,6 +41213,15 @@ var fromHash = function (hash) {
|
|
|
41072
41213
|
return object
|
|
41073
41214
|
}
|
|
41074
41215
|
|
|
41216
|
+
var fromHashKeys = function (hash) {
|
|
41217
|
+
var object = {}
|
|
41218
|
+
var data = hash.$$keys
|
|
41219
|
+
for (var key in data) {
|
|
41220
|
+
object[key.toString()] = data[key].value
|
|
41221
|
+
}
|
|
41222
|
+
return object
|
|
41223
|
+
}
|
|
41224
|
+
|
|
41075
41225
|
/**
|
|
41076
41226
|
* @private
|
|
41077
41227
|
*/
|
|
@@ -41124,6 +41274,12 @@ function initializeClass (superClass, className, functions, defaultFunctions, ar
|
|
|
41124
41274
|
if (typeof constructorFunction === 'function') {
|
|
41125
41275
|
initialize = function () {
|
|
41126
41276
|
var args = Array.from(arguments)
|
|
41277
|
+
for (var i = 0; i < args.length; i++) {
|
|
41278
|
+
// convert all (Opal) Hash arguments to JSON.
|
|
41279
|
+
if (typeof args[i] === 'object' && '$$smap' in args[i]) {
|
|
41280
|
+
args[i] = fromHash(args[i])
|
|
41281
|
+
}
|
|
41282
|
+
}
|
|
41127
41283
|
args.unshift(null)
|
|
41128
41284
|
var result = new (Function.prototype.bind.apply(constructorFunction, args)) // eslint-disable-line
|
|
41129
41285
|
Object.assign(this, result)
|
|
@@ -41133,7 +41289,14 @@ function initializeClass (superClass, className, functions, defaultFunctions, ar
|
|
|
41133
41289
|
}
|
|
41134
41290
|
} else if (typeof initializeFunction === 'function') {
|
|
41135
41291
|
initialize = function () {
|
|
41136
|
-
|
|
41292
|
+
var args = Array.from(arguments)
|
|
41293
|
+
for (var i = 0; i < args.length; i++) {
|
|
41294
|
+
// convert all (Opal) Hash arguments to JSON.
|
|
41295
|
+
if (typeof args[i] === 'object' && '$$smap' in args[i]) {
|
|
41296
|
+
args[i] = fromHash(args[i])
|
|
41297
|
+
}
|
|
41298
|
+
}
|
|
41299
|
+
initializeFunction.apply(this, args)
|
|
41137
41300
|
if (typeof postConstructFunction === 'function') {
|
|
41138
41301
|
postConstructFunction.bind(this)()
|
|
41139
41302
|
}
|
|
@@ -43136,7 +43299,7 @@ var Logger = Opal.const_get_qualified(Opal.Asciidoctor, 'Logger', true)
|
|
|
43136
43299
|
Opal.Asciidoctor.Logger = Logger
|
|
43137
43300
|
|
|
43138
43301
|
Logger.prototype.getMaxSeverity = function () {
|
|
43139
|
-
|
|
43302
|
+
var result = this.max_severity
|
|
43140
43303
|
return result === Opal.nil ? undefined : result
|
|
43141
43304
|
}
|
|
43142
43305
|
Logger.prototype.getFormatter = function () {
|
|
@@ -43298,11 +43461,51 @@ SyntaxHighlighter.register = function (names, functions) {
|
|
|
43298
43461
|
var prototype = classObject.prototype
|
|
43299
43462
|
var properties = Object.getOwnPropertyNames(prototype)
|
|
43300
43463
|
functions = {}
|
|
43301
|
-
for (var
|
|
43464
|
+
for (var propertyIdx in properties) {
|
|
43465
|
+
var propertyName = properties[propertyIdx]
|
|
43302
43466
|
functions[propertyName] = prototype[propertyName]
|
|
43303
43467
|
}
|
|
43304
43468
|
}
|
|
43305
|
-
|
|
43469
|
+
var scope = initializeClass(SyntaxHighlighterBase, name, functions, {}, {
|
|
43470
|
+
'format': function (args) {
|
|
43471
|
+
if (args.length >= 2 && typeof args[2] === 'object' && '$$smap' in args[2]) {
|
|
43472
|
+
args[2] = fromHash(args[2])
|
|
43473
|
+
}
|
|
43474
|
+
if (args.length >= 1) {
|
|
43475
|
+
args[1] = args[1] === Opal.nil ? undefined : args[1]
|
|
43476
|
+
}
|
|
43477
|
+
return args
|
|
43478
|
+
},
|
|
43479
|
+
'highlight': function (args) {
|
|
43480
|
+
if (args.length >= 3 && typeof args[3] === 'object' && '$$smap' in args[3]) {
|
|
43481
|
+
var opts = args[3]
|
|
43482
|
+
opts = fromHash(opts)
|
|
43483
|
+
for (var key in opts) {
|
|
43484
|
+
var value = opts[key]
|
|
43485
|
+
if (key === 'callouts') {
|
|
43486
|
+
var callouts = fromHashKeys(value)
|
|
43487
|
+
for (var idx in callouts) {
|
|
43488
|
+
var callout = callouts[idx]
|
|
43489
|
+
for (var i = 0; i < callout.length; i++) {
|
|
43490
|
+
var items = callout[i]
|
|
43491
|
+
for (var j = 0; j < items.length; j++) {
|
|
43492
|
+
items[j] = items[j] === Opal.nil ? undefined : items[j]
|
|
43493
|
+
}
|
|
43494
|
+
}
|
|
43495
|
+
}
|
|
43496
|
+
opts[key] = callouts
|
|
43497
|
+
} else {
|
|
43498
|
+
opts[key] = value === Opal.nil ? undefined : value
|
|
43499
|
+
}
|
|
43500
|
+
}
|
|
43501
|
+
args[3] = opts
|
|
43502
|
+
}
|
|
43503
|
+
if (args.length >= 2) {
|
|
43504
|
+
args[2] = args[2] === Opal.nil ? undefined : args[2]
|
|
43505
|
+
}
|
|
43506
|
+
return args
|
|
43507
|
+
}
|
|
43508
|
+
})
|
|
43306
43509
|
for (var functionName in functions) {
|
|
43307
43510
|
if (functions.hasOwnProperty(functionName)) {
|
|
43308
43511
|
(function (functionName) {
|
|
@@ -44012,6 +44215,12 @@ InlineMacroProcessor.prototype.getName = function () {
|
|
|
44012
44215
|
InlineMacroProcessor.prototype.parseContentAs = function (value) {
|
|
44013
44216
|
this.$parse_content_as(value)
|
|
44014
44217
|
}
|
|
44218
|
+
/**
|
|
44219
|
+
* @memberof Extensions/InlineMacroProcessor
|
|
44220
|
+
*/
|
|
44221
|
+
InlineMacroProcessor.prototype.matchFormat = function (value) {
|
|
44222
|
+
this.$match_format(value)
|
|
44223
|
+
}
|
|
44015
44224
|
|
|
44016
44225
|
/**
|
|
44017
44226
|
* @namespace
|
|
@@ -44436,7 +44645,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
|
|
|
44436
44645
|
}
|
|
44437
44646
|
|
|
44438
44647
|
|
|
44439
|
-
var ASCIIDOCTOR_JS_VERSION = '2.0.
|
|
44648
|
+
var ASCIIDOCTOR_JS_VERSION = '2.0.3';
|
|
44440
44649
|
|
|
44441
44650
|
/**
|
|
44442
44651
|
* Get Asciidoctor.js version number.
|