asciidoctor-interdoc-reftext
Advanced tools
Comparing version 0.4.1 to 0.5.0
(function (Opal) { | ||
function initialize (Opal) { | ||
/* Generated by Opal 0.11.2 */ | ||
/* Generated by Opal 0.11.99.dev */ | ||
Opal.modules["asciidoctor/interdoc_reftext/version"] = function(Opal) { | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module; | ||
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; | ||
return (function($base, $parent_nesting) { | ||
var $Asciidoctor, self = $Asciidoctor = $module($base, 'Asciidoctor'); | ||
var self = $module($base, 'Asciidoctor'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting); | ||
var $nesting = [self].concat($parent_nesting); | ||
(function($base, $parent_nesting) { | ||
var $InterdocReftext, self = $InterdocReftext = $module($base, 'InterdocReftext'); | ||
var self = $module($base, 'InterdocReftext'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting); | ||
var $nesting = [self].concat($parent_nesting); | ||
Opal.const_set($nesting[0], 'VERSION', "0.4.1") | ||
Opal.const_set($nesting[0], 'VERSION', "0.5.0") | ||
})($nesting[0], $nesting) | ||
@@ -22,10 +22,10 @@ })($nesting[0], $nesting) | ||
/* Generated by Opal 0.11.2 */ | ||
/* Generated by Opal 0.11.99.dev */ | ||
Opal.modules["asciidoctor/interdoc_reftext/inline_node_mixin"] = function(Opal) { | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $send = Opal.send, $truthy = Opal.truthy; | ||
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, $truthy = Opal.truthy; | ||
Opal.add_stubs(['$==', '$require', '$send', '$text_without_reftext', '$interdoc_reftext', '$private', '$!=', '$nil?', '$[]', '$instance_variable_get', '$call']); | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
nil | ||
@@ -35,23 +35,23 @@ }; | ||
return (function($base, $parent_nesting) { | ||
var $InterdocReftext, self = $InterdocReftext = $module($base, 'InterdocReftext'); | ||
var self = $module($base, 'InterdocReftext'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting); | ||
var $nesting = [self].concat($parent_nesting); | ||
(function($base, $parent_nesting) { | ||
var $InlineNodeMixin, self = $InlineNodeMixin = $module($base, 'InlineNodeMixin'); | ||
var self = $module($base, 'InlineNodeMixin'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting), TMP_InlineNodeMixin_included_2, TMP_InlineNodeMixin_interdoc_reftext_3; | ||
var $nesting = [self].concat($parent_nesting), $InlineNodeMixin_included$1, $InlineNodeMixin_interdoc_reftext$3; | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
Opal.defs(self, '$included', TMP_InlineNodeMixin_included_2 = function $$included(base_klass) { | ||
var TMP_1, self = this; | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
Opal.defs(self, '$included', $InlineNodeMixin_included$1 = function $$included(base_klass) { | ||
var $$2, self = this; | ||
base_klass.$send("alias_method", "text_without_reftext", "text"); | ||
return $send(base_klass, 'send', ["define_method", "text"], (TMP_1 = function(){var self = TMP_1.$$s || this, $a; | ||
return $send(base_klass, 'send', ["define_method", "text"], ($$2 = function(){var self = $$2.$$s || this, $a; | ||
return ($truthy($a = self.$text_without_reftext()) ? $a : self.$interdoc_reftext())}, TMP_1.$$s = self, TMP_1.$$arity = 0, TMP_1)); | ||
}, TMP_InlineNodeMixin_included_2.$$arity = 1) | ||
} else { | ||
return ($truthy($a = self.$text_without_reftext()) ? $a : self.$interdoc_reftext())}, $$2.$$s = self, $$2.$$arity = 0, $$2)); | ||
}, $InlineNodeMixin_included$1.$$arity = 1) | ||
} else { | ||
nil | ||
@@ -61,3 +61,3 @@ }; | ||
Opal.defn(self, '$interdoc_reftext', TMP_InlineNodeMixin_interdoc_reftext_3 = function $$interdoc_reftext() { | ||
Opal.def(self, '$interdoc_reftext', $InlineNodeMixin_interdoc_reftext$3 = function $$interdoc_reftext() { | ||
var $a, self = this, resolver = nil; | ||
@@ -71,13 +71,13 @@ if (self.node_name == null) self.node_name = nil; | ||
return nil}; | ||
if ($truthy((resolver = self.document.$instance_variable_get(Opal.const_get_qualified(Opal.const_get_relative($nesting, 'Processor'), 'RESOLVER_VAR_NAME'))))) { | ||
if ($truthy((resolver = self.document.$instance_variable_get($$$($$($nesting, 'Processor'), 'RESOLVER_VAR_NAME'))))) { | ||
return (self.text = resolver.$call(self.attributes['$[]']("refid"))) | ||
} else { | ||
} else { | ||
return nil | ||
}; | ||
}, TMP_InlineNodeMixin_interdoc_reftext_3.$$arity = 0); | ||
}, $InlineNodeMixin_interdoc_reftext$3.$$arity = 0); | ||
})($nesting[0], $nesting) | ||
})(Opal.const_get_relative($nesting, 'Asciidoctor'), $nesting); | ||
})($$($nesting, 'Asciidoctor'), $nesting); | ||
}; | ||
/* Generated by Opal 0.11.2 */ | ||
/* Generated by Opal 0.11.99.dev */ | ||
Opal.modules["asciidoctor/interdoc_reftext/resolver"] = function(Opal) { | ||
@@ -90,12 +90,12 @@ function $rb_minus(lhs, rhs) { | ||
} | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $truthy = Opal.truthy, $send = Opal.send, $hash2 = Opal.hash2; | ||
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; | ||
Opal.add_stubs(['$==', '$require', '$logger', '$new', '$tap', '$puts', '$freeze', '$dup', '$empty?', '$start_with?', '$raise', '$error', '$split', '$resolve_target_path', '$[]', '$read_file', '$parse_reftext', '$[]=', '$-', '$protected', '$attr_reader', '$normalize_system_path', '$dir', '$reader', '$each', '$+', '$file?', '$open', '$each_line', '$doctitle', '$asciidoc_load', '$take', '$catalog', '$xreftext', '$is_a?', '$!', '$respond_to?', '$send', '$singleton_class', '$load', '$options']); | ||
Opal.add_stubs(['$==', '$require', '$logger', '$new', '$freeze', '$dup', '$empty?', '$start_with?', '$raise', '$error', '$split', '$resolve_target_path', '$[]', '$read_file', '$parse_reftext', '$[]=', '$-', '$protected', '$attr_reader', '$normalize_system_path', '$dir', '$reader', '$each', '$+', '$file?', '$open', '$each_line', '$doctitle', '$asciidoc_load', '$take', '$catalog', '$xreftext', '$load', '$to_a', '$options']); | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
nil | ||
}; | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
nil | ||
@@ -105,56 +105,43 @@ }; | ||
return (function($base, $parent_nesting) { | ||
var $InterdocReftext, self = $InterdocReftext = $module($base, 'InterdocReftext'); | ||
var self = $module($base, 'InterdocReftext'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting); | ||
var $nesting = [self].concat($parent_nesting); | ||
(function($base, $super, $parent_nesting) { | ||
function $Resolver(){}; | ||
var self = $Resolver = $klass($base, $super, 'Resolver', $Resolver); | ||
var self = $klass($base, $super, 'Resolver'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting), TMP_Resolver_initialize_3, TMP_Resolver_resolve_reftext_5, TMP_Resolver_resolve_target_path_7, TMP_Resolver_read_file_9, TMP_Resolver_parse_reftext_10, TMP_Resolver_asciidoc_load_11; | ||
var $nesting = [self].concat($parent_nesting), $Resolver_initialize$1, $Resolver_resolve_reftext$2, $Resolver_resolve_target_path$4, $Resolver_read_file$6, $Resolver_parse_reftext$8, $Resolver_asciidoc_load$9; | ||
def.raise_exceptions = def.logger = def.cache = def.document = def.asciidoc_exts = nil; | ||
self.$$prototype.raise_exceptions = self.$$prototype.logger = self.$$prototype.cache = self.$$prototype.document = self.$$prototype.asciidoc_exts = nil; | ||
Opal.defn(self, '$initialize', TMP_Resolver_initialize_3 = function $$initialize(document, $kwargs) { | ||
var $a, $b, $c, $d, TMP_1, self = this, asciidoc_exts, logger, raise_exceptions; | ||
Opal.def(self, '$initialize', $Resolver_initialize$1 = function $$initialize(document, $kwargs) { | ||
var asciidoc_exts, logger, raise_exceptions, $a, $b, $c, self = this; | ||
if ($kwargs == null || !$kwargs.$$is_hash) { | ||
if ($kwargs == null) { | ||
$kwargs = $hash2([], {}); | ||
} else { | ||
throw Opal.ArgumentError.$new('expected kwargs'); | ||
} | ||
} | ||
if ($kwargs == null) { | ||
$kwargs = $hash2([], {}); | ||
} else if (!$kwargs.$$is_hash) { | ||
throw Opal.ArgumentError.$new('expected kwargs'); | ||
}; | ||
asciidoc_exts = $kwargs.$$smap["asciidoc_exts"]; | ||
if (asciidoc_exts == null) { | ||
asciidoc_exts = [".adoc", ".asciidoc", ".ad"] | ||
} | ||
}; | ||
logger = $kwargs.$$smap["logger"]; | ||
if (logger == null) { | ||
logger = nil | ||
} | ||
}; | ||
raise_exceptions = $kwargs.$$smap["raise_exceptions"]; | ||
if (raise_exceptions == null) { | ||
raise_exceptions = true | ||
} | ||
logger = ($truthy($a = logger) ? $a : (function() {if ($truthy((($c = Opal.const_get_qualified('::', 'Asciidoctor', 'skip_raise')) && ($b = Opal.const_get_qualified($c, 'LoggerManager', 'skip_raise')) ? 'constant' : nil))) { | ||
return Opal.const_get_qualified(Opal.const_get_qualified('::', 'Asciidoctor'), 'LoggerManager').$logger() | ||
} else if ($truthy((($d = Opal.const_get_qualified('::', 'Logger', 'skip_raise')) ? 'constant' : nil))) { | ||
return Opal.const_get_qualified('::', 'Logger').$new(Opal.const_get_relative($nesting, 'STDERR')) | ||
} else { | ||
return $send(Opal.const_get_relative($nesting, 'Object').$new(), 'tap', [], (TMP_1 = function(o){var self = TMP_1.$$s || this, TMP_method_missing_2; | ||
if (o == null) o = nil; | ||
return Opal.defs(o, '$method_missing', TMP_method_missing_2 = function $$method_missing(_, $a_rest) { | ||
var self = this, args; | ||
var $args_len = arguments.length, $rest_len = $args_len - 1; | ||
if ($rest_len < 0) { $rest_len = 0; } | ||
args = new Array($rest_len); | ||
for (var $arg_idx = 1; $arg_idx < $args_len; $arg_idx++) { | ||
args[$arg_idx - 1] = arguments[$arg_idx]; | ||
} | ||
return $send(Opal.const_get_relative($nesting, 'STDERR'), 'puts', Opal.to_a(args)) | ||
}, TMP_method_missing_2.$$arity = -2)}, TMP_1.$$s = self, TMP_1.$$arity = 1, TMP_1)) | ||
}; | ||
logger = ($truthy($a = logger) ? $a : (function() {if ($truthy((($c = $$$('::', 'Asciidoctor', 'skip_raise')) && ($b = $$$($c, 'LoggerManager', 'skip_raise')) ? 'constant' : nil))) { | ||
return $$$($$$('::', 'Asciidoctor'), 'LoggerManager').$logger() | ||
} else { | ||
return $$$('::', 'Logger').$new($$($nesting, 'STDERR')) | ||
}; return nil; })()); | ||
@@ -166,7 +153,7 @@ self.document = document; | ||
return (self.cache = $hash2([], {})); | ||
}, TMP_Resolver_initialize_3.$$arity = -2); | ||
}, $Resolver_initialize$1.$$arity = -2); | ||
Opal.defn(self, '$resolve_reftext', TMP_Resolver_resolve_reftext_5 = function $$resolve_reftext(refid) {try { | ||
Opal.def(self, '$resolve_reftext', $Resolver_resolve_reftext$2 = function $$resolve_reftext(refid) {try { | ||
var $a, $b, TMP_4, self = this, msg = nil, path = nil, fragment = nil, $writer = nil, e = nil; | ||
var $a, $b, $$3, self = this, msg = nil, path = nil, fragment = nil, $writer = nil, e = nil; | ||
@@ -178,3 +165,3 @@ | ||
if ($truthy(self.raise_exceptions)) { | ||
self.$raise(Opal.const_get_relative($nesting, 'ArgumentError'), msg)}; | ||
self.$raise($$($nesting, 'ArgumentError'), msg)}; | ||
self.logger.$error(msg); | ||
@@ -185,7 +172,12 @@ return nil;}; | ||
return ($truthy($a = self.cache['$[]'](((("" + (path)) + "#") + (fragment)).$freeze())) ? $a : (($writer = [((("" + (path)) + "#") + (fragment)).$freeze(), (function() { try { | ||
return $send(self, 'read_file', [path], (TMP_4 = function(lines){var self = TMP_4.$$s || this; | ||
if (lines == null) lines = nil; | ||
return self.$parse_reftext(lines, fragment)}, TMP_4.$$s = self, TMP_4.$$arity = 1, TMP_4)) | ||
return $send(self, 'read_file', [path], ($$3 = function(lines){var self = $$3.$$s || this; | ||
if (lines == null) { | ||
lines = nil; | ||
}; | ||
return self.$parse_reftext(lines, fragment);}, $$3.$$s = self, $$3.$$arity = 1, $$3)) | ||
} catch ($err) { | ||
if (Opal.rescue($err, [Opal.const_get_relative($nesting, 'StandardError')])) {e = $err; | ||
if (Opal.rescue($err, [$$($nesting, 'StandardError')])) {e = $err; | ||
try { | ||
@@ -201,3 +193,3 @@ | ||
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } | ||
}, TMP_Resolver_resolve_reftext_5.$$arity = 1); | ||
}, $Resolver_resolve_reftext$2.$$arity = 1); | ||
Opal.alias(self, "call", "resolve_reftext"); | ||
@@ -211,5 +203,5 @@ self.$protected(); | ||
Opal.defn(self, '$resolve_target_path', TMP_Resolver_resolve_target_path_7 = function $$resolve_target_path(target_path) {try { | ||
Opal.def(self, '$resolve_target_path', $Resolver_resolve_target_path$4 = function $$resolve_target_path(target_path) {try { | ||
var TMP_6, self = this, path = nil; | ||
var $$5, self = this, path = nil; | ||
@@ -219,36 +211,46 @@ | ||
if ($truthy(path)) { | ||
} else { | ||
} else { | ||
return nil | ||
}; | ||
$send(self.asciidoc_exts, 'each', [], (TMP_6 = function(extname){var self = TMP_6.$$s || this, filename = nil; | ||
if (extname == null) extname = nil; | ||
$send(self.asciidoc_exts, 'each', [], ($$5 = function(extname){var self = $$5.$$s || this, filename = nil; | ||
if (extname == null) { | ||
extname = nil; | ||
}; | ||
filename = $rb_plus(path, extname); | ||
if ($truthy(Opal.const_get_qualified('::', 'File')['$file?'](filename))) { | ||
if ($truthy($$$('::', 'File')['$file?'](filename))) { | ||
Opal.ret(filename) | ||
} else { | ||
} else { | ||
return nil | ||
};}, TMP_6.$$s = self, TMP_6.$$arity = 1, TMP_6)); | ||
};}, $$5.$$s = self, $$5.$$arity = 1, $$5)); | ||
return nil; | ||
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; } | ||
}, TMP_Resolver_resolve_target_path_7.$$arity = 1); | ||
}, $Resolver_resolve_target_path$4.$$arity = 1); | ||
Opal.defn(self, '$read_file', TMP_Resolver_read_file_9 = function $$read_file(path) { | ||
var TMP_8, self = this, $iter = TMP_Resolver_read_file_9.$$p, $yield = $iter || nil; | ||
Opal.def(self, '$read_file', $Resolver_read_file$6 = function $$read_file(path) { | ||
var $$7, $iter = $Resolver_read_file$6.$$p, $yield = $iter || nil, self = this; | ||
if ($iter) TMP_Resolver_read_file_9.$$p = null; | ||
return $send(Opal.const_get_qualified('::', 'File'), 'open', [path], (TMP_8 = function(f){var self = TMP_8.$$s || this; | ||
if (f == null) f = nil; | ||
return Opal.yield1($yield, f.$each_line());}, TMP_8.$$s = self, TMP_8.$$arity = 1, TMP_8)) | ||
}, TMP_Resolver_read_file_9.$$arity = 1); | ||
if ($iter) $Resolver_read_file$6.$$p = null; | ||
return $send($$$('::', 'File'), 'open', [path], ($$7 = function(f){var self = $$7.$$s || this; | ||
if (f == null) { | ||
f = nil; | ||
}; | ||
return Opal.yield1($yield, f.$each_line());;}, $$7.$$s = self, $$7.$$arity = 1, $$7)) | ||
}, $Resolver_read_file$6.$$arity = 1); | ||
Opal.defn(self, '$parse_reftext', TMP_Resolver_parse_reftext_10 = function $$parse_reftext(input, fragment) { | ||
Opal.def(self, '$parse_reftext', $Resolver_parse_reftext$8 = function $$parse_reftext(input, fragment) { | ||
var self = this, title = nil, doc = nil, ref = nil; | ||
if (fragment == null) { | ||
fragment = nil; | ||
} | ||
}; | ||
if ($truthy(fragment)) { | ||
} else { | ||
} else { | ||
@@ -265,33 +267,30 @@ title = self.$asciidoc_load(input.$take(10)).$doctitle(); | ||
return ref.$xreftext() | ||
} else { | ||
} else { | ||
return nil | ||
}; | ||
} else { | ||
} else { | ||
return doc.$doctitle() | ||
}; | ||
}, TMP_Resolver_parse_reftext_10.$$arity = -2); | ||
return (Opal.defn(self, '$asciidoc_load', TMP_Resolver_asciidoc_load_11 = function $$asciidoc_load(input) { | ||
var $a, self = this; | ||
}, $Resolver_parse_reftext$8.$$arity = -2); | ||
return (Opal.def(self, '$asciidoc_load', $Resolver_asciidoc_load$9 = function $$asciidoc_load(input) { | ||
var self = this; | ||
if ($truthy(($truthy($a = input['$is_a?'](Opal.const_get_qualified('::', 'Enumerable'))) ? input['$respond_to?']("readlines")['$!']() : $a))) { | ||
input.$singleton_class().$send("alias_method", "readlines", "to_a")}; | ||
return Opal.const_get_qualified('::', 'Asciidoctor').$load(input, self.document.$options()); | ||
}, TMP_Resolver_asciidoc_load_11.$$arity = 1), nil) && 'asciidoc_load'; | ||
return $$$('::', 'Asciidoctor').$load(input.$to_a(), self.document.$options()) | ||
}, $Resolver_asciidoc_load$9.$$arity = 1), nil) && 'asciidoc_load'; | ||
})($nesting[0], null, $nesting) | ||
})(Opal.const_get_relative($nesting, 'Asciidoctor'), $nesting); | ||
})($$($nesting, 'Asciidoctor'), $nesting); | ||
}; | ||
/* Generated by Opal 0.11.2 */ | ||
/* Generated by Opal 0.11.99.dev */ | ||
Opal.modules["asciidoctor/interdoc_reftext/processor"] = function(Opal) { | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2; | ||
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; | ||
Opal.add_stubs(['$==', '$require', '$include?', '$send', '$new', '$instance_variable_set']); | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
nil | ||
}; | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
} else { | ||
nil | ||
@@ -303,32 +302,19 @@ }; | ||
return (function($base, $parent_nesting) { | ||
var $InterdocReftext, self = $InterdocReftext = $module($base, 'InterdocReftext'); | ||
var self = $module($base, 'InterdocReftext'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting); | ||
var $nesting = [self].concat($parent_nesting); | ||
(function($base, $super, $parent_nesting) { | ||
function $Processor(){}; | ||
var self = $Processor = $klass($base, $super, 'Processor', $Processor); | ||
var self = $klass($base, $super, 'Processor'); | ||
var def = self.$$proto, $nesting = [self].concat($parent_nesting), TMP_Processor_initialize_1, TMP_Processor_process_2; | ||
var $nesting = [self].concat($parent_nesting), $Processor_initialize$1, $Processor_process$2; | ||
def.resolver_class = def.resolver_opts = nil; | ||
self.$$prototype.resolver_class = self.$$prototype.resolver_opts = nil; | ||
Opal.const_set($nesting[0], 'RESOLVER_VAR_NAME', "@_interdoc_reftext_resolver"); | ||
Opal.defn(self, '$initialize', TMP_Processor_initialize_1 = function $$initialize($kwargs) { | ||
var self = this, resolver_class, resolver_opts, $iter = TMP_Processor_initialize_1.$$p, $yield = $iter || nil, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; | ||
Opal.def(self, '$initialize', $Processor_initialize$1 = function $$initialize($kwargs) { | ||
var resolver_class, resolver_opts, $iter = $Processor_initialize$1.$$p, $yield = $iter || nil, self = this, $zuper = nil, $zuper_i = nil, $zuper_ii = nil; | ||
if ($kwargs == null || !$kwargs.$$is_hash) { | ||
if ($kwargs == null) { | ||
$kwargs = $hash2([], {}); | ||
} else { | ||
throw Opal.ArgumentError.$new('expected kwargs'); | ||
} | ||
} | ||
resolver_class = $kwargs.$$smap["resolver_class"]; | ||
if (resolver_class == null) { | ||
resolver_class = Opal.const_get_relative($nesting, 'Resolver') | ||
} | ||
resolver_opts = Opal.kwrestargs($kwargs, {'resolver_class': true}); | ||
if ($iter) TMP_Processor_initialize_1.$$p = null; | ||
if ($iter) $Processor_initialize$1.$$p = null; | ||
// Prepare super implicit arguments | ||
@@ -339,14 +325,27 @@ for($zuper_i = 0, $zuper_ii = arguments.length, $zuper = new Array($zuper_ii); $zuper_i < $zuper_ii; $zuper_i++) { | ||
$send(self, Opal.find_super_dispatcher(self, 'initialize', TMP_Processor_initialize_1, false), $zuper, $iter); | ||
if ($kwargs == null) { | ||
$kwargs = $hash2([], {}); | ||
} else if (!$kwargs.$$is_hash) { | ||
throw Opal.ArgumentError.$new('expected kwargs'); | ||
}; | ||
resolver_class = $kwargs.$$smap["resolver_class"]; | ||
if (resolver_class == null) { | ||
resolver_class = $$($nesting, 'Resolver') | ||
}; | ||
resolver_opts = Opal.kwrestargs($kwargs, {'resolver_class': true});; | ||
$send(self, Opal.find_super_dispatcher(self, 'initialize', $Processor_initialize$1, false), $zuper, $iter); | ||
self.resolver_class = resolver_class; | ||
self.resolver_opts = resolver_opts; | ||
if ($truthy(Opal.const_get_qualified(Opal.const_get_qualified('::', 'Asciidoctor'), 'Inline')['$include?'](Opal.const_get_relative($nesting, 'InlineNodeMixin')))) { | ||
if ($truthy($$$($$$('::', 'Asciidoctor'), 'Inline')['$include?']($$($nesting, 'InlineNodeMixin')))) { | ||
return nil | ||
} else if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
return Opal.const_get_qualified(Opal.const_get_qualified('::', 'Asciidoctor'), 'Inline').$send("include", Opal.const_get_relative($nesting, 'InlineNodeMixin')) | ||
} else { | ||
} else if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
return $$$($$$('::', 'Asciidoctor'), 'Inline').$send("include", $$($nesting, 'InlineNodeMixin')) | ||
} else { | ||
return nil | ||
}; | ||
}, TMP_Processor_initialize_1.$$arity = -1); | ||
return (Opal.defn(self, '$process', TMP_Processor_process_2 = function $$process(document) { | ||
}, $Processor_initialize$1.$$arity = -1); | ||
return (Opal.def(self, '$process', $Processor_process$2 = function $$process(document) { | ||
var self = this, resolver = nil; | ||
@@ -356,12 +355,12 @@ | ||
resolver = self.resolver_class.$new(document, self.resolver_opts); | ||
document.$instance_variable_set(Opal.const_get_relative($nesting, 'RESOLVER_VAR_NAME'), resolver); | ||
document.$instance_variable_set($$($nesting, 'RESOLVER_VAR_NAME'), resolver); | ||
return nil; | ||
}, TMP_Processor_process_2.$$arity = 1), nil) && 'process'; | ||
})($nesting[0], Opal.const_get_qualified(Opal.const_get_qualified(Opal.const_get_qualified('::', 'Asciidoctor'), 'Extensions'), 'TreeProcessor'), $nesting) | ||
})(Opal.const_get_relative($nesting, 'Asciidoctor'), $nesting); | ||
}, $Processor_process$2.$$arity = 1), nil) && 'process'; | ||
})($nesting[0], $$$($$$($$$('::', 'Asciidoctor'), 'Extensions'), 'TreeProcessor'), $nesting) | ||
})($$($nesting, 'Asciidoctor'), $nesting); | ||
}; | ||
/* Generated by Opal 0.11.2 */ | ||
/* Generated by Opal 0.11.99.dev */ | ||
(function(Opal) { | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $breaker = Opal.breaker, $slice = Opal.slice; | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice; | ||
@@ -372,5 +371,5 @@ Opal.add_stubs(['$require', '$==']); | ||
self.$require("asciidoctor/interdoc_reftext/processor"); | ||
if (Opal.const_get_relative($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
if ($$($nesting, 'RUBY_PLATFORM')['$==']("opal")) { | ||
return nil | ||
} else { | ||
} else { | ||
return nil | ||
@@ -377,0 +376,0 @@ }; |
{ | ||
"name": "asciidoctor-interdoc-reftext", | ||
"version": "0.4.1", | ||
"version": "0.5.0", | ||
"description": "Asciidoctor extension providing implicit (automatic) reference text (label) for inter-document cross references", | ||
@@ -31,7 +31,7 @@ "author": "Jakub Jirutka <jakub@jirutka.cz>", | ||
"devDependencies": { | ||
"asciidoctor.js": "~1.5.6" | ||
"@asciidoctor/core": "~2.0.0" | ||
}, | ||
"peerDependencies": { | ||
"asciidoctor.js": "~1.5.6" | ||
"@asciidoctor/core": "~2.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24465
360