@asciidoctor/core 3.0.0-rc.1 → 3.0.0

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Asciidoctor.js 3.0.0-rc.1 | MIT | https://github.com/asciidoctor/asciidoctor.js
2
+ * @license Asciidoctor.js 3.0.0 | MIT | https://github.com/asciidoctor/asciidoctor.js
3
3
  */
4
4
  (function(global_object) {
5
5
  "use strict";
@@ -26003,7 +26003,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
26003
26003
  "use strict";
26004
26004
  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.$$$;
26005
26005
 
26006
- 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');
26006
+ 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');
26007
26007
  return (function($base, $parent_nesting) {
26008
26008
  var self = $module($base, 'Asciidoctor');
26009
26009
 
@@ -26165,17 +26165,31 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
26165
26165
  return lines['$<<'](line.$chomp());});})
26166
26166
  };
26167
26167
  }, -2);
26168
-
26169
- $def(self, '$uriish?', function $Helpers_uriish$ques$13(str) {
26170
- var $ret_or_1 = nil;
26168
+ if ($eqeq($$$('RUBY_ENGINE'), "jruby")) {
26169
+
26170
+ $def(self, '$uriish?', function $Helpers_uriish$ques$13(str) {
26171
+ var $ret_or_1 = nil, $ret_or_2 = nil;
26171
26172
 
26172
- if ($truthy(($ret_or_1 = str['$include?'](":")))) {
26173
-
26174
- return $$('UriSniffRx')['$match?'](str);
26175
- } else {
26176
- return $ret_or_1
26177
- }
26178
- });
26173
+ if ($truthy(($ret_or_1 = ($truthy(($ret_or_2 = str['$include?'](":"))) ? (str['$start_with?']("uri:classloader:")['$!']()) : ($ret_or_2))))) {
26174
+
26175
+ return $$('UriSniffRx')['$match?'](str);
26176
+ } else {
26177
+ return $ret_or_1
26178
+ }
26179
+ })
26180
+ } else {
26181
+
26182
+ $def(self, '$uriish?', function $Helpers_uriish$ques$14(str) {
26183
+ var $ret_or_1 = nil;
26184
+
26185
+ if ($truthy(($ret_or_1 = str['$include?'](":")))) {
26186
+
26187
+ return $$('UriSniffRx')['$match?'](str);
26188
+ } else {
26189
+ return $ret_or_1
26190
+ }
26191
+ })
26192
+ };
26179
26193
 
26180
26194
  $def(self, '$encode_uri_component', function $$encode_uri_component(str) {
26181
26195
 
@@ -26223,7 +26237,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
26223
26237
  };
26224
26238
  }, -2);
26225
26239
 
26226
- $def(self, '$extname?', function $Helpers_extname$ques$14(path) {
26240
+ $def(self, '$extname?', function $Helpers_extname$ques$15(path) {
26227
26241
  var $ret_or_1 = nil, last_dot_idx = nil;
26228
26242
 
26229
26243
  if ($truthy(($ret_or_1 = (last_dot_idx = path.$rindex("."))))) {
@@ -26301,7 +26315,7 @@ Opal.modules["asciidoctor/helpers"] = function(Opal) {/* Generated by Opal 1.7.3
26301
26315
 
26302
26316
  $def(self, '$int_to_roman', function $$int_to_roman(val) {
26303
26317
 
26304
- return $send($$('ROMAN_NUMERALS'), 'map', [], function $$15(l, i){var $a, $b, repeat = nil;
26318
+ return $send($$('ROMAN_NUMERALS'), 'map', [], function $$16(l, i){var $a, $b, repeat = nil;
26305
26319
 
26306
26320
 
26307
26321
  if (l == null) l = nil;
@@ -26803,7 +26817,7 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {/* Generated by Opal 1.7.3 */
26803
26817
  $const_set($nesting[0], 'ManpageNamePurposeRx', $regexp(["^(", $$('CC_ANY'), "+?) +- +(", $$('CC_ANY'), "+)$"]));
26804
26818
  $const_set($nesting[0], 'ConditionalDirectiveRx', $regexp(["^(\\\\)?(ifdef|ifndef|ifeval|endif)::(\\S*?(?:([,+])\\S*?)?)\\[(", $$('CC_ANY'), "+)?\\]$"]));
26805
26819
  $const_set($nesting[0], 'EvalExpressionRx', $regexp(["^(", $$('CC_ANY'), "+?) *([=!><]=|[><]) *(", $$('CC_ANY'), "+)$"]));
26806
- $const_set($nesting[0], 'IncludeDirectiveRx', $regexp(["^(\\\\)?include::([^\\[][^\\[]*)\\[(", $$('CC_ANY'), "+)?\\]$"]));
26820
+ $const_set($nesting[0], 'IncludeDirectiveRx', $regexp(["^(\\\\)?include::([^\\s\\[](?:[^\\[]*[^\\s\\[])?)\\[(", $$('CC_ANY'), "+)?\\]$"]));
26807
26821
  $const_set($nesting[0], 'TagDirectiveRx', /\b(?:tag|(e)nd)::(\S+?)\[\](?=$|[ \r])/m);
26808
26822
  $const_set($nesting[0], 'AttributeEntryRx', $regexp(["^:(!?", $$('CG_WORD'), "[^:]*):(?:[ \\t]+(", $$('CC_ANY'), "*))?$"]));
26809
26823
  $const_set($nesting[0], 'InvalidAttributeNameCharsRx', $regexp(["[^", $$('CC_WORD'), "-]"]));
@@ -26861,14 +26875,13 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {/* Generated by Opal 1.7.3 */
26861
26875
  $const_set($nesting[0], 'InlineImageMacroRx', $regexp(["\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
26862
26876
  $const_set($nesting[0], 'InlineIndextermMacroRx', $regexp(["\\\\?(?:(indexterm2?):\\[(", $$('CC_ALL'), "*?[^\\\\])\\]|\\(\\((", $$('CC_ALL'), "+?)\\)\\)(?!\\)))"], 'm'));
26863
26877
  $const_set($nesting[0], 'InlineKbdBtnMacroRx', $regexp(["(\\\\)?(kbd|btn):\\[(", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
26864
- $const_set($nesting[0], 'InlineLinkRx', $regexp(["(^|link:|", $$('CG_BLANK'), "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://[^\\s\\[\\]<]*([^\\s.,\\[\\]<]))(?:\\[(|", $$('CC_ALL'), "*?[^\\\\])\\])?"], 'm'));
26878
+ $const_set($nesting[0], 'InlineLinkRx', $regexp(["(^|link:|", $$('CG_BLANK'), "|&lt;|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))"], 'm'));
26865
26879
  $const_set($nesting[0], 'InlineLinkMacroRx', $regexp(["\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
26866
26880
  $const_set($nesting[0], 'MacroNameRx', $regexp(["^", $$('CG_WORD'), "[", $$('CC_WORD'), "-]*$"]));
26867
26881
  $const_set($nesting[0], 'InlineStemMacroRx', $regexp(["\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(", $$('CC_ALL'), "*?[^\\\\])\\]"], 'm'));
26868
26882
  $const_set($nesting[0], 'InlineMenuMacroRx', $regexp(["\\\\?menu:(", $$('CG_WORD'), "|[", $$('CC_WORD'), "&][^\\n\\[]*[^\\s\\[])\\[ *(?:|(", $$('CC_ALL'), "*?[^\\\\]))\\]"], 'm'));
26869
26883
  $const_set($nesting[0], 'InlineMenuRx', $regexp(["\\\\?\"([", $$('CC_WORD'), "&][^\"]*?[ \\n]+&gt;[ \\n]+[^\"]*)\""]));
26870
- $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')]));
26871
- $const_set($nesting[0], 'SinglePlusInlinePassRx', $regexp(["^(\\\\)?\\+(\\S|\\S", $$('CC_ALL'), "*?\\S)\\+$"], 'm'));
26884
+ $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')]));
26872
26885
  $const_set($nesting[0], 'InlinePassMacroRx', $regexp(["(?:(?:(\\\\?)\\[([^\\]]+)\\])?(\\\\{0,2})(\\+\\+\\+?|\\$\\$)(", $$('CC_ALL'), "*?)\\4|(\\\\?)pass:([a-z]+(?:,[a-z-]+)*)?\\[(|", $$('CC_ALL'), "*?[^\\\\])\\])"], 'm'));
26873
26886
  $const_set($nesting[0], 'InlineXrefMacroRx', $regexp(["\\\\?(?:&lt;&lt;([", $$('CC_WORD'), "#/.:{]", $$('CC_ALL'), "*?)&gt;&gt;|xref:([", $$('CC_WORD'), "#/.:{]", $$('CC_ALL'), "*?)\\[(?:\\]|(", $$('CC_ALL'), "*?[^\\\\])\\]))"], 'm'));
26874
26887
  $const_set($nesting[0], 'HardLineBreakRx', $regexp(["^(", $$('CC_ANY'), "*) \\+$"], 'm'));
@@ -26889,7 +26902,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
26889
26902
  "use strict";
26890
26903
  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.$$$;
26891
26904
 
26892
- 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');
26905
+ 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');
26893
26906
  return (function($base, $parent_nesting) {
26894
26907
  var self = $module($base, 'Asciidoctor');
26895
26908
 
@@ -27449,11 +27462,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
27449
27462
  }}, {$$s: self})
27450
27463
  };
27451
27464
  if (($truthy(found_colon) && ($truthy(text['$include?']("://"))))) {
27452
- 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;
27465
+ 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;
27453
27466
 
27454
27467
 
27455
- if ($truthy((target = (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)))['$start_with?']($$('RS')))) {
27456
- return "" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + (target.$slice(1, target.$length())) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](4)))
27468
+ 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')))) {
27469
+ 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()))
27457
27470
  };
27458
27471
  $a = [(($b = $gvars['~']) === nil ? nil : $b['$[]'](1)), ""], (prefix = $a[0]), (suffix = $a[1]), $a;
27459
27472
  if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](4)))) {
@@ -27476,21 +27489,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
27476
27489
  nil
27477
27490
  };
27478
27491
 
27479
- switch ((($a = $gvars['~']) === nil ? nil : $a['$[]'](3))) {
27480
- case ")":
27481
- case "?":
27482
- case "!":
27483
-
27484
- target = target.$chop();
27485
- if (($eqeq((suffix = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3))), ")") && ($truthy(target['$end_with?'](".", "?", "!"))))) {
27486
-
27487
- suffix = $rb_plus(target['$[]'](-1), suffix);
27488
- target = target.$chop();
27489
- };
27490
- if ($truthy(target['$end_with?']("://"))) {
27491
- return (($a = $gvars['~']) === nil ? nil : $a['$[]'](0))
27492
- };
27493
- break;
27492
+ switch ((($a = $gvars['~']) === nil ? nil : $a['$[]'](6))) {
27494
27493
  case ";":
27495
27494
 
27496
27495
  if (($truthy(prefix['$start_with?']("&lt;")) && ($truthy(target['$end_with?']("&gt;"))))) {
@@ -27713,7 +27712,7 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
27713
27712
  };
27714
27713
  if ($truthy(doc.$compat_mode())) {
27715
27714
  fragment = refid
27716
- } else if ($truthy((hash_idx = refid.$index("#")))) {
27715
+ } else if (($truthy((hash_idx = refid.$index("#"))) && ($neqeq(refid['$[]']($rb_minus(hash_idx, 1)), "&")))) {
27717
27716
  if ($truthy($rb_gt(hash_idx, 0))) {
27718
27717
 
27719
27718
  if ($truthy($rb_gt((fragment_len = $rb_minus($rb_minus(refid.$length(), 1), hash_idx)), 0))) {
@@ -28001,14 +28000,20 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
28001
28000
  return "" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](1))) + "[" + (attrlist) + "]" + ($rb_times($$('RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))) + (boundary)
28002
28001
  } else if ($eqeq((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)), $$('RS'))) {
28003
28002
  preceding = "[" + (attrlist) + "]"
28004
- } else {
28005
-
28006
- if (($eqeq(boundary, "++") && ($truthy(attrlist['$end_with?']("x-"))))) {
28003
+ } else if ($eqeq(boundary, "++")) {
28004
+ if ($eqeq(attrlist, "x-")) {
28007
28005
 
28008
28006
  old_behavior = true;
28009
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2));
28010
- };
28011
- attributes = self.$parse_quoted_text_attributes(attrlist);
28007
+ attributes = $hash2([], {});
28008
+ } else if ($truthy(attrlist['$end_with?'](" x-"))) {
28009
+
28010
+ old_behavior = true;
28011
+ attributes = self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)));
28012
+ } else {
28013
+ attributes = self.$parse_quoted_text_attributes(attrlist)
28014
+ }
28015
+ } else {
28016
+ attributes = self.$parse_quoted_text_attributes(attrlist)
28012
28017
  }
28013
28018
  } else if ($truthy($rb_gt((escape_count = (($a = $gvars['~']) === nil ? nil : $a['$[]'](3)).$length()), 0))) {
28014
28019
  return "" + ($rb_times($$('RS'), $rb_minus(escape_count, 1))) + (boundary) + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](5))) + (boundary)
@@ -28038,35 +28043,40 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
28038
28043
  };
28039
28044
  $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;
28040
28045
  if (($truthy(text['$include?'](pass_inline_char1)) || (($truthy(pass_inline_char2) && ($truthy(text['$include?'](pass_inline_char2))))))) {
28041
- 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;
28046
+ 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;
28042
28047
 
28043
28048
 
28044
28049
  preceding = (($c = $gvars['~']) === nil ? nil : $c['$[]'](1));
28045
- attrlist = (($c = $gvars['~']) === nil ? nil : $c['$[]'](2));
28046
- if ($truthy((quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](3)))['$start_with?']($$('RS')))) {
28047
- escape_mark = $$('RS')
28050
+ attrlist = ($truthy(($ret_or_1 = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4)))) ? ($ret_or_1) : ((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))));
28051
+ if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](5)))) {
28052
+ escaped = true
28048
28053
  };
28049
- format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](4));
28050
- content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](5));
28054
+ quoted_text = (($c = $gvars['~']) === nil ? nil : $c['$[]'](6));
28055
+ format_mark = (($c = $gvars['~']) === nil ? nil : $c['$[]'](7));
28056
+ content = (($c = $gvars['~']) === nil ? nil : $c['$[]'](8));
28051
28057
  if ($truthy(compat_mode)) {
28052
28058
  old_behavior = true
28053
- } else if ($truthy((old_behavior = ($truthy(($ret_or_1 = attrlist)) ? (attrlist['$end_with?']("x-")) : ($ret_or_1))))) {
28054
- attrlist = attrlist.$slice(0, $rb_minus(attrlist.$length(), 2))
28059
+ } else if (($truthy(attrlist) && (($eqeq(attrlist, "x-") || ($truthy(attrlist['$end_with?'](" x-"))))))) {
28060
+ old_behavior = (old_behavior_forced = true)
28055
28061
  };
28056
28062
  if ($truthy(attrlist)) {
28057
- if (($eqeq(format_mark, "`") && ($not(old_behavior)))) {
28058
- return self.$extract_inner_passthrough(content, "" + (preceding) + "[" + (attrlist) + "]" + (escape_mark))
28059
- } else if ($truthy(escape_mark)) {
28063
+ if ($truthy(escaped)) {
28060
28064
  return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text.$slice(1, quoted_text.$length()))
28061
28065
  } else if ($eqeq(preceding, $$('RS'))) {
28062
- preceding = "[" + (attrlist) + "]"
28066
+
28067
+ if (($truthy(old_behavior_forced) && ($eqeq(format_mark, "`")))) {
28068
+ return "" + (preceding) + "[" + (attrlist) + "]" + (quoted_text)
28069
+ };
28070
+ preceding = "[" + (attrlist) + "]";
28071
+ } else if ($truthy(old_behavior_forced)) {
28072
+ attributes = ($eqeq(attrlist, "x-") ? ($hash2([], {})) : (self.$parse_quoted_text_attributes(attrlist.$slice(0, $rb_minus(attrlist.$length(), 3)))))
28063
28073
  } else {
28064
28074
  attributes = self.$parse_quoted_text_attributes(attrlist)
28065
28075
  }
28066
- } else if (($eqeq(format_mark, "`") && ($not(old_behavior)))) {
28067
- return self.$extract_inner_passthrough(content, "" + (preceding) + (escape_mark))
28068
- } else if ($truthy(escape_mark)) {
28076
+ } else if ($truthy(escaped)) {
28069
28077
  return "" + (preceding) + (quoted_text.$slice(1, quoted_text.$length()))
28078
+ } else if (($truthy(compat_mode) && ($eqeq(preceding, $$('RS'))))) {
28079
+ return quoted_text
28070
28080
  };
28071
28081
  if ($truthy(compat_mode)) {
28072
28082
  passthrus['$[]=']((passthru_key = passthrus.$size()), $hash2(["text", "subs", "attributes", "type"], {"text": content, "subs": $$('BASIC_SUBS'), "attributes": attributes, "type": "monospaced"}))
@@ -28418,23 +28428,6 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {/* Generated by Opal
28418
28428
  };}, {$$s: self}).$join($$('LF')));
28419
28429
  }, -3);
28420
28430
 
28421
- $def(self, '$extract_inner_passthrough', function $$extract_inner_passthrough(text, pre) {
28422
- var $a, self = this, passthru_key = nil;
28423
- if (self.passthroughs == null) self.passthroughs = nil;
28424
-
28425
- if ((($truthy(text['$end_with?']("+")) && ($truthy(text['$start_with?']("+", "\\+")))) && ($truthy($$('SinglePlusInlinePassRx')['$=~'](text))))) {
28426
- if ($truthy((($a = $gvars['~']) === nil ? nil : $a['$[]'](1)))) {
28427
- return "" + (pre) + "`+" + ((($a = $gvars['~']) === nil ? nil : $a['$[]'](2))) + "+`"
28428
- } else {
28429
-
28430
- self.passthroughs['$[]=']((passthru_key = self.passthroughs.$size()), $hash2(["text", "subs"], {"text": (($a = $gvars['~']) === nil ? nil : $a['$[]'](2)), "subs": $$('BASIC_SUBS')}));
28431
- return "" + (pre) + "`" + ($$('PASS_START')) + (passthru_key) + ($$('PASS_END')) + "`";
28432
- }
28433
- } else {
28434
- return "" + (pre) + "`" + (text) + "`"
28435
- }
28436
- });
28437
-
28438
28431
  $def(self, '$convert_quoted_text', function $$convert_quoted_text(match, type, scope) {
28439
28432
  var self = this, attrs = nil, unescaped_attrs = nil, attrlist = nil, id = nil, attributes = nil;
28440
28433
 
@@ -28598,7 +28591,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {/* Generated by Opal 1.7.3
28598
28591
 
28599
28592
  var $nesting = [self].concat($parent_nesting);
28600
28593
 
28601
- return $const_set($nesting[0], 'VERSION', "2.0.18")
28594
+ return $const_set($nesting[0], 'VERSION', "2.0.20")
28602
28595
  })($nesting[0], $nesting)
28603
28596
  };
28604
28597
 
@@ -29913,7 +29906,11 @@ Opal.modules["asciidoctor/block"] = function(Opal) {/* Generated by Opal 1.7.3 *
29913
29906
 
29914
29907
  result = self.$apply_subs(self.lines, self.subs);
29915
29908
  if ($truthy($rb_lt(result.$size(), 2))) {
29916
- return result['$[]'](0)
29909
+ if ($truthy(($ret_or_2 = result['$[]'](0)))) {
29910
+ return $ret_or_2
29911
+ } else {
29912
+ return ""
29913
+ }
29917
29914
  } else {
29918
29915
 
29919
29916
  while ($truthy(($truthy(($ret_or_2 = (first = result['$[]'](0)))) ? (first.$rstrip()['$empty?']()) : ($ret_or_2)))) {
@@ -32207,7 +32204,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
32207
32204
  "use strict";
32208
32205
  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.$$$;
32209
32206
 
32210
- 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,%');
32207
+ 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,%');
32211
32208
  return (function($base, $parent_nesting) {
32212
32209
  var self = $module($base, 'Asciidoctor');
32213
32210
 
@@ -32543,16 +32540,20 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
32543
32540
  if ($truthy(part)) {
32544
32541
  if ($not(section['$blocks?']())) {
32545
32542
  if ($neqeq(new_block.$style(), "partintro")) {
32546
- if ($eqeq(new_block.$context(), "paragraph")) {
32547
-
32548
- new_block['$context=']("open");
32549
- new_block['$style=']("partintro");
32543
+ if (($eqeq(new_block.$style(), "open") && ($eqeq(new_block.$context(), "open")))) {
32544
+ new_block['$style=']("partintro")
32550
32545
  } else {
32551
32546
 
32552
32547
  new_block['$parent=']((intro = $$('Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"}))));
32553
32548
  intro['$style=']("partintro");
32554
32549
  section.$blocks()['$<<'](intro);
32555
32550
  }
32551
+ } else if ($eqeq(new_block.$content_model(), "simple")) {
32552
+
32553
+ new_block['$content_model=']("compound");
32554
+ new_block['$<<']($$('Block').$new(new_block, "paragraph", $hash2(["source", "subs"], {"source": new_block.$lines(), "subs": new_block.$subs()})));
32555
+ new_block.$lines().$clear();
32556
+ new_block.$subs().$clear();
32556
32557
  }
32557
32558
  } else if ($eqeq(section.$blocks().$size(), 1)) {
32558
32559
 
@@ -32562,13 +32563,12 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
32562
32563
  } else if ($neqeq(first_block.$content_model(), "compound")) {
32563
32564
 
32564
32565
  new_block['$parent=']((intro = $$('Block').$new(section, "open", $hash2(["content_model"], {"content_model": "compound"}))));
32565
- intro['$style=']("partintro");
32566
- section.$blocks().$shift();
32567
- if ($eqeq(first_block.$style(), "partintro")) {
32566
+ if ($eqeq(first_block.$style(), ($a = ["partintro"], $send(intro, 'style=', $a), $a[$a.length - 1]))) {
32568
32567
 
32569
32568
  first_block['$context=']("paragraph");
32570
32569
  first_block['$style='](nil);
32571
32570
  };
32571
+ section.$blocks().$shift();
32572
32572
  intro['$<<'](first_block);
32573
32573
  section.$blocks()['$<<'](intro);
32574
32574
  };
@@ -33384,8 +33384,10 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
33384
33384
  if ($truthy(reftext['$include?']($$('ATTR_REF_HEAD')))) {
33385
33385
  reftext = document.$sub_attributes(reftext)
33386
33386
  };
33387
- } else if (($truthy(reftext['$include?']($$('ATTR_REF_HEAD'))) && ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())))) {
33388
- return nil
33387
+ } else if ($truthy(reftext['$include?']($$('ATTR_REF_HEAD')))) {
33388
+ if ($truthy((reftext = document.$sub_attributes(reftext))['$empty?']())) {
33389
+ reftext = nil
33390
+ }
33389
33391
  }
33390
33392
  };
33391
33393
  };
@@ -33579,7 +33581,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
33579
33581
  };
33580
33582
  }, -5);
33581
33583
  $defs(self, '$read_lines_for_list_item', function $$read_lines_for_list_item(reader, list_type, sibling_trait, has_text) {
33582
- 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;
33584
+ 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;
33583
33585
 
33584
33586
 
33585
33587
  if (sibling_trait == null) sibling_trait = nil;
@@ -33618,16 +33620,36 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
33618
33620
  };
33619
33621
  };
33620
33622
  if ($truthy((match = self['$is_delimited_block?'](this_line, true)))) {
33621
- if ($eqeq(continuation, "active")) {
33622
-
33623
- buffer['$<<'](this_line);
33624
- buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
33625
- continuation = "inactive";
33626
- } else {
33623
+
33624
+ if (!$eqeq(continuation, "active")) {
33627
33625
  break
33628
- }
33629
- } else if ((($truthy(dlist) && ($neqeq(continuation, "active"))) && ($truthy($$('BlockAttributeLineRx')['$match?'](this_line))))) {
33630
- break
33626
+ };
33627
+ buffer['$<<'](this_line);
33628
+ buffer.$concat(reader.$read_lines_until($hash2(["terminator", "read_last_line", "context"], {"terminator": match.$terminator(), "read_last_line": true, "context": nil})));
33629
+ continuation = "inactive";
33630
+ } else if (((($truthy(dlist) && ($neqeq(continuation, "active"))) && ($truthy(this_line['$start_with?']("[")))) && ($truthy($$('BlockAttributeLineRx')['$match?'](this_line))))) {
33631
+
33632
+ block_attribute_lines = [this_line];
33633
+ while ($truthy((next_line = reader.$peek_line()))) {
33634
+
33635
+ if ($truthy(self['$is_delimited_block?'](next_line))) {
33636
+ interrupt = true
33637
+ } else if (($truthy(next_line['$empty?']()) || (($truthy(next_line['$start_with?']("[")) && ($truthy($$('BlockAttributeLineRx')['$match?'](next_line))))))) {
33638
+
33639
+ block_attribute_lines['$<<'](reader.$read_line());
33640
+ continue;
33641
+ } else if (($truthy($$('AnyListRx')['$match?'](next_line)) && ($not(self['$is_sibling_list_item?'](next_line, list_type, sibling_trait))))) {
33642
+ buffer.$concat(block_attribute_lines)
33643
+ } else {
33644
+ interrupt = true
33645
+ };
33646
+ break;
33647
+ };
33648
+ if ($truthy(interrupt)) {
33649
+
33650
+ reader.$unshift_lines(block_attribute_lines);
33651
+ break;
33652
+ };
33631
33653
  } else if (($eqeq(continuation, "active") && ($not(this_line['$empty?']())))) {
33632
33654
  if ($truthy($$('LiteralParagraphRx')['$match?'](this_line))) {
33633
33655
 
@@ -33642,7 +33664,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {/* Generated by Opal 1.7.3
33642
33664
  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})))
33643
33665
  };
33644
33666
  continuation = "inactive";
33645
- } else if ((($truthy($$('BlockTitleRx')['$match?'](this_line)) || ($truthy($$('BlockAttributeLineRx')['$match?'](this_line)))) || ($truthy($$('AttributeEntryRx')['$match?'](this_line))))) {
33667
+ } 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))))))) {
33646
33668
  buffer['$<<'](this_line)
33647
33669
  } else {
33648
33670
 
@@ -34925,6 +34947,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
34925
34947
  $const_set($nesting[0], 'SLASH', "/");
34926
34948
  $const_set($nesting[0], 'BACKSLASH', "\\");
34927
34949
  $const_set($nesting[0], 'DOUBLE_SLASH', "//");
34950
+ $const_set($nesting[0], 'URI_CLASSLOADER', "uri:classloader:");
34928
34951
  $const_set($nesting[0], 'WindowsRootRx', /^(?:[a-zA-Z]:)?[\\\/]/);
34929
34952
  self.$attr_accessor("file_separator");
34930
34953
  self.$attr_accessor("working_dir");
@@ -34968,21 +34991,33 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
34968
34991
  return path['$start_with?']("file://", "http://", "https://");
34969
34992
  }
34970
34993
  })
34994
+ } else if ($eqeq($$$('RUBY_ENGINE'), "jruby")) {
34995
+
34996
+ $def(self, '$root?', function $PathResolver_root$ques$3(path) {
34997
+ var self = this, $ret_or_1 = nil;
34998
+
34999
+ if ($truthy(($ret_or_1 = self['$absolute_path?'](path)))) {
35000
+ return $ret_or_1
35001
+ } else {
35002
+
35003
+ return path['$start_with?']($$('URI_CLASSLOADER'));
35004
+ }
35005
+ })
34971
35006
  } else {
34972
35007
  $alias(self, "root?", "absolute_path?")
34973
35008
  };
34974
35009
 
34975
- $def(self, '$unc?', function $PathResolver_unc$ques$3(path) {
35010
+ $def(self, '$unc?', function $PathResolver_unc$ques$4(path) {
34976
35011
 
34977
35012
  return path['$start_with?']($$('DOUBLE_SLASH'))
34978
35013
  });
34979
35014
 
34980
- $def(self, '$web_root?', function $PathResolver_web_root$ques$4(path) {
35015
+ $def(self, '$web_root?', function $PathResolver_web_root$ques$5(path) {
34981
35016
 
34982
35017
  return path['$start_with?']($$('SLASH'))
34983
35018
  });
34984
35019
 
34985
- $def(self, '$descends_from?', function $PathResolver_descends_from$ques$5(path, base) {
35020
+ $def(self, '$descends_from?', function $PathResolver_descends_from$ques$6(path, base) {
34986
35021
  var $ret_or_1 = nil;
34987
35022
 
34988
35023
  if ($eqeq(base, path)) {
@@ -35048,7 +35083,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
35048
35083
  if ($truthy(path['$include?']($$('DOT_DOT')))) {
35049
35084
 
35050
35085
  resolved_segments = [];
35051
- $send(path_segments, 'each', [], function $$6(segment){
35086
+ $send(path_segments, 'each', [], function $$7(segment){
35052
35087
 
35053
35088
  if (segment == null) segment = nil;
35054
35089
  if ($eqeq(segment, $$('DOT_DOT'))) {
@@ -35082,6 +35117,8 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
35082
35117
  root = $$('DOUBLE_SLASH')
35083
35118
  } else if ($truthy(posix_path['$start_with?']($$('SLASH')))) {
35084
35119
  root = $$('SLASH')
35120
+ } else if ($truthy(posix_path['$start_with?']($$('URI_CLASSLOADER')))) {
35121
+ root = posix_path.$slice(0, $$('URI_CLASSLOADER').$length())
35085
35122
  } else {
35086
35123
  root = posix_path.$slice(0, $rb_plus(posix_path.$index($$('SLASH')), 1))
35087
35124
  }
@@ -35190,7 +35227,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
35190
35227
  $b = self.$partition_path(jail), $a = $to_ary($b), (jail_segments = ($a[0] == null ? nil : $a[0])), $b
35191
35228
  };
35192
35229
  warned = false;
35193
- $send(unresolved_segments, 'each', [], function $$7(segment){var self = $$7.$$s == null ? this : $$7.$$s;
35230
+ $send(unresolved_segments, 'each', [], function $$8(segment){var self = $$8.$$s == null ? this : $$8.$$s;
35194
35231
 
35195
35232
 
35196
35233
  if (segment == null) segment = nil;
@@ -35212,7 +35249,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
35212
35249
  return resolved_segments['$<<'](segment)
35213
35250
  };}, {$$s: self});
35214
35251
  } else {
35215
- $send(unresolved_segments, 'each', [], function $$8(segment){
35252
+ $send(unresolved_segments, 'each', [], function $$9(segment){
35216
35253
 
35217
35254
  if (segment == null) segment = nil;
35218
35255
  if ($eqeq(segment, $$('DOT_DOT'))) {
@@ -35254,7 +35291,7 @@ Opal.modules["asciidoctor/path_resolver"] = function(Opal) {/* Generated by Opal
35254
35291
  };
35255
35292
  $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;
35256
35293
  resolved_segments = [];
35257
- $send(target_segments, 'each', [], function $$9(segment){
35294
+ $send(target_segments, 'each', [], function $$10(segment){
35258
35295
 
35259
35296
  if (segment == null) segment = nil;
35260
35297
  if ($eqeq(segment, $$('DOT_DOT'))) {
@@ -35299,7 +35336,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
35299
35336
  "use strict";
35300
35337
  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.$$$;
35301
35338
 
35302
- 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');
35339
+ 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');
35303
35340
  return (function($base, $parent_nesting) {
35304
35341
  var self = $module($base, 'Asciidoctor');
35305
35342
 
@@ -35426,25 +35463,24 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
35426
35463
  });
35427
35464
 
35428
35465
  $def(self, '$peek_line', function $$peek_line(direct) {
35429
- var self = this, line = nil, $ret_or_1 = nil;
35466
+ var self = this, next_line = nil, line = nil;
35430
35467
 
35431
35468
 
35432
35469
  if (direct == null) direct = false;
35433
- if (($truthy(direct) || ($truthy($rb_gt(self.look_ahead, 0))))) {
35434
- if ($truthy(self.unescape_next_line)) {
35435
-
35436
- return (line = self.lines['$[]'](-1)).$slice(1, line.$length());
35470
+ while ($truthy(true)) {
35471
+
35472
+ next_line = self.lines['$[]'](-1);
35473
+ if (($truthy(direct) || ($truthy($rb_gt(self.look_ahead, 0))))) {
35474
+ return ($truthy(self.unescape_next_line) ? (next_line.$slice(1, next_line.$length())) : (next_line))
35475
+ } else if ($truthy(next_line)) {
35476
+ if ($truthy((line = self.$process_line(next_line)))) {
35477
+ return line
35478
+ }
35437
35479
  } else {
35438
- return self.lines['$[]'](-1)
35439
- }
35440
- } else if ($truthy(self.lines['$empty?']())) {
35441
-
35442
- self.look_ahead = 0;
35443
- return nil;
35444
- } else if ($truthy(($ret_or_1 = self.$process_line(self.lines['$[]'](-1))))) {
35445
- return $ret_or_1
35446
- } else {
35447
- return self.$peek_line()
35480
+
35481
+ self.look_ahead = 0;
35482
+ return nil;
35483
+ };
35448
35484
  };
35449
35485
  }, -1);
35450
35486
 
@@ -36602,6 +36638,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
36602
36638
  };
36603
36639
  } else {
36604
36640
 
36641
+ inc_content = nil;
36642
+
36605
36643
  try {
36606
36644
 
36607
36645
  inc_content = $send(reader, 'call', [inc_path, read_mode], function $$30(f){
@@ -36609,7 +36647,6 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
36609
36647
  if (f == null) f = nil;
36610
36648
  return f.$read();});
36611
36649
  self.$shift();
36612
- self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
36613
36650
  } catch ($err) {
36614
36651
  if (Opal.rescue($err, [$$('StandardError')])) {
36615
36652
  try {
@@ -36618,7 +36655,8 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {/* Generated by Opal 1.7.3
36618
36655
  return self.$replace_next_line("Unresolved directive in " + (self.path) + " - include::" + (expanded_target) + "[" + (attrlist) + "]");
36619
36656
  } finally { Opal.pop_exception(); }
36620
36657
  } else { throw $err; }
36621
- };
36658
+ };;
36659
+ self.$push_include(inc_content, inc_path, relpath, 1, parsed_attrs);
36622
36660
  };
36623
36661
  return true;
36624
36662
  } else {
@@ -39362,7 +39400,7 @@ Opal.modules["asciidoctor/converter/html5"] = function(Opal) {/* Generated by Op
39362
39400
  };
39363
39401
  id_attribute = ($truthy(node.$id()) ? (" id=\"" + (node.$id()) + "\"") : (""));
39364
39402
  title_element = ($truthy(node['$title?']()) ? ("<div class=\"title\">" + (node.$captioned_title()) + "</div>\n") : (""));
39365
- 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>";
39403
+ 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>";
39366
39404
  });
39367
39405
 
39368
39406
  $def(self, '$convert_literal', function $$convert_literal(node) {
@@ -42623,7 +42661,7 @@ AbstractBlock.prototype.setStyle = function (style) {
42623
42661
  /**
42624
42662
  * Get the location in the AsciiDoc source where this block begins.
42625
42663
  *
42626
- * @returns {string} - the style for this block
42664
+ * @returns {Cursor} - the location in the AsciiDoc source where this block begins
42627
42665
  * @memberof AbstractBlock
42628
42666
  */
42629
42667
  AbstractBlock.prototype.getSourceLocation = function () {
@@ -47601,7 +47639,7 @@ Extensions.newBlockMacroProcessor = function (name, functions) {
47601
47639
  }
47602
47640
 
47603
47641
 
47604
- var ASCIIDOCTOR_JS_VERSION = '3.0.0-rc.1';
47642
+ var ASCIIDOCTOR_JS_VERSION = '3.0.0';
47605
47643
 
47606
47644
  /**
47607
47645
  * Get Asciidoctor.js version number.