@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.
@@ -1386,7 +1386,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
1386
1386
  "use strict";
1387
1387
  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.$$$;
1388
1388
 
1389
- Opal.add_stubs('module_function,require,include?,include,==,path,message,raise,warn,logger,chomp,empty?,slice,unpack,[],[]=,byteslice,bytesize,map,rstrip,encode,encoding,nil_or_empty?,!=,tap,each_line,<<,match?,gsub,rindex,index,basename,extname,!,length,directory?,dirname,mkdir_p,mkdir,private_constant,join,divmod,*,===,+,to_s,to_i,succ,class_for_name,const_get');
1389
+ 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');
1390
1390
  return (function($base, $parent_nesting) {
1391
1391
  var self = $module($base, 'Asciidoctor');
1392
1392
 
@@ -1548,17 +1548,31 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
1548
1548
  return lines['$<<'](line.$chomp());});})
1549
1549
  };
1550
1550
  }, -2);
1551
-
1552
- $def(self, '$uriish?', function $Helpers_uriish$ques$13(str) {
1553
- var $ret_or_1 = nil;
1551
+ if ($eqeq($$$('RUBY_ENGINE'), "jruby")) {
1552
+
1553
+ $def(self, '$uriish?', function $Helpers_uriish$ques$13(str) {
1554
+ var $ret_or_1 = nil, $ret_or_2 = nil;
1554
1555
 
1555
- if ($truthy(($ret_or_1 = str['$include?'](":")))) {
1556
-
1557
- return $$('UriSniffRx')['$match?'](str);
1558
- } else {
1559
- return $ret_or_1
1560
- }
1561
- });
1556
+ if ($truthy(($ret_or_1 = ($truthy(($ret_or_2 = str['$include?'](":"))) ? (str['$start_with?']("uri:classloader:")['$!']()) : ($ret_or_2))))) {
1557
+
1558
+ return $$('UriSniffRx')['$match?'](str);
1559
+ } else {
1560
+ return $ret_or_1
1561
+ }
1562
+ })
1563
+ } else {
1564
+
1565
+ $def(self, '$uriish?', function $Helpers_uriish$ques$14(str) {
1566
+ var $ret_or_1 = nil;
1567
+
1568
+ if ($truthy(($ret_or_1 = str['$include?'](":")))) {
1569
+
1570
+ return $$('UriSniffRx')['$match?'](str);
1571
+ } else {
1572
+ return $ret_or_1
1573
+ }
1574
+ })
1575
+ };
1562
1576
 
1563
1577
  $def(self, '$encode_uri_component', function $$encode_uri_component(str) {
1564
1578
 
@@ -1606,7 +1620,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
1606
1620
  };
1607
1621
  }, -2);
1608
1622
 
1609
- $def(self, '$extname?', function $Helpers_extname$ques$14(path) {
1623
+ $def(self, '$extname?', function $Helpers_extname$ques$15(path) {
1610
1624
  var $ret_or_1 = nil, last_dot_idx = nil;
1611
1625
 
1612
1626
  if ($truthy(($ret_or_1 = (last_dot_idx = path.$rindex("."))))) {
@@ -1684,7 +1698,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
1684
1698
 
1685
1699
  $def(self, '$int_to_roman', function $$int_to_roman(val) {
1686
1700
 
1687
- return $send($$('ROMAN_NUMERALS'), 'map', [], function $$15(l, i){var $a, $b, repeat = nil;
1701
+ return $send($$('ROMAN_NUMERALS'), 'map', [], function $$16(l, i){var $a, $b, repeat = nil;
1688
1702
 
1689
1703
 
1690
1704
  if (l == null) l = nil;
@@ -2186,7 +2200,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {/* Generated by Opal 1.7.3 */
2186
2200
  $const_set($nesting[0], 'ManpageNamePurposeRx', $regexp(["^(", $$('CC_ANY'), "+?) +- +(", $$('CC_ANY'), "+)$"]));
2187
2201
  $const_set($nesting[0], 'ConditionalDirectiveRx', $regexp(["^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(", $$('CC_ANY'), "+)?\\]$"]));
2188
2202
  $const_set($nesting[0], 'EvalExpressionRx', $regexp(["^(", $$('CC_ANY'), "+?) *([=!><]=|[><]) *(", $$('CC_ANY'), "+)$"]));
2189
- $const_set($nesting[0], 'IncludeDirectiveRx', $regexp(["^(\\\\)?include::([^\\[][^\\[]*)\\[(", $$('CC_ANY'), "+)?\\]$"]));
2203
+ $const_set($nesting[0], 'IncludeDirectiveRx', $regexp(["^(\\\\)?include::([^\\s\\[](?:[^\\[]*[^\\s\\[])?)\\[(", $$('CC_ANY'), "+)?\\]$"]));
2190
2204
  $const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
2191
2205
  $const_set($nesting[0], 'AttributeEntryRx', $regexp(["^:(!?", $$('CG_WORD'), "[^:]*):(?:[ \\t]+(", $$('CC_ANY'), "*))?$"]));
2192
2206
  $const_set($nesting[0], 'InvalidAttributeNameCharsRx', $regexp(["[^", $$('CC_WORD'), "-]"]));
@@ -2244,14 +2258,13 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {/* Generated by Opal 1.7.3 */
2244
2258
  $const_set($nesting[0], 'InlineImageMacroRx', $regexp(["\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
2245
2259
  $const_set($nesting[0], 'InlineIndextermMacroRx', $regexp(["\\\\?(?:(indexterm2?):\\[(", $$('CC_ALL'), "*?[^\\\\])\\]|\\(\\((", $$('CC_ALL'), "+?)\\)\\)(?!\\)))"], 'm'));
2246
2260
  $const_set($nesting[0], 'InlineKbdBtnMacroRx', $regexp(["(\\\\)?(kbd|btn):\\[(", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
2247
- $const_set($nesting[0], 'InlineLinkRx', $regexp(["(^|link:|", $$('CG_BLANK'), "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|", $$('CC_ALL'), "*?[^\\\\])\\])?"], 'm'));
2261
+ $const_set($nesting[0], 'InlineLinkRx', $regexp(["(^|link:|", $$('CG_BLANK'), "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))"], 'm'));
2248
2262
  $const_set($nesting[0], 'InlineLinkMacroRx', $regexp(["\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
2249
2263
  $const_set($nesting[0], 'MacroNameRx', $regexp(["^", $$('CG_WORD'), "[", $$('CC_WORD'), "-]*$"]));
2250
2264
  $const_set($nesting[0], 'InlineStemMacroRx', $regexp(["\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
2251
2265
  $const_set($nesting[0], 'InlineMenuMacroRx', $regexp(["\\\\?menu:(", $$('CG_WORD'), "|[", $$('CC_WORD'), "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(", $$('CC_ALL'), "*?[^\\\\]))\\]"], 'm'));
2252
2266
  $const_set($nesting[0], 'InlineMenuRx', $regexp(["\\\\?\"([", $$('CC_WORD'), "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""]));
2253
- $const_set($nesting[0], 'InlinePassRx', $hash(false, ["+", "`", $regexp(["(^|[^", $$('CC_WORD'), ";:])(?:\\[([^\\]]+)\\])?(\\\\?(\\+|`)(\\S|\\S", $$('CC_ALL'), "*?\\S)\\4)(?!", $$('CG_WORD'), ")"], 'm')], true, ["`", nil, $regexp(["(^|[^`", $$('CC_WORD'), "])(?:\\[([^\\]]+)\\])?(\\\\?(`)([^`\\s]|[^`\\s]", $$('CC_ALL'), "*?\\S)\\4)(?![`", $$('CC_WORD'), "])"], 'm')]));
2254
- $const_set($nesting[0], 'SinglePlusInlinePassRx', $regexp(["^(\\\\)?\\+(\\S|\\S", $$('CC_ALL'), "*?\\S)\\+$"], 'm'));
2267
+ $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')]));
2255
2268
  $const_set($nesting[0], 'InlinePassMacroRx', $regexp(["(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(", $$('CC_ALL'), "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|", $$('CC_ALL'), "*?[^\\\\])\\])"], 'm'));
2256
2269
  $const_set($nesting[0], 'InlineXrefMacroRx', $regexp(["\\\\?(?:&lt;&lt;([", $$('CC_WORD'), "#/.:{]", $$('CC_ALL'), "*?)&gt;&gt;|xref:([", $$('CC_WORD'), "#/.:{]", $$('CC_ALL'), "*?)\\[(?:\\]|(", $$('CC_ALL'), "*?[^\\\\])\\]))"], 'm'));
2257
2270
  $const_set($nesting[0], 'HardLineBreakRx', $regexp(["^(", $$('CC_ANY'), "*) \\+$"], 'm'));
@@ -2272,7 +2285,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
2272
2285
  "use strict";
2273
2286
  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.$$$;
2274
2287
 
2275
- 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,extract_inner_passthrough,basebackend?,error,chr,drop,&,resolve_subs,resolve_block_subs,parse_into,private,=~,shorthand_property_syntax,each_char');
2288
+ 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');
2276
2289
  return (function($base, $parent_nesting) {
2277
2290
  var self = $module($base, 'Asciidoctor');
2278
2291
 
@@ -2832,11 +2845,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
2832
2845
  }}, {$$s: self})
2833
2846
  };
2834
2847
  if (($truthy(found_colon) && ($truthy(text['$include?']("://"))))) {
2835
- 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;
2848
+ 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;
2836
2849
 
2837
2850
 
2838
- if ($truthy((target = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))['$start_with?']($$('RS')))) {
2839
- return "" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + (target.$slice(1, target.$length())) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](4)))
2851
+ 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')))) {
2852
+ 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()))
2840
2853
  };
2841
2854
  $a = [(($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), ""], (prefix = $a[0]), (suffix = $a[1]), $a;
2842
2855
  if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](4)))) {
@@ -2859,21 +2872,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
2859
2872
  nil
2860
2873
  };
2861
2874
 
2862
- switch ((($a = $gvars['~']) === nil ? nil : $a['$[]'](3))) {
2863
- case ")":
2864
- case "?":
2865
- case "!":
2866
-
2867
- target = target.$chop();
2868
- if (($eqeq((suffix = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3))), ")") && ($truthy(target['$end_with?'](".", "?", "!"))))) {
2869
-
2870
- suffix = $rb_plus(target['$[]'](-1), suffix);
2871
- target = target.$chop();
2872
- };
2873
- if ($truthy(target['$end_with?']("://"))) {
2874
- return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))
2875
- };
2876
- break;
2875
+ switch ((($a = $gvars['~']) === nil ? nil : $a['$[]'](6))) {
2877
2876
  case ";":
2878
2877
 
2879
2878
  if (($truthy(prefix['$start_with?']("&lt;")) && ($truthy(target['$end_with?']("&gt;"))))) {
@@ -3096,7 +3095,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
3096
3095
  };
3097
3096
  if ($truthy(doc.$compat_mode())) {
3098
3097
  fragment = refid
3099
- } else if ($truthy((hash_idx = refid.$index("#")))) {
3098
+ } else if (($truthy((hash_idx = refid.$index("#"))) && ($neqeq(refid['$[]']($rb_minus(hash_idx, 1)), "&")))) {
3100
3099
  if ($truthy($rb_gt(hash_idx, 0))) {
3101
3100
 
3102
3101
  if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
@@ -3384,14 +3383,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
3384
3383
  return "" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + "[" + (attrlist) + "]" + ($rb_times($$('RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))) + (boundary)
3385
3384
  } else if ($eqeq((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), $$('RS'))) {
3386
3385
  preceding = "[" + (attrlist) + "]"
3387
- } else {
3388
-
3389
- if (($eqeq(boundary, "++") && ($truthy(attrlist['$end_with?']("x-"))))) {
3386
+ } else if ($eqeq(boundary, "++")) {
3387
+ if ($eqeq(attrlist, "x-")) {
3390
3388
 
3391
3389
  old_behavior = true;
3392
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));
3393
- };
3394
- attributes = self.$parse_quoted_text_attributes(attrlist);
3390
+ attributes = $hash2([], {});
3391
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
3392
+
3393
+ old_behavior = true;
3394
+ attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
3395
+ } else {
3396
+ attributes = self.$parse_quoted_text_attributes(attrlist)
3397
+ }
3398
+ } else {
3399
+ attributes = self.$parse_quoted_text_attributes(attrlist)
3395
3400
  }
3396
3401
  } else if ($truthy($rb_gt((escape_count = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)).$length()), 0))) {
3397
3402
  return "" + ($rb_times($$('RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))) + (boundary)
@@ -3421,35 +3426,40 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
3421
3426
  };
3422
3427
  $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;
3423
3428
  if (($truthy(text['$include?'](pass_inline_char1)) || (($truthy(pass_inline_char2) && ($truthy(text['$include?'](pass_inline_char2))))))) {
3424
- text = $send(text, 'gsub', [pass_inline_rx], function $$39(){var $c, self = $$39.$$s == null ? this : $$39.$$s, preceding = nil, attrlist = nil, quoted_text = nil, escape_mark = nil, format_mark = nil, content = nil, old_behavior = nil, $ret_or_1 = nil, attributes = nil, passthru_key = nil, subs = nil;
3429
+ 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;
3425
3430
 
3426
3431
 
3427
3432
  preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
3428
- attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2));
3429
- if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$('RS')))) {
3430
- escape_mark = $$('RS')
3433
+ attrlist = ($truthy(($ret_or_1 = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) ? ($ret_or_1) : ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))));
3434
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
3435
+ escaped = true
3431
3436
  };
3432
- format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
3433
- content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5));
3437
+ quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
3438
+ format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
3439
+ content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
3434
3440
  if ($truthy(compat_mode)) {
3435
3441
  old_behavior = true
3436
- } else if ($truthy((old_behavior = ($truthy(($ret_or_1 = attrlist)) ? (attrlist['$end_with?']("x-")) : ($ret_or_1))))) {
3437
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))
3442
+ } else if (($truthy(attrlist) && (($eqeq(attrlist, "x-") || ($truthy(attrlist['$end_with?'](" x-"))))))) {
3443
+ old_behavior = (old_behavior_forced = true)
3438
3444
  };
3439
3445
  if ($truthy(attrlist)) {
3440
- if (($eqeq(format_mark, "`") && ($not(old_behavior)))) {
3441
- return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark))
3442
- } else if ($truthy(escape_mark)) {
3446
+ if ($truthy(escaped)) {
3443
3447
  return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()))
3444
3448
  } else if ($eqeq(preceding, $$('RS'))) {
3445
- preceding = "[" + (attrlist) + "]"
3449
+
3450
+ if (($truthy(old_behavior_forced) && ($eqeq(format_mark, "`")))) {
3451
+ return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text)
3452
+ };
3453
+ preceding = "[" + (attrlist) + "]";
3454
+ } else if ($truthy(old_behavior_forced)) {
3455
+ attributes = ($eqeq(attrlist, "x-") ? ($hash2([], {})) : (self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)))))
3446
3456
  } else {
3447
3457
  attributes = self.$parse_quoted_text_attributes(attrlist)
3448
3458
  }
3449
- } else if (($eqeq(format_mark, "`") && ($not(old_behavior)))) {
3450
- return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark))
3451
- } else if ($truthy(escape_mark)) {
3459
+ } else if ($truthy(escaped)) {
3452
3460
  return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()))
3461
+ } else if (($truthy(compat_mode) && ($eqeq(preceding, $$('RS'))))) {
3462
+ return quoted_text
3453
3463
  };
3454
3464
  if ($truthy(compat_mode)) {
3455
3465
  passthrus['$[]=']((passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$('BASIC_SUBS'), "attributes": attributes, "type": "monospaced"}))
@@ -3801,23 +3811,6 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
3801
3811
  };}, {$$s: self}).$join($$('LF')));
3802
3812
  }, -3);
3803
3813
 
3804
- $def(self, '$extract_inner_passthrough', function $$extract_inner_passthrough(text, pre) {
3805
- var $a, self = this, passthru_key = nil;
3806
- if (self.passthroughs == null) self.passthroughs = nil;
3807
-
3808
- if ((($truthy(text['$end_with?']("+")) && ($truthy(text['$start_with?']("+", "\\+")))) && ($truthy($$('SinglePlusInlinePassRx')['$=~'](text))))) {
3809
- if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) {
3810
- return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`"
3811
- } else {
3812
-
3813
- self.passthroughs['$[]=']((passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$('BASIC_SUBS')}));
3814
- return "" + (pre) + "`" + ($$('PASS_START')) + (passthru_key) + ($$('PASS_END')) + "`";
3815
- }
3816
- } else {
3817
- return "" + (pre) + "`" + (text) + "`"
3818
- }
3819
- });
3820
-
3821
3814
  $def(self, '$convert_quoted_text', function $$convert_quoted_text(match, type, scope) {
3822
3815
  var self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
3823
3816
 
@@ -3981,7 +3974,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {/* Generated by Opal 1.7.3
3981
3974
 
3982
3975
  var $nesting = [self].concat($parent_nesting);
3983
3976
 
3984
- return $const_set($nesting[0], 'VERSION', "2.0.18")
3977
+ return $const_set($nesting[0], 'VERSION', "2.0.20")
3985
3978
  })($nesting[0], $nesting)
3986
3979
  };
3987
3980
 
@@ -5296,7 +5289,11 @@ Opal.modules["asciidoctor/block"] = function(Opal) {/* Generated by Opal 1.7.3 *
5296
5289
 
5297
5290
  result = self.$apply_subs(self.lines, self.subs);
5298
5291
  if ($truthy($rb_lt(result.$size(), 2))) {
5299
- return result['$[]'](0)
5292
+ if ($truthy(($ret_or_2 = result['$[]'](0)))) {
5293
+ return $ret_or_2
5294
+ } else {
5295
+ return ""
5296
+ }
5300
5297
  } else {
5301
5298
 
5302
5299
  while ($truthy(($truthy(($ret_or_2 = (first = result['$[]'](0)))) ? (first.$rstrip()['$empty?']()) : ($ret_or_2)))) {
@@ -7590,7 +7587,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
7590
7587
  "use strict";
7591
7588
  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.$$$;
7592
7589
 
7593
- 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,context=,style=,parent=,size,content_model,shift,unwrap_standalone_preamble,source_location,merge,fetch,parse_block_metadata_line,extensions,block_macros?,mark,read_line,terminator,to_s,masq,to_sym,registered_for_block?,debug?,debug,cursor_at_mark,strict_verbatim_paragraphs,unshift_line,markdown_syntax,keys,chr,uniform?,length,end_with?,parse_attributes,attribute_missing,tr,basename,assign_caption,registered_for_block_macro?,config,process_method,replace,parse_callout_list,callouts,===,parse_list,parse_description_list,underline_style_section_titles,is_section_title?,peek_line,atx_section_title?,generate_id,level=,read_paragraph_lines,adjust_indentation!,map!,slice,pop,build_block,apply_subs,chop,catalog_inline_anchors,rekey,index,strip,-,parse_table,each,raise,title?,update_attributes,commit_subs,sub?,catalog_callouts,source,remove_sub,block_terminates_paragraph,to_proc,nil?,lines,parse_blocks,parse_list_item,items,scan,gsub,count,advance,dup,match,callout_ids,next_list,catalog_inline_anchor,marker=,catalog_inline_biblio_anchor,set_option,text=,resolve_ordered_list_marker,read_lines_for_list_item,skip_line_comments,unshift_lines,fold_first,text?,is_sibling_list_item?,concat,find,casecmp,sectname=,special=,numbered=,numbered,lineno,peek_lines,setext_section_title?,abs,cursor_at_prev_line,process_attribute_entries,next_line_empty?,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,%');
7590
+ 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,%');
7594
7591
  return (function($base, $parent_nesting) {
7595
7592
  var self = $module($base, 'Asciidoctor');
7596
7593
 
@@ -7926,16 +7923,20 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
7926
7923
  if ($truthy(part)) {
7927
7924
  if ($not(section['$blocks?']())) {
7928
7925
  if ($neqeq(new_block.$style(), "partintro")) {
7929
- if ($eqeq(new_block.$context(), "paragraph")) {
7930
-
7931
- new_block['$context=']("open");
7932
- new_block['$style=']("partintro");
7926
+ if (($eqeq(new_block.$style(), "open") && ($eqeq(new_block.$context(), "open")))) {
7927
+ new_block['$style=']("partintro")
7933
7928
  } else {
7934
7929
 
7935
7930
  new_block['$parent=']((intro = $$('Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"}))));
7936
7931
  intro['$style=']("partintro");
7937
7932
  section.$blocks()['$<<'](intro);
7938
7933
  }
7934
+ } else if ($eqeq(new_block.$content_model(), "simple")) {
7935
+
7936
+ new_block['$content_model=']("compound");
7937
+ new_block['$<<']($$('Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
7938
+ new_block.$lines().$clear();
7939
+ new_block.$subs().$clear();
7939
7940
  }
7940
7941
  } else if ($eqeq(section.$blocks().$size(), 1)) {
7941
7942
 
@@ -7945,13 +7946,12 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
7945
7946
  } else if ($neqeq(first_block.$content_model(), "compound")) {
7946
7947
 
7947
7948
  new_block['$parent=']((intro = $$('Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"}))));
7948
- intro['$style=']("partintro");
7949
- section.$blocks().$shift();
7950
- if ($eqeq(first_block.$style(), "partintro")) {
7949
+ if ($eqeq(first_block.$style(), ($a = ["partintro"], $send(intro, 'style=', $a), $a[$a.length - 1]))) {
7951
7950
 
7952
7951
  first_block['$context=']("paragraph");
7953
7952
  first_block['$style='](nil);
7954
7953
  };
7954
+ section.$blocks().$shift();
7955
7955
  intro['$<<'](first_block);
7956
7956
  section.$blocks()['$<<'](intro);
7957
7957
  };
@@ -8767,8 +8767,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
8767
8767
  if ($truthy(reftext['$include?']($$('ATTR_REF_HEAD')))) {
8768
8768
  reftext = document.$sub_attributes(reftext)
8769
8769
  };
8770
- } else if (($truthy(reftext['$include?']($$('ATTR_REF_HEAD'))) && ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())))) {
8771
- return nil
8770
+ } else if ($truthy(reftext['$include?']($$('ATTR_REF_HEAD')))) {
8771
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
8772
+ reftext = nil
8773
+ }
8772
8774
  }
8773
8775
  };
8774
8776
  };
@@ -8962,7 +8964,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
8962
8964
  };
8963
8965
  }, -5);
8964
8966
  $defs(self, '$read_lines_for_list_item', function $$read_lines_for_list_item(reader, list_type, sibling_trait, has_text) {
8965
- 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;
8967
+ 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;
8966
8968
 
8967
8969
 
8968
8970
  if (sibling_trait == null) sibling_trait = nil;
@@ -9001,16 +9003,36 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
9001
9003
  };
9002
9004
  };
9003
9005
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
9004
- if ($eqeq(continuation, "active")) {
9005
-
9006
- buffer['$<<'](this_line);
9007
- buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
9008
- continuation = "inactive";
9009
- } else {
9006
+
9007
+ if (!$eqeq(continuation, "active")) {
9010
9008
  break
9011
- }
9012
- } else if ((($truthy(dlist) && ($neqeq(continuation, "active"))) && ($truthy($$('BlockAttributeLineRx')['$match?'](this_line))))) {
9013
- break
9009
+ };
9010
+ buffer['$<<'](this_line);
9011
+ buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
9012
+ continuation = "inactive";
9013
+ } else if (((($truthy(dlist) && ($neqeq(continuation, "active"))) && ($truthy(this_line['$start_with?']("[")))) && ($truthy($$('BlockAttributeLineRx')['$match?'](this_line))))) {
9014
+
9015
+ block_attribute_lines = [this_line];
9016
+ while ($truthy((next_line = reader.$peek_line()))) {
9017
+
9018
+ if ($truthy(self['$is_delimited_block?'](next_line))) {
9019
+ interrupt = true
9020
+ } else if (($truthy(next_line['$empty?']()) || (($truthy(next_line['$start_with?']("[")) && ($truthy($$('BlockAttributeLineRx')['$match?'](next_line))))))) {
9021
+
9022
+ block_attribute_lines['$<<'](reader.$read_line());
9023
+ continue;
9024
+ } else if (($truthy($$('AnyListRx')['$match?'](next_line)) && ($not(self['$is_sibling_list_item?'](next_line, list_type, sibling_trait))))) {
9025
+ buffer.$concat(block_attribute_lines)
9026
+ } else {
9027
+ interrupt = true
9028
+ };
9029
+ break;
9030
+ };
9031
+ if ($truthy(interrupt)) {
9032
+
9033
+ reader.$unshift_lines(block_attribute_lines);
9034
+ break;
9035
+ };
9014
9036
  } else if (($eqeq(continuation, "active") && ($not(this_line['$empty?']())))) {
9015
9037
  if ($truthy($$('LiteralParagraphRx')['$match?'](this_line))) {
9016
9038
 
@@ -9025,7 +9047,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
9025
9047
  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})))
9026
9048
  };
9027
9049
  continuation = "inactive";
9028
- } else if ((($truthy($$('BlockTitleRx')['$match?'](this_line)) || ($truthy($$('BlockAttributeLineRx')['$match?'](this_line)))) || ($truthy($$('AttributeEntryRx')['$match?'](this_line))))) {
9050
+ } 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))))))) {
9029
9051
  buffer['$<<'](this_line)
9030
9052
  } else {
9031
9053
 
@@ -10308,6 +10330,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10308
10330
  $const_set($nesting[0], 'SLASH', "/");
10309
10331
  $const_set($nesting[0], 'BACKSLASH', "\\");
10310
10332
  $const_set($nesting[0], 'DOUBLE_SLASH', "//");
10333
+ $const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
10311
10334
  $const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
10312
10335
  self.$attr_accessor("file_separator");
10313
10336
  self.$attr_accessor("working_dir");
@@ -10351,21 +10374,33 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10351
10374
  return path['$start_with?']("file://", "http://", "https://");
10352
10375
  }
10353
10376
  })
10377
+ } else if ($eqeq($$$('RUBY_ENGINE'), "jruby")) {
10378
+
10379
+ $def(self, '$root?', function $PathResolver_root$ques$3(path) {
10380
+ var self = this, $ret_or_1 = nil;
10381
+
10382
+ if ($truthy(($ret_or_1 = self['$absolute_path?'](path)))) {
10383
+ return $ret_or_1
10384
+ } else {
10385
+
10386
+ return path['$start_with?']($$('URI_CLASSLOADER'));
10387
+ }
10388
+ })
10354
10389
  } else {
10355
10390
  $alias(self, "root?", "absolute_path?")
10356
10391
  };
10357
10392
 
10358
- $def(self, '$unc?', function $PathResolver_unc$ques$3(path) {
10393
+ $def(self, '$unc?', function $PathResolver_unc$ques$4(path) {
10359
10394
 
10360
10395
  return path['$start_with?']($$('DOUBLE_SLASH'))
10361
10396
  });
10362
10397
 
10363
- $def(self, '$web_root?', function $PathResolver_web_root$ques$4(path) {
10398
+ $def(self, '$web_root?', function $PathResolver_web_root$ques$5(path) {
10364
10399
 
10365
10400
  return path['$start_with?']($$('SLASH'))
10366
10401
  });
10367
10402
 
10368
- $def(self, '$descends_from?', function $PathResolver_descends_from$ques$5(path, base) {
10403
+ $def(self, '$descends_from?', function $PathResolver_descends_from$ques$6(path, base) {
10369
10404
  var $ret_or_1 = nil;
10370
10405
 
10371
10406
  if ($eqeq(base, path)) {
@@ -10431,7 +10466,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10431
10466
  if ($truthy(path['$include?']($$('DOT_DOT')))) {
10432
10467
 
10433
10468
  resolved_segments = [];
10434
- $send(path_segments, 'each', [], function $$6(segment){
10469
+ $send(path_segments, 'each', [], function $$7(segment){
10435
10470
 
10436
10471
  if (segment == null) segment = nil;
10437
10472
  if ($eqeq(segment, $$('DOT_DOT'))) {
@@ -10465,6 +10500,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10465
10500
  root = $$('DOUBLE_SLASH')
10466
10501
  } else if ($truthy(posix_path['$start_with?']($$('SLASH')))) {
10467
10502
  root = $$('SLASH')
10503
+ } else if ($truthy(posix_path['$start_with?']($$('URI_CLASSLOADER')))) {
10504
+ root = posix_path.$slice(0, $$('URI_CLASSLOADER').$length())
10468
10505
  } else {
10469
10506
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$('SLASH')), 1))
10470
10507
  }
@@ -10573,7 +10610,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10573
10610
  $b = self.$partition_path(jail), $a = $to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
10574
10611
  };
10575
10612
  warned = false;
10576
- $send(unresolved_segments, 'each', [], function $$7(segment){var self = $$7.$$s == null ? this : $$7.$$s;
10613
+ $send(unresolved_segments, 'each', [], function $$8(segment){var self = $$8.$$s == null ? this : $$8.$$s;
10577
10614
 
10578
10615
 
10579
10616
  if (segment == null) segment = nil;
@@ -10595,7 +10632,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10595
10632
  return resolved_segments['$<<'](segment)
10596
10633
  };}, {$$s: self});
10597
10634
  } else {
10598
- $send(unresolved_segments, 'each', [], function $$8(segment){
10635
+ $send(unresolved_segments, 'each', [], function $$9(segment){
10599
10636
 
10600
10637
  if (segment == null) segment = nil;
10601
10638
  if ($eqeq(segment, $$('DOT_DOT'))) {
@@ -10637,7 +10674,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
10637
10674
  };
10638
10675
  $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;
10639
10676
  resolved_segments = [];
10640
- $send(target_segments, 'each', [], function $$9(segment){
10677
+ $send(target_segments, 'each', [], function $$10(segment){
10641
10678
 
10642
10679
  if (segment == null) segment = nil;
10643
10680
  if ($eqeq(segment, $$('DOT_DOT'))) {
@@ -10682,7 +10719,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
10682
10719
  "use strict";
10683
10720
  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.$$$;
10684
10721
 
10685
- 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');
10722
+ 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');
10686
10723
  return (function($base, $parent_nesting) {
10687
10724
  var self = $module($base, 'Asciidoctor');
10688
10725
 
@@ -10809,25 +10846,24 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
10809
10846
  });
10810
10847
 
10811
10848
  $def(self, '$peek_line', function $$peek_line(direct) {
10812
- var self = this, line = nil, $ret_or_1 = nil;
10849
+ var self = this, next_line = nil, line = nil;
10813
10850
 
10814
10851
 
10815
10852
  if (direct == null) direct = false;
10816
- if (($truthy(direct) || ($truthy($rb_gt(self.look_ahead, 0))))) {
10817
- if ($truthy(self.unescape_next_line)) {
10818
-
10819
- return (line = self.lines['$[]'](-1)).$slice(1, line.$length());
10853
+ while ($truthy(true)) {
10854
+
10855
+ next_line = self.lines['$[]'](-1);
10856
+ if (($truthy(direct) || ($truthy($rb_gt(self.look_ahead, 0))))) {
10857
+ return ($truthy(self.unescape_next_line) ? (next_line.$slice(1, next_line.$length())) : (next_line))
10858
+ } else if ($truthy(next_line)) {
10859
+ if ($truthy((line = self.$process_line(next_line)))) {
10860
+ return line
10861
+ }
10820
10862
  } else {
10821
- return self.lines['$[]'](-1)
10822
- }
10823
- } else if ($truthy(self.lines['$empty?']())) {
10824
-
10825
- self.look_ahead = 0;
10826
- return nil;
10827
- } else if ($truthy(($ret_or_1 = self.$process_line(self.lines['$[]'](-1))))) {
10828
- return $ret_or_1
10829
- } else {
10830
- return self.$peek_line()
10863
+
10864
+ self.look_ahead = 0;
10865
+ return nil;
10866
+ };
10831
10867
  };
10832
10868
  }, -1);
10833
10869
 
@@ -11985,6 +12021,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
11985
12021
  };
11986
12022
  } else {
11987
12023
 
12024
+ inc_content = nil;
12025
+
11988
12026
  try {
11989
12027
 
11990
12028
  inc_content = $send(reader, 'call', [inc_path, read_mode], function $$30(f){
@@ -11992,7 +12030,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
11992
12030
  if (f == null) f = nil;
11993
12031
  return f.$read();});
11994
12032
  self.$shift();
11995
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
11996
12033
  } catch ($err) {
11997
12034
  if (Opal.rescue($err, [$$('StandardError')])) {
11998
12035
  try {
@@ -12001,7 +12038,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
12001
12038
  return self.$replace_next_line("Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
12002
12039
  } finally { Opal.pop_exception(); }
12003
12040
  } else { throw $err; }
12004
- };
12041
+ };;
12042
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
12005
12043
  };
12006
12044
  return true;
12007
12045
  } else {
@@ -14745,7 +14783,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {/* Generated by Op
14745
14783
  };
14746
14784
  id_attribute = ($truthy(node.$id()) ? (" id=\"" + (node.$id()) + "\"") : (""));
14747
14785
  title_element = ($truthy(node['$title?']()) ? ("<div class=\"title\">" + (node.$captioned_title()) + "</div>\n") : (""));
14748
- 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, ($truthy(($ret_or_1 = node.$content())) ? ($ret_or_1) : (""))), pre_close)))) + "\n" + "</div>\n" + "</div>";
14786
+ 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>";
14749
14787
  });
14750
14788
 
14751
14789
  $def(self, '$convert_literal', function $$convert_literal(node) {
@@ -18006,7 +18044,7 @@ AbstractBlock.prototype.setStyle = function (style) {
18006
18044
  /**
18007
18045
  * Get the location in the AsciiDoc source where this block begins.
18008
18046
  *
18009
- * @returns {string} - the style for this block
18047
+ * @returns {Cursor} - the location in the AsciiDoc source where this block begins
18010
18048
  * @memberof AbstractBlock
18011
18049
  */
18012
18050
  AbstractBlock.prototype.getSourceLocation = function () {
@@ -22984,7 +23022,7 @@ Extensions.newBlockMacroProcessor = function (name, functions) {
22984
23022
  }
22985
23023
 
22986
23024
 
22987
- var ASCIIDOCTOR_JS_VERSION = '3.0.0-rc.2';
23025
+ var ASCIIDOCTOR_JS_VERSION = '3.0.1';
22988
23026
 
22989
23027
  /**
22990
23028
  * Get Asciidoctor.js version number.