@asciidoctor/core 3.0.0-rc.2 → 3.0.1
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 +165 -127
- package/dist/browser/asciidoctor.min.js +1341 -1339
- package/dist/css/asciidoctor.css +3 -6
- package/dist/graalvm/asciidoctor.js +164 -126
- package/dist/node/asciidoctor.cjs +173 -139
- package/dist/node/asciidoctor.js +164 -126
- package/package.json +10 -10
- package/types/index.d.ts +1 -1
|
@@ -25751,7 +25751,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
25751
25751
|
"use strict";
|
|
25752
25752
|
var $module = Opal.module, $truthy = Opal.truthy, $eqeq = Opal.eqeq, $gvars = Opal.gvars, $def = Opal.def, $send = Opal.send, $neqeq = Opal.neqeq, $const_set = Opal.const_set, $hash2 = Opal.hash2, $to_ary = Opal.to_ary, $rb_times = Opal.rb_times, $eqeqeq = Opal.eqeqeq, $rb_plus = Opal.rb_plus, $Class = Opal.Class, $Object = Opal.Object, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$;
|
|
25753
25753
|
|
|
25754
|
-
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
|
|
25754
|
+
Opal.add_stubs('module_function,require,include?,include,==,path,message,raise,warn,logger,chomp,empty?,slice,unpack,[],[]=,byteslice,bytesize,map,rstrip,encode,encoding,nil_or_empty?,!=,tap,each_line,<<,!,start_with?,match?,gsub,rindex,index,basename,extname,length,directory?,dirname,mkdir_p,mkdir,private_constant,join,divmod,*,===,+,to_s,to_i,succ,class_for_name,const_get');
|
|
25755
25755
|
return (function($base, $parent_nesting) {
|
|
25756
25756
|
var self = $module($base, 'Asciidoctor');
|
|
25757
25757
|
|
|
@@ -25913,17 +25913,31 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
25913
25913
|
return lines['$<<'](line.$chomp());});})
|
|
25914
25914
|
};
|
|
25915
25915
|
}, -2);
|
|
25916
|
-
|
|
25917
|
-
|
|
25918
|
-
|
|
25916
|
+
if ($eqeq($$$('RUBY_ENGINE'), "jruby")) {
|
|
25917
|
+
|
|
25918
|
+
$def(self, '$uriish?', function $Helpers_uriish$ques$13(str) {
|
|
25919
|
+
var $ret_or_1 = nil, $ret_or_2 = nil;
|
|
25919
25920
|
|
|
25920
|
-
|
|
25921
|
-
|
|
25922
|
-
|
|
25923
|
-
|
|
25924
|
-
|
|
25925
|
-
|
|
25926
|
-
|
|
25921
|
+
if ($truthy(($ret_or_1 = ($truthy(($ret_or_2 = str['$include?'](":"))) ? (str['$start_with?']("uri:classloader:")['$!']()) : ($ret_or_2))))) {
|
|
25922
|
+
|
|
25923
|
+
return $$('UriSniffRx')['$match?'](str);
|
|
25924
|
+
} else {
|
|
25925
|
+
return $ret_or_1
|
|
25926
|
+
}
|
|
25927
|
+
})
|
|
25928
|
+
} else {
|
|
25929
|
+
|
|
25930
|
+
$def(self, '$uriish?', function $Helpers_uriish$ques$14(str) {
|
|
25931
|
+
var $ret_or_1 = nil;
|
|
25932
|
+
|
|
25933
|
+
if ($truthy(($ret_or_1 = str['$include?'](":")))) {
|
|
25934
|
+
|
|
25935
|
+
return $$('UriSniffRx')['$match?'](str);
|
|
25936
|
+
} else {
|
|
25937
|
+
return $ret_or_1
|
|
25938
|
+
}
|
|
25939
|
+
})
|
|
25940
|
+
};
|
|
25927
25941
|
|
|
25928
25942
|
$def(self, '$encode_uri_component', function $$encode_uri_component(str) {
|
|
25929
25943
|
|
|
@@ -25971,7 +25985,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
25971
25985
|
};
|
|
25972
25986
|
}, -2);
|
|
25973
25987
|
|
|
25974
|
-
$def(self, '$extname?', function $Helpers_extname$ques$
|
|
25988
|
+
$def(self, '$extname?', function $Helpers_extname$ques$15(path) {
|
|
25975
25989
|
var $ret_or_1 = nil, last_dot_idx = nil;
|
|
25976
25990
|
|
|
25977
25991
|
if ($truthy(($ret_or_1 = (last_dot_idx = path.$rindex("."))))) {
|
|
@@ -26049,7 +26063,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
26049
26063
|
|
|
26050
26064
|
$def(self, '$int_to_roman', function $$int_to_roman(val) {
|
|
26051
26065
|
|
|
26052
|
-
return $send($$('ROMAN_NUMERALS'), 'map', [], function $$
|
|
26066
|
+
return $send($$('ROMAN_NUMERALS'), 'map', [], function $$16(l, i){var $a, $b, repeat = nil;
|
|
26053
26067
|
|
|
26054
26068
|
|
|
26055
26069
|
if (l == null) l = nil;
|
|
@@ -26551,7 +26565,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {/* Generated by Opal 1.7.3 */
|
|
|
26551
26565
|
$const_set($nesting[0], 'ManpageNamePurposeRx', $regexp(["^(", $$('CC_ANY'), "+?) +- +(", $$('CC_ANY'), "+)$"]));
|
|
26552
26566
|
$const_set($nesting[0], 'ConditionalDirectiveRx', $regexp(["^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(", $$('CC_ANY'), "+)?\\]$"]));
|
|
26553
26567
|
$const_set($nesting[0], 'EvalExpressionRx', $regexp(["^(", $$('CC_ANY'), "+?) *([=!><]=|[><]) *(", $$('CC_ANY'), "+)$"]));
|
|
26554
|
-
$const_set($nesting[0], 'IncludeDirectiveRx', $regexp(["^(\\\\)?include::([^\\[][^\\[]*)\\[(", $$('CC_ANY'), "+)?\\]$"]));
|
|
26568
|
+
$const_set($nesting[0], 'IncludeDirectiveRx', $regexp(["^(\\\\)?include::([^\\s\\[](?:[^\\[]*[^\\s\\[])?)\\[(", $$('CC_ANY'), "+)?\\]$"]));
|
|
26555
26569
|
$const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
|
|
26556
26570
|
$const_set($nesting[0], 'AttributeEntryRx', $regexp(["^:(!?", $$('CG_WORD'), "[^:]*):(?:[ \\t]+(", $$('CC_ANY'), "*))?$"]));
|
|
26557
26571
|
$const_set($nesting[0], 'InvalidAttributeNameCharsRx', $regexp(["[^", $$('CC_WORD'), "-]"]));
|
|
@@ -26609,14 +26623,13 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {/* Generated by Opal 1.7.3 */
|
|
|
26609
26623
|
$const_set($nesting[0], 'InlineImageMacroRx', $regexp(["\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
|
|
26610
26624
|
$const_set($nesting[0], 'InlineIndextermMacroRx', $regexp(["\\\\?(?:(indexterm2?):\\[(", $$('CC_ALL'), "*?[^\\\\])\\]|\\(\\((", $$('CC_ALL'), "+?)\\)\\)(?!\\)))"], 'm'));
|
|
26611
26625
|
$const_set($nesting[0], 'InlineKbdBtnMacroRx', $regexp(["(\\\\)?(kbd|btn):\\[(", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
|
|
26612
|
-
$const_set($nesting[0], 'InlineLinkRx', $regexp(["(^|link:|", $$('CG_BLANK'), "|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]
|
|
26626
|
+
$const_set($nesting[0], 'InlineLinkRx', $regexp(["(^|link:|", $$('CG_BLANK'), "|<|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))"], 'm'));
|
|
26613
26627
|
$const_set($nesting[0], 'InlineLinkMacroRx', $regexp(["\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
|
|
26614
26628
|
$const_set($nesting[0], 'MacroNameRx', $regexp(["^", $$('CG_WORD'), "[", $$('CC_WORD'), "-]*$"]));
|
|
26615
26629
|
$const_set($nesting[0], 'InlineStemMacroRx', $regexp(["\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
|
|
26616
26630
|
$const_set($nesting[0], 'InlineMenuMacroRx', $regexp(["\\\\?menu:(", $$('CG_WORD'), "|[", $$('CC_WORD'), "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(", $$('CC_ALL'), "*?[^\\\\]))\\]"], 'm'));
|
|
26617
26631
|
$const_set($nesting[0], 'InlineMenuRx', $regexp(["\\\\?\"([", $$('CC_WORD'), "&][^\"]*?[ \\n]+>[ \\n]+[^\"]*)\""]));
|
|
26618
|
-
$const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "
|
|
26619
|
-
$const_set($nesting[0], 'SinglePlusInlinePassRx', $regexp(["^(\\\\)?\\+(\\S|\\S", $$('CC_ALL'), "*?\\S)\\+$"], 'm'));
|
|
26632
|
+
$const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "-]", $regexp(["((?:^|[^", $$('CC_WORD'), ";:\\\\])(?=(\\[)|\\+)|\\\\(?=\\[)|(?=\\\\\\+))(?:\\2(x-|[^\\]]+ x-)\\]|(?:\\[([^\\]]+)\\])?(?=(\\\\)?\\+))(\\5?(\\+|`)(\\S|\\S", $$('CC_ALL'), "*?\\S)\\7)(?!", $$('CG_WORD'), ")"], 'm')], true, ["`", nil, $regexp(["(^|[^`", $$('CC_WORD'), "])(?:(\\Z)()|\\[([^\\]]+)\\](?=(\\\\))?)?(\\5?(`)([^`\\s]|[^`\\s]", $$('CC_ALL'), "*?\\S)\\7)(?![`", $$('CC_WORD'), "])"], 'm')]));
|
|
26620
26633
|
$const_set($nesting[0], 'InlinePassMacroRx', $regexp(["(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(", $$('CC_ALL'), "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|", $$('CC_ALL'), "*?[^\\\\])\\])"], 'm'));
|
|
26621
26634
|
$const_set($nesting[0], 'InlineXrefMacroRx', $regexp(["\\\\?(?:<<([", $$('CC_WORD'), "#/.:{]", $$('CC_ALL'), "*?)>>|xref:([", $$('CC_WORD'), "#/.:{]", $$('CC_ALL'), "*?)\\[(?:\\]|(", $$('CC_ALL'), "*?[^\\\\])\\]))"], 'm'));
|
|
26622
26635
|
$const_set($nesting[0], 'HardLineBreakRx', $regexp(["^(", $$('CC_ANY'), "*) \\+$"], 'm'));
|
|
@@ -26637,7 +26650,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
26637
26650
|
"use strict";
|
|
26638
26651
|
var $module = Opal.module, $const_set = Opal.const_set, $hash2 = Opal.hash2, $hash = Opal.hash, $rb_plus = Opal.rb_plus, $regexp = Opal.regexp, $not = Opal.not, $truthy = Opal.truthy, $send = Opal.send, $def = Opal.def, $alias = Opal.alias, $gvars = Opal.gvars, $eqeq = Opal.eqeq, $to_ary = Opal.to_ary, $neqeq = Opal.neqeq, $to_a = Opal.to_a, $eqeqeq = Opal.eqeqeq, $rb_gt = Opal.rb_gt, $slice = Opal.slice, $rb_minus = Opal.rb_minus, $rb_lt = Opal.rb_lt, $rb_times = Opal.rb_times, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$;
|
|
26639
26652
|
|
|
26640
|
-
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,inline_macros?,extensions,inline_macros,regexp,instance,slice,length,names,config,merge,[]=,normalize_text,parse_attributes,process_method,expand_subs,text=,text,convert,class,strip,index,min,compact,>,end_with?,map,chop,new,pop,rstrip,register,tr,basename,parse,lstrip,split_simple_csv,-,partition,extract_attributes_from_text,sub,encode_uri_component,style,extname?,rindex,catalog,info?,fetch,outfilesuffix,natural_xrefs,resolve_id,find,footnotes,id,<,size,<<,attr?,attr,to_s,read_next_id,callouts,highlight?,syntax_highlighter,sub_source,extract_callouts,name,to_i,to_sym,resolve_lines_to_highlight,highlight,nil_or_empty?,restore_callouts,count,to_a,|,sort,*,parse_quoted_text_attributes,resolve_pass_subs,
|
|
26653
|
+
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,inline_macros?,extensions,inline_macros,regexp,instance,slice,length,names,config,merge,[]=,normalize_text,parse_attributes,process_method,expand_subs,text=,text,convert,class,strip,index,min,compact,>,end_with?,map,chop,new,pop,rstrip,register,tr,basename,parse,lstrip,split_simple_csv,-,partition,extract_attributes_from_text,sub,encode_uri_component,style,extname?,rindex,catalog,info?,fetch,outfilesuffix,natural_xrefs,resolve_id,find,footnotes,id,<,size,<<,attr?,attr,to_s,read_next_id,callouts,highlight?,syntax_highlighter,sub_source,extract_callouts,name,to_i,to_sym,resolve_lines_to_highlight,highlight,nil_or_empty?,restore_callouts,count,to_a,|,sort,*,parse_quoted_text_attributes,resolve_pass_subs,basebackend?,error,chr,drop,&,resolve_subs,resolve_block_subs,parse_into,private,shorthand_property_syntax,each_char');
|
|
26641
26654
|
return (function($base, $parent_nesting) {
|
|
26642
26655
|
var self = $module($base, 'Asciidoctor');
|
|
26643
26656
|
|
|
@@ -27197,11 +27210,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
27197
27210
|
}}, {$$s: self})
|
|
27198
27211
|
};
|
|
27199
27212
|
if (($truthy(found_colon) && ($truthy(text['$include?']("://"))))) {
|
|
27200
|
-
text = $send(text, 'gsub', [$$('InlineLinkRx')], function $$25(){var $a, $b, self = $$25.$$s == null ? this : $$25.$$s, target = nil, prefix = nil, suffix = nil, link_text = nil, attrs = nil, link_opts = nil, new_link_text = nil, bare = nil;
|
|
27213
|
+
text = $send(text, 'gsub', [$$('InlineLinkRx')], function $$25(){var $a, $b, self = $$25.$$s == null ? this : $$25.$$s, target = nil, rs_idx = nil, prefix = nil, suffix = nil, link_text = nil, attrs = nil, link_opts = nil, new_link_text = nil, bare = nil;
|
|
27201
27214
|
|
|
27202
27215
|
|
|
27203
|
-
if ($truthy((target = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))['$start_with?']($$('RS')))) {
|
|
27204
|
-
return
|
|
27216
|
+
if ($truthy((target = $rb_plus((($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), ($truthy(($ret_or_1 = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)))) ? ($ret_or_1) : ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))))))['$start_with?']($$('RS')))) {
|
|
27217
|
+
return $rb_plus((($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$slice(0, (rs_idx = (($a = $gvars['~']) === nil ? nil : $a['$[]'](1)).$length())), (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$slice($rb_plus(rs_idx, 1), (($a = $gvars['~']) === nil ? nil : $a['$[]'](0)).$length()))
|
|
27205
27218
|
};
|
|
27206
27219
|
$a = [(($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), ""], (prefix = $a[0]), (suffix = $a[1]), $a;
|
|
27207
27220
|
if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](4)))) {
|
|
@@ -27224,21 +27237,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
27224
27237
|
nil
|
|
27225
27238
|
};
|
|
27226
27239
|
|
|
27227
|
-
switch ((($a = $gvars['~']) === nil ? nil : $a['$[]'](
|
|
27228
|
-
case ")":
|
|
27229
|
-
case "?":
|
|
27230
|
-
case "!":
|
|
27231
|
-
|
|
27232
|
-
target = target.$chop();
|
|
27233
|
-
if (($eqeq((suffix = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3))), ")") && ($truthy(target['$end_with?'](".", "?", "!"))))) {
|
|
27234
|
-
|
|
27235
|
-
suffix = $rb_plus(target['$[]'](-1), suffix);
|
|
27236
|
-
target = target.$chop();
|
|
27237
|
-
};
|
|
27238
|
-
if ($truthy(target['$end_with?']("://"))) {
|
|
27239
|
-
return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))
|
|
27240
|
-
};
|
|
27241
|
-
break;
|
|
27240
|
+
switch ((($a = $gvars['~']) === nil ? nil : $a['$[]'](6))) {
|
|
27242
27241
|
case ";":
|
|
27243
27242
|
|
|
27244
27243
|
if (($truthy(prefix['$start_with?']("<")) && ($truthy(target['$end_with?'](">"))))) {
|
|
@@ -27461,7 +27460,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
27461
27460
|
};
|
|
27462
27461
|
if ($truthy(doc.$compat_mode())) {
|
|
27463
27462
|
fragment = refid
|
|
27464
|
-
} else if ($truthy((hash_idx = refid.$index("#")))) {
|
|
27463
|
+
} else if (($truthy((hash_idx = refid.$index("#"))) && ($neqeq(refid['$[]']($rb_minus(hash_idx, 1)), "&")))) {
|
|
27465
27464
|
if ($truthy($rb_gt(hash_idx, 0))) {
|
|
27466
27465
|
|
|
27467
27466
|
if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
|
|
@@ -27749,14 +27748,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
27749
27748
|
return "" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + "[" + (attrlist) + "]" + ($rb_times($$('RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))) + (boundary)
|
|
27750
27749
|
} else if ($eqeq((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), $$('RS'))) {
|
|
27751
27750
|
preceding = "[" + (attrlist) + "]"
|
|
27752
|
-
} else {
|
|
27753
|
-
|
|
27754
|
-
if (($eqeq(boundary, "++") && ($truthy(attrlist['$end_with?']("x-"))))) {
|
|
27751
|
+
} else if ($eqeq(boundary, "++")) {
|
|
27752
|
+
if ($eqeq(attrlist, "x-")) {
|
|
27755
27753
|
|
|
27756
27754
|
old_behavior = true;
|
|
27757
|
-
|
|
27758
|
-
}
|
|
27759
|
-
|
|
27755
|
+
attributes = $hash2([], {});
|
|
27756
|
+
} else if ($truthy(attrlist['$end_with?'](" x-"))) {
|
|
27757
|
+
|
|
27758
|
+
old_behavior = true;
|
|
27759
|
+
attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
|
|
27760
|
+
} else {
|
|
27761
|
+
attributes = self.$parse_quoted_text_attributes(attrlist)
|
|
27762
|
+
}
|
|
27763
|
+
} else {
|
|
27764
|
+
attributes = self.$parse_quoted_text_attributes(attrlist)
|
|
27760
27765
|
}
|
|
27761
27766
|
} else if ($truthy($rb_gt((escape_count = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)).$length()), 0))) {
|
|
27762
27767
|
return "" + ($rb_times($$('RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))) + (boundary)
|
|
@@ -27786,35 +27791,40 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
27786
27791
|
};
|
|
27787
27792
|
$b = $$('InlinePassRx')['$[]'](compat_mode), $a = $to_ary($b), (pass_inline_char1 = ($a[0] == null ? nil : $a[0])), (pass_inline_char2 = ($a[1] == null ? nil : $a[1])), (pass_inline_rx = ($a[2] == null ? nil : $a[2])), $b;
|
|
27788
27793
|
if (($truthy(text['$include?'](pass_inline_char1)) || (($truthy(pass_inline_char2) && ($truthy(text['$include?'](pass_inline_char2))))))) {
|
|
27789
|
-
text = $send(text, 'gsub', [pass_inline_rx], function $$39(){var $c, self = $$39.$$s == null ? this : $$39.$$s, preceding = nil, attrlist = nil,
|
|
27794
|
+
text = $send(text, 'gsub', [pass_inline_rx], function $$39(){var $c, self = $$39.$$s == null ? this : $$39.$$s, preceding = nil, attrlist = nil, $ret_or_1 = nil, escaped = nil, quoted_text = nil, format_mark = nil, content = nil, old_behavior = nil, old_behavior_forced = nil, attributes = nil, passthru_key = nil, subs = nil;
|
|
27790
27795
|
|
|
27791
27796
|
|
|
27792
27797
|
preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
|
|
27793
|
-
attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](
|
|
27794
|
-
if ($truthy((
|
|
27795
|
-
|
|
27798
|
+
attrlist = ($truthy(($ret_or_1 = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) ? ($ret_or_1) : ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))));
|
|
27799
|
+
if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
|
|
27800
|
+
escaped = true
|
|
27796
27801
|
};
|
|
27797
|
-
|
|
27798
|
-
|
|
27802
|
+
quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
|
|
27803
|
+
format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
|
|
27804
|
+
content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
|
|
27799
27805
|
if ($truthy(compat_mode)) {
|
|
27800
27806
|
old_behavior = true
|
|
27801
|
-
} else if ($truthy(
|
|
27802
|
-
|
|
27807
|
+
} else if (($truthy(attrlist) && (($eqeq(attrlist, "x-") || ($truthy(attrlist['$end_with?'](" x-"))))))) {
|
|
27808
|
+
old_behavior = (old_behavior_forced = true)
|
|
27803
27809
|
};
|
|
27804
27810
|
if ($truthy(attrlist)) {
|
|
27805
|
-
if (
|
|
27806
|
-
return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark))
|
|
27807
|
-
} else if ($truthy(escape_mark)) {
|
|
27811
|
+
if ($truthy(escaped)) {
|
|
27808
27812
|
return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()))
|
|
27809
27813
|
} else if ($eqeq(preceding, $$('RS'))) {
|
|
27810
|
-
|
|
27814
|
+
|
|
27815
|
+
if (($truthy(old_behavior_forced) && ($eqeq(format_mark, "`")))) {
|
|
27816
|
+
return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text)
|
|
27817
|
+
};
|
|
27818
|
+
preceding = "[" + (attrlist) + "]";
|
|
27819
|
+
} else if ($truthy(old_behavior_forced)) {
|
|
27820
|
+
attributes = ($eqeq(attrlist, "x-") ? ($hash2([], {})) : (self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)))))
|
|
27811
27821
|
} else {
|
|
27812
27822
|
attributes = self.$parse_quoted_text_attributes(attrlist)
|
|
27813
27823
|
}
|
|
27814
|
-
} else if (
|
|
27815
|
-
return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark))
|
|
27816
|
-
} else if ($truthy(escape_mark)) {
|
|
27824
|
+
} else if ($truthy(escaped)) {
|
|
27817
27825
|
return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()))
|
|
27826
|
+
} else if (($truthy(compat_mode) && ($eqeq(preceding, $$('RS'))))) {
|
|
27827
|
+
return quoted_text
|
|
27818
27828
|
};
|
|
27819
27829
|
if ($truthy(compat_mode)) {
|
|
27820
27830
|
passthrus['$[]=']((passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$('BASIC_SUBS'), "attributes": attributes, "type": "monospaced"}))
|
|
@@ -28166,23 +28176,6 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
|
|
|
28166
28176
|
};}, {$$s: self}).$join($$('LF')));
|
|
28167
28177
|
}, -3);
|
|
28168
28178
|
|
|
28169
|
-
$def(self, '$extract_inner_passthrough', function $$extract_inner_passthrough(text, pre) {
|
|
28170
|
-
var $a, self = this, passthru_key = nil;
|
|
28171
|
-
if (self.passthroughs == null) self.passthroughs = nil;
|
|
28172
|
-
|
|
28173
|
-
if ((($truthy(text['$end_with?']("+")) && ($truthy(text['$start_with?']("+", "\\+")))) && ($truthy($$('SinglePlusInlinePassRx')['$=~'](text))))) {
|
|
28174
|
-
if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) {
|
|
28175
|
-
return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`"
|
|
28176
|
-
} else {
|
|
28177
|
-
|
|
28178
|
-
self.passthroughs['$[]=']((passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$('BASIC_SUBS')}));
|
|
28179
|
-
return "" + (pre) + "`" + ($$('PASS_START')) + (passthru_key) + ($$('PASS_END')) + "`";
|
|
28180
|
-
}
|
|
28181
|
-
} else {
|
|
28182
|
-
return "" + (pre) + "`" + (text) + "`"
|
|
28183
|
-
}
|
|
28184
|
-
});
|
|
28185
|
-
|
|
28186
28179
|
$def(self, '$convert_quoted_text', function $$convert_quoted_text(match, type, scope) {
|
|
28187
28180
|
var self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
|
|
28188
28181
|
|
|
@@ -28346,7 +28339,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
28346
28339
|
|
|
28347
28340
|
var $nesting = [self].concat($parent_nesting);
|
|
28348
28341
|
|
|
28349
|
-
return $const_set($nesting[0], 'VERSION', "2.0.
|
|
28342
|
+
return $const_set($nesting[0], 'VERSION', "2.0.20")
|
|
28350
28343
|
})($nesting[0], $nesting)
|
|
28351
28344
|
};
|
|
28352
28345
|
|
|
@@ -29661,7 +29654,11 @@ Opal.modules["asciidoctor/block"] = function(Opal) {/* Generated by Opal 1.7.3 *
|
|
|
29661
29654
|
|
|
29662
29655
|
result = self.$apply_subs(self.lines, self.subs);
|
|
29663
29656
|
if ($truthy($rb_lt(result.$size(), 2))) {
|
|
29664
|
-
|
|
29657
|
+
if ($truthy(($ret_or_2 = result['$[]'](0)))) {
|
|
29658
|
+
return $ret_or_2
|
|
29659
|
+
} else {
|
|
29660
|
+
return ""
|
|
29661
|
+
}
|
|
29665
29662
|
} else {
|
|
29666
29663
|
|
|
29667
29664
|
while ($truthy(($truthy(($ret_or_2 = (first = result['$[]'](0)))) ? (first.$rstrip()['$empty?']()) : ($ret_or_2)))) {
|
|
@@ -31955,7 +31952,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
31955
31952
|
"use strict";
|
|
31956
31953
|
var $module = Opal.module, $klass = Opal.klass, $const_set = Opal.const_set, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $to_ary = Opal.to_ary, $defs = Opal.defs, $eqeq = Opal.eqeq, $not = Opal.not, $gvars = Opal.gvars, $neqeq = Opal.neqeq, $rb_plus = Opal.rb_plus, $rb_lt = Opal.rb_lt, $rb_gt = Opal.rb_gt, $to_a = Opal.to_a, $eqeqeq = Opal.eqeqeq, $rb_minus = Opal.rb_minus, $rb_times = Opal.rb_times, $thrower = Opal.thrower, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$;
|
|
31957
31954
|
|
|
31958
|
-
Opal.add_stubs('include,new,proc,start_with?,match?,is_delimited_block?,private_class_method,parse_document_header,[],has_more_lines?,next_section,assign_numeral,<<,blocks,skip_blank_lines,parse_block_metadata_lines,attributes,is_next_line_doctitle?,[]=,finalize_header,nil_or_empty?,title=,sourcemap,cursor,parse_section_title,id=,include?,sub_specialchars,sub_attributes,source_location=,header,attribute_locked?,id,clear,delete,instance_variable_get,parse_header_metadata,==,!,register,process_authors,update,doctype,parse_manpage_header,=~,downcase,error,logger,message_with_context,cursor_at_line,backend,save,is_next_line_section?,initialize_section,join,map,read_lines_until,lstrip,split,title,restore_save,discard_save,header?,empty?,context,!=,attr?,attr,key?,document,+,level,special,sectname,to_i,<,>,warn,next_block,blocks?,style,
|
|
31955
|
+
Opal.add_stubs('include,new,proc,start_with?,match?,is_delimited_block?,private_class_method,parse_document_header,[],has_more_lines?,next_section,assign_numeral,<<,blocks,skip_blank_lines,parse_block_metadata_lines,attributes,is_next_line_doctitle?,[]=,finalize_header,nil_or_empty?,title=,sourcemap,cursor,parse_section_title,id=,include?,sub_specialchars,sub_attributes,source_location=,header,attribute_locked?,id,clear,delete,instance_variable_get,parse_header_metadata,==,!,register,process_authors,update,doctype,parse_manpage_header,=~,downcase,error,logger,message_with_context,cursor_at_line,backend,save,is_next_line_section?,initialize_section,join,map,read_lines_until,lstrip,split,title,restore_save,discard_save,header?,empty?,context,!=,attr?,attr,key?,document,+,level,special,sectname,to_i,<,>,warn,next_block,blocks?,style,style=,parent=,content_model,content_model=,lines,subs,size,context=,shift,unwrap_standalone_preamble,source_location,merge,fetch,parse_block_metadata_line,extensions,block_macros?,mark,read_line,terminator,to_s,masq,to_sym,registered_for_block?,debug?,debug,cursor_at_mark,strict_verbatim_paragraphs,unshift_line,markdown_syntax,keys,chr,uniform?,length,end_with?,parse_attributes,attribute_missing,tr,basename,assign_caption,registered_for_block_macro?,config,process_method,replace,parse_callout_list,callouts,===,parse_list,parse_description_list,underline_style_section_titles,is_section_title?,peek_line,atx_section_title?,generate_id,level=,read_paragraph_lines,adjust_indentation!,map!,slice,pop,build_block,apply_subs,chop,catalog_inline_anchors,rekey,index,strip,-,parse_table,each,raise,title?,update_attributes,commit_subs,sub?,catalog_callouts,source,remove_sub,block_terminates_paragraph,to_proc,nil?,parse_blocks,parse_list_item,items,scan,gsub,count,advance,dup,match,callout_ids,next_list,catalog_inline_anchor,marker=,catalog_inline_biblio_anchor,set_option,text=,resolve_ordered_list_marker,read_lines_for_list_item,skip_line_comments,unshift_lines,fold_first,text?,is_sibling_list_item?,concat,find,casecmp,sectname=,special=,numbered=,numbered,lineno,peek_lines,setext_section_title?,abs,cursor_at_prev_line,process_attribute_entries,next_line_empty?,apply_header_subs,rstrip,each_with_index,compact,to_h,squeeze,to_a,parse_style_attribute,process_attribute_entry,skip_comment_lines,store_attribute,sanitize_attribute_name,set_attribute,save_to,delete_attribute,ord,int_to_roman,resolve_list_marker,parse_colspecs,create_columns,has_header_option=,format,starts_with_delimiter?,close_open_cell,parse_cellspec,delimiter,match_delimiter,pre_match,post_match,buffer_has_unclosed_quotes?,skip_past_delimiter,buffer=,buffer,skip_past_escaped_delimiter,keep_cell_open,push_cellspec,close_cell,cell_open?,columns,assign_column_widths,partition_header_footer,upto,partition,shorthand_property_syntax,each_char,yield_buffered_attribute,any?,*,each_byte,%');
|
|
31959
31956
|
return (function($base, $parent_nesting) {
|
|
31960
31957
|
var self = $module($base, 'Asciidoctor');
|
|
31961
31958
|
|
|
@@ -32291,16 +32288,20 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
32291
32288
|
if ($truthy(part)) {
|
|
32292
32289
|
if ($not(section['$blocks?']())) {
|
|
32293
32290
|
if ($neqeq(new_block.$style(), "partintro")) {
|
|
32294
|
-
if ($eqeq(new_block.$context(), "
|
|
32295
|
-
|
|
32296
|
-
new_block['$context=']("open");
|
|
32297
|
-
new_block['$style=']("partintro");
|
|
32291
|
+
if (($eqeq(new_block.$style(), "open") && ($eqeq(new_block.$context(), "open")))) {
|
|
32292
|
+
new_block['$style=']("partintro")
|
|
32298
32293
|
} else {
|
|
32299
32294
|
|
|
32300
32295
|
new_block['$parent=']((intro = $$('Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"}))));
|
|
32301
32296
|
intro['$style=']("partintro");
|
|
32302
32297
|
section.$blocks()['$<<'](intro);
|
|
32303
32298
|
}
|
|
32299
|
+
} else if ($eqeq(new_block.$content_model(), "simple")) {
|
|
32300
|
+
|
|
32301
|
+
new_block['$content_model=']("compound");
|
|
32302
|
+
new_block['$<<']($$('Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
|
|
32303
|
+
new_block.$lines().$clear();
|
|
32304
|
+
new_block.$subs().$clear();
|
|
32304
32305
|
}
|
|
32305
32306
|
} else if ($eqeq(section.$blocks().$size(), 1)) {
|
|
32306
32307
|
|
|
@@ -32310,13 +32311,12 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
32310
32311
|
} else if ($neqeq(first_block.$content_model(), "compound")) {
|
|
32311
32312
|
|
|
32312
32313
|
new_block['$parent=']((intro = $$('Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"}))));
|
|
32313
|
-
|
|
32314
|
-
section.$blocks().$shift();
|
|
32315
|
-
if ($eqeq(first_block.$style(), "partintro")) {
|
|
32314
|
+
if ($eqeq(first_block.$style(), ($a = ["partintro"], $send(intro, 'style=', $a), $a[$a.length - 1]))) {
|
|
32316
32315
|
|
|
32317
32316
|
first_block['$context=']("paragraph");
|
|
32318
32317
|
first_block['$style='](nil);
|
|
32319
32318
|
};
|
|
32319
|
+
section.$blocks().$shift();
|
|
32320
32320
|
intro['$<<'](first_block);
|
|
32321
32321
|
section.$blocks()['$<<'](intro);
|
|
32322
32322
|
};
|
|
@@ -33132,8 +33132,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
33132
33132
|
if ($truthy(reftext['$include?']($$('ATTR_REF_HEAD')))) {
|
|
33133
33133
|
reftext = document.$sub_attributes(reftext)
|
|
33134
33134
|
};
|
|
33135
|
-
} else if (
|
|
33136
|
-
|
|
33135
|
+
} else if ($truthy(reftext['$include?']($$('ATTR_REF_HEAD')))) {
|
|
33136
|
+
if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
|
|
33137
|
+
reftext = nil
|
|
33138
|
+
}
|
|
33137
33139
|
}
|
|
33138
33140
|
};
|
|
33139
33141
|
};
|
|
@@ -33327,7 +33329,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
33327
33329
|
};
|
|
33328
33330
|
}, -5);
|
|
33329
33331
|
$defs(self, '$read_lines_for_list_item', function $$read_lines_for_list_item(reader, list_type, sibling_trait, has_text) {
|
|
33330
|
-
var $a, self = this, buffer = nil, continuation = nil, within_nested_list = nil, detached_continuation = nil, dlist = nil, this_line = nil, prev_line = nil, match = nil, nested_list_type = nil, $ret_or_1 = nil, last_line = nil;
|
|
33332
|
+
var $a, self = this, buffer = nil, continuation = nil, within_nested_list = nil, detached_continuation = nil, dlist = nil, this_line = nil, prev_line = nil, match = nil, block_attribute_lines = nil, next_line = nil, interrupt = nil, ch0 = nil, nested_list_type = nil, $ret_or_1 = nil, last_line = nil;
|
|
33331
33333
|
|
|
33332
33334
|
|
|
33333
33335
|
if (sibling_trait == null) sibling_trait = nil;
|
|
@@ -33366,16 +33368,36 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
33366
33368
|
};
|
|
33367
33369
|
};
|
|
33368
33370
|
if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
|
|
33369
|
-
|
|
33370
|
-
|
|
33371
|
-
buffer['$<<'](this_line);
|
|
33372
|
-
buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
|
|
33373
|
-
continuation = "inactive";
|
|
33374
|
-
} else {
|
|
33371
|
+
|
|
33372
|
+
if (!$eqeq(continuation, "active")) {
|
|
33375
33373
|
break
|
|
33376
|
-
}
|
|
33377
|
-
|
|
33378
|
-
|
|
33374
|
+
};
|
|
33375
|
+
buffer['$<<'](this_line);
|
|
33376
|
+
buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
|
|
33377
|
+
continuation = "inactive";
|
|
33378
|
+
} else if (((($truthy(dlist) && ($neqeq(continuation, "active"))) && ($truthy(this_line['$start_with?']("[")))) && ($truthy($$('BlockAttributeLineRx')['$match?'](this_line))))) {
|
|
33379
|
+
|
|
33380
|
+
block_attribute_lines = [this_line];
|
|
33381
|
+
while ($truthy((next_line = reader.$peek_line()))) {
|
|
33382
|
+
|
|
33383
|
+
if ($truthy(self['$is_delimited_block?'](next_line))) {
|
|
33384
|
+
interrupt = true
|
|
33385
|
+
} else if (($truthy(next_line['$empty?']()) || (($truthy(next_line['$start_with?']("[")) && ($truthy($$('BlockAttributeLineRx')['$match?'](next_line))))))) {
|
|
33386
|
+
|
|
33387
|
+
block_attribute_lines['$<<'](reader.$read_line());
|
|
33388
|
+
continue;
|
|
33389
|
+
} else if (($truthy($$('AnyListRx')['$match?'](next_line)) && ($not(self['$is_sibling_list_item?'](next_line, list_type, sibling_trait))))) {
|
|
33390
|
+
buffer.$concat(block_attribute_lines)
|
|
33391
|
+
} else {
|
|
33392
|
+
interrupt = true
|
|
33393
|
+
};
|
|
33394
|
+
break;
|
|
33395
|
+
};
|
|
33396
|
+
if ($truthy(interrupt)) {
|
|
33397
|
+
|
|
33398
|
+
reader.$unshift_lines(block_attribute_lines);
|
|
33399
|
+
break;
|
|
33400
|
+
};
|
|
33379
33401
|
} else if (($eqeq(continuation, "active") && ($not(this_line['$empty?']())))) {
|
|
33380
33402
|
if ($truthy($$('LiteralParagraphRx')['$match?'](this_line))) {
|
|
33381
33403
|
|
|
@@ -33390,7 +33412,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
33390
33412
|
buffer.$concat(reader.$read_lines_until($hash2(["preserve_last_line", "break_on_blank_lines", "break_on_list_continuation"], {"preserve_last_line": true, "break_on_blank_lines": true, "break_on_list_continuation": true})))
|
|
33391
33413
|
};
|
|
33392
33414
|
continuation = "inactive";
|
|
33393
|
-
} else if ((($truthy($$('BlockTitleRx')['$match?'](this_line)) || ($truthy($$('BlockAttributeLineRx')['$match?'](this_line)))) || ($truthy($$('AttributeEntryRx')['$match?'](this_line))))) {
|
|
33415
|
+
} else if (((($eqeq((ch0 = this_line.$chr()), ".") && ($truthy($$('BlockTitleRx')['$match?'](this_line)))) || (($eqeq(ch0, "[") && ($truthy($$('BlockAttributeLineRx')['$match?'](this_line)))))) || (($eqeq(ch0, ":") && ($truthy($$('AttributeEntryRx')['$match?'](this_line))))))) {
|
|
33394
33416
|
buffer['$<<'](this_line)
|
|
33395
33417
|
} else {
|
|
33396
33418
|
|
|
@@ -34673,6 +34695,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
34673
34695
|
$const_set($nesting[0], 'SLASH', "/");
|
|
34674
34696
|
$const_set($nesting[0], 'BACKSLASH', "\\");
|
|
34675
34697
|
$const_set($nesting[0], 'DOUBLE_SLASH', "//");
|
|
34698
|
+
$const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
|
|
34676
34699
|
$const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
|
|
34677
34700
|
self.$attr_accessor("file_separator");
|
|
34678
34701
|
self.$attr_accessor("working_dir");
|
|
@@ -34716,21 +34739,33 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
34716
34739
|
return path['$start_with?']("file://", "http://", "https://");
|
|
34717
34740
|
}
|
|
34718
34741
|
})
|
|
34742
|
+
} else if ($eqeq($$$('RUBY_ENGINE'), "jruby")) {
|
|
34743
|
+
|
|
34744
|
+
$def(self, '$root?', function $PathResolver_root$ques$3(path) {
|
|
34745
|
+
var self = this, $ret_or_1 = nil;
|
|
34746
|
+
|
|
34747
|
+
if ($truthy(($ret_or_1 = self['$absolute_path?'](path)))) {
|
|
34748
|
+
return $ret_or_1
|
|
34749
|
+
} else {
|
|
34750
|
+
|
|
34751
|
+
return path['$start_with?']($$('URI_CLASSLOADER'));
|
|
34752
|
+
}
|
|
34753
|
+
})
|
|
34719
34754
|
} else {
|
|
34720
34755
|
$alias(self, "root?", "absolute_path?")
|
|
34721
34756
|
};
|
|
34722
34757
|
|
|
34723
|
-
$def(self, '$unc?', function $PathResolver_unc$ques$
|
|
34758
|
+
$def(self, '$unc?', function $PathResolver_unc$ques$4(path) {
|
|
34724
34759
|
|
|
34725
34760
|
return path['$start_with?']($$('DOUBLE_SLASH'))
|
|
34726
34761
|
});
|
|
34727
34762
|
|
|
34728
|
-
$def(self, '$web_root?', function $PathResolver_web_root$ques$
|
|
34763
|
+
$def(self, '$web_root?', function $PathResolver_web_root$ques$5(path) {
|
|
34729
34764
|
|
|
34730
34765
|
return path['$start_with?']($$('SLASH'))
|
|
34731
34766
|
});
|
|
34732
34767
|
|
|
34733
|
-
$def(self, '$descends_from?', function $PathResolver_descends_from$ques$
|
|
34768
|
+
$def(self, '$descends_from?', function $PathResolver_descends_from$ques$6(path, base) {
|
|
34734
34769
|
var $ret_or_1 = nil;
|
|
34735
34770
|
|
|
34736
34771
|
if ($eqeq(base, path)) {
|
|
@@ -34796,7 +34831,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
34796
34831
|
if ($truthy(path['$include?']($$('DOT_DOT')))) {
|
|
34797
34832
|
|
|
34798
34833
|
resolved_segments = [];
|
|
34799
|
-
$send(path_segments, 'each', [], function $$
|
|
34834
|
+
$send(path_segments, 'each', [], function $$7(segment){
|
|
34800
34835
|
|
|
34801
34836
|
if (segment == null) segment = nil;
|
|
34802
34837
|
if ($eqeq(segment, $$('DOT_DOT'))) {
|
|
@@ -34830,6 +34865,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
34830
34865
|
root = $$('DOUBLE_SLASH')
|
|
34831
34866
|
} else if ($truthy(posix_path['$start_with?']($$('SLASH')))) {
|
|
34832
34867
|
root = $$('SLASH')
|
|
34868
|
+
} else if ($truthy(posix_path['$start_with?']($$('URI_CLASSLOADER')))) {
|
|
34869
|
+
root = posix_path.$slice(0, $$('URI_CLASSLOADER').$length())
|
|
34833
34870
|
} else {
|
|
34834
34871
|
root = posix_path.$slice(0, $rb_plus(posix_path.$index($$('SLASH')), 1))
|
|
34835
34872
|
}
|
|
@@ -34938,7 +34975,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
34938
34975
|
$b = self.$partition_path(jail), $a = $to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
|
|
34939
34976
|
};
|
|
34940
34977
|
warned = false;
|
|
34941
|
-
$send(unresolved_segments, 'each', [], function $$
|
|
34978
|
+
$send(unresolved_segments, 'each', [], function $$8(segment){var self = $$8.$$s == null ? this : $$8.$$s;
|
|
34942
34979
|
|
|
34943
34980
|
|
|
34944
34981
|
if (segment == null) segment = nil;
|
|
@@ -34960,7 +34997,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
34960
34997
|
return resolved_segments['$<<'](segment)
|
|
34961
34998
|
};}, {$$s: self});
|
|
34962
34999
|
} else {
|
|
34963
|
-
$send(unresolved_segments, 'each', [], function $$
|
|
35000
|
+
$send(unresolved_segments, 'each', [], function $$9(segment){
|
|
34964
35001
|
|
|
34965
35002
|
if (segment == null) segment = nil;
|
|
34966
35003
|
if ($eqeq(segment, $$('DOT_DOT'))) {
|
|
@@ -35002,7 +35039,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
|
|
|
35002
35039
|
};
|
|
35003
35040
|
$b = self.$partition_path(target, true), $a = $to_ary($b), (target_segments = ($a[0] == null ? nil : $a[0])), (target_root = ($a[1] == null ? nil : $a[1])), $b;
|
|
35004
35041
|
resolved_segments = [];
|
|
35005
|
-
$send(target_segments, 'each', [], function $$
|
|
35042
|
+
$send(target_segments, 'each', [], function $$10(segment){
|
|
35006
35043
|
|
|
35007
35044
|
if (segment == null) segment = nil;
|
|
35008
35045
|
if ($eqeq(segment, $$('DOT_DOT'))) {
|
|
@@ -35047,7 +35084,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
35047
35084
|
"use strict";
|
|
35048
35085
|
var $module = Opal.module, $klass = Opal.klass, $def = Opal.def, $rb_plus = Opal.rb_plus, $alias = Opal.alias, $hash2 = Opal.hash2, $not = Opal.not, $eqeqeq = Opal.eqeqeq, $to_ary = Opal.to_ary, $truthy = Opal.truthy, $rb_gt = Opal.rb_gt, $send = Opal.send, $rb_minus = Opal.rb_minus, $thrower = Opal.thrower, $eqeq = Opal.eqeq, $rb_times = Opal.rb_times, $neqeq = Opal.neqeq, $to_a = Opal.to_a, $assign_ivar_val = Opal.assign_ivar_val, $send2 = Opal.send2, $find_super = Opal.find_super, $rb_ge = Opal.rb_ge, $gvars = Opal.gvars, $rb_lt = Opal.rb_lt, $hash = Opal.hash, $nesting = [], nil = Opal.nil, $$$ = Opal.$$$;
|
|
35049
35086
|
|
|
35050
|
-
Opal.add_stubs('include,attr_reader,+,line_info,attr_accessor,!,===,split,file,dir,dirname,path,basename,lineno,reverse,prepare_lines,empty?,nil_or_empty?,peek_line
|
|
35087
|
+
Opal.add_stubs('include,attr_reader,+,line_info,attr_accessor,!,===,split,file,dir,dirname,path,basename,lineno,reverse,prepare_lines,empty?,nil_or_empty?,peek_line,[],>,slice,length,process_line,times,shift,read_line,<<,-,unshift_all,has_more_lines?,read_lines,join,unshift,unshift_line,unshift_lines,replace_next_line,start_with?,==,*,read_lines_until,size,clear,cursor,[]=,fetch,!=,cursor_at_mark,warn,logger,message_with_context,pop,push,respond_to?,reverse_each,new,tap,each,instance_variables,instance_variable_get,drop,instance_variable_set,class,object_id,inspect,private,prepare_source_array,prepare_source_string,chomp,valid_encoding?,to_s,raise,to_i,attributes,catalog,pop_include,parse,path=,dup,end_with?,keys,rindex,rootname,key?,attr,reverse!,>=,exceeds_max_depth?,nil?,include_processors?,extensions,extensions?,include_processors,map,skip_front_matter!,adjust_indentation!,include?,=~,preprocess_conditional_directive,preprocess_include_directive,downcase,error,none?,any?,all?,strip,send,resolve_expr_val,rstrip,sub_attributes,attribute_missing,info,parse_attributes,find,handles?,instance,process_method,safe,resolve_include_path,method,split_delimited_value,partition,<,to_a,uniq,sort,call,each_line,infinite?,push_include,delete,first,values,value?,create_include_cursor,delete_at,keep_if,read,uriish?,attr?,require_library,normalize_system_path,file?,relative_path,path_resolver,base_dir,to_f');
|
|
35051
35088
|
return (function($base, $parent_nesting) {
|
|
35052
35089
|
var self = $module($base, 'Asciidoctor');
|
|
35053
35090
|
|
|
@@ -35174,25 +35211,24 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
35174
35211
|
});
|
|
35175
35212
|
|
|
35176
35213
|
$def(self, '$peek_line', function $$peek_line(direct) {
|
|
35177
|
-
var self = this,
|
|
35214
|
+
var self = this, next_line = nil, line = nil;
|
|
35178
35215
|
|
|
35179
35216
|
|
|
35180
35217
|
if (direct == null) direct = false;
|
|
35181
|
-
|
|
35182
|
-
|
|
35183
|
-
|
|
35184
|
-
|
|
35218
|
+
while ($truthy(true)) {
|
|
35219
|
+
|
|
35220
|
+
next_line = self.lines['$[]'](-1);
|
|
35221
|
+
if (($truthy(direct) || ($truthy($rb_gt(self.look_ahead, 0))))) {
|
|
35222
|
+
return ($truthy(self.unescape_next_line) ? (next_line.$slice(1, next_line.$length())) : (next_line))
|
|
35223
|
+
} else if ($truthy(next_line)) {
|
|
35224
|
+
if ($truthy((line = self.$process_line(next_line)))) {
|
|
35225
|
+
return line
|
|
35226
|
+
}
|
|
35185
35227
|
} else {
|
|
35186
|
-
|
|
35187
|
-
|
|
35188
|
-
|
|
35189
|
-
|
|
35190
|
-
self.look_ahead = 0;
|
|
35191
|
-
return nil;
|
|
35192
|
-
} else if ($truthy(($ret_or_1 = self.$process_line(self.lines['$[]'](-1))))) {
|
|
35193
|
-
return $ret_or_1
|
|
35194
|
-
} else {
|
|
35195
|
-
return self.$peek_line()
|
|
35228
|
+
|
|
35229
|
+
self.look_ahead = 0;
|
|
35230
|
+
return nil;
|
|
35231
|
+
};
|
|
35196
35232
|
};
|
|
35197
35233
|
}, -1);
|
|
35198
35234
|
|
|
@@ -36350,6 +36386,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
36350
36386
|
};
|
|
36351
36387
|
} else {
|
|
36352
36388
|
|
|
36389
|
+
inc_content = nil;
|
|
36390
|
+
|
|
36353
36391
|
try {
|
|
36354
36392
|
|
|
36355
36393
|
inc_content = $send(reader, 'call', [inc_path, read_mode], function $$30(f){
|
|
@@ -36357,7 +36395,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
36357
36395
|
if (f == null) f = nil;
|
|
36358
36396
|
return f.$read();});
|
|
36359
36397
|
self.$shift();
|
|
36360
|
-
self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
|
|
36361
36398
|
} catch ($err) {
|
|
36362
36399
|
if (Opal.rescue($err, [$$('StandardError')])) {
|
|
36363
36400
|
try {
|
|
@@ -36366,7 +36403,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
|
|
|
36366
36403
|
return self.$replace_next_line("Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
|
|
36367
36404
|
} finally { Opal.pop_exception(); }
|
|
36368
36405
|
} else { throw $err; }
|
|
36369
|
-
}
|
|
36406
|
+
};;
|
|
36407
|
+
self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
|
|
36370
36408
|
};
|
|
36371
36409
|
return true;
|
|
36372
36410
|
} else {
|
|
@@ -39110,7 +39148,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {/* Generated by Op
|
|
|
39110
39148
|
};
|
|
39111
39149
|
id_attribute = ($truthy(node.$id()) ? (" id=\"" + (node.$id()) + "\"") : (""));
|
|
39112
39150
|
title_element = ($truthy(node['$title?']()) ? ("<div class=\"title\">" + (node.$captioned_title()) + "</div>\n") : (""));
|
|
39113
|
-
return "<div" + (id_attribute) + " class=\"listingblock" + (($truthy((role = node.$role())) ? (" " + (role)) : (""))) + "\">\n" + (title_element) + "<div class=\"content\">\n" + (($truthy(syntax_hl) ? (syntax_hl.$format(node, lang, opts)) : ($rb_plus($rb_plus(pre_open,
|
|
39151
|
+
return "<div" + (id_attribute) + " class=\"listingblock" + (($truthy((role = node.$role())) ? (" " + (role)) : (""))) + "\">\n" + (title_element) + "<div class=\"content\">\n" + (($truthy(syntax_hl) ? (syntax_hl.$format(node, lang, opts)) : ($rb_plus($rb_plus(pre_open, node.$content()), pre_close)))) + "\n" + "</div>\n" + "</div>";
|
|
39114
39152
|
});
|
|
39115
39153
|
|
|
39116
39154
|
$def(self, '$convert_literal', function $$convert_literal(node) {
|
|
@@ -42371,7 +42409,7 @@ AbstractBlock.prototype.setStyle = function (style) {
|
|
|
42371
42409
|
/**
|
|
42372
42410
|
* Get the location in the AsciiDoc source where this block begins.
|
|
42373
42411
|
*
|
|
42374
|
-
* @returns {
|
|
42412
|
+
* @returns {Cursor} - the location in the AsciiDoc source where this block begins
|
|
42375
42413
|
* @memberof AbstractBlock
|
|
42376
42414
|
*/
|
|
42377
42415
|
AbstractBlock.prototype.getSourceLocation = function () {
|
|
@@ -47349,7 +47387,7 @@ Extensions.newBlockMacroProcessor = function (name, functions) {
|
|
|
47349
47387
|
}
|
|
47350
47388
|
|
|
47351
47389
|
|
|
47352
|
-
var ASCIIDOCTOR_JS_VERSION = '3.0.
|
|
47390
|
+
var ASCIIDOCTOR_JS_VERSION = '3.0.1';
|
|
47353
47391
|
|
|
47354
47392
|
/**
|
|
47355
47393
|
* Get Asciidoctor.js version number.
|