@asciidoctor/core 2.2.7 → 2.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/asciidoctor.js +74 -41
- package/dist/browser/asciidoctor.min.js +1373 -1371
- package/dist/graalvm/asciidoctor.js +73 -40
- package/dist/node/asciidoctor.js +73 -40
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Asciidoctor.js 2.2.
|
|
2
|
+
* @license Asciidoctor.js 2.2.8 | MIT | https://github.com/asciidoctor/asciidoctor.js
|
|
3
3
|
*/
|
|
4
4
|
(function(undefined) {
|
|
5
5
|
// @note
|
|
@@ -23073,7 +23073,11 @@ Opal.modules["asciidoctor/rx"] = function(Opal) {
|
|
|
23073
23073
|
Opal.const_set($nesting[0], 'InlineImageMacroRx', new RegExp("" + "\\\\?i(?:mage|con):([^:\\s\\[](?:[^\\n\\[]*[^\\s\\[])?)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
23074
23074
|
Opal.const_set($nesting[0], 'InlineIndextermMacroRx', new RegExp("" + "\\\\?(?:(indexterm2?):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|\\(\\((" + ($$($nesting, 'CC_ALL')) + "+?)\\)\\)(?!\\)))", 'm'));
|
|
23075
23075
|
Opal.const_set($nesting[0], 'InlineKbdBtnMacroRx', new RegExp("" + "(\\\\)?(kbd|btn):\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
23076
|
-
|
|
23076
|
+
if ($$($nesting, 'RUBY_ENGINE')['$==']("opal")) {
|
|
23077
|
+
Opal.const_set($nesting[0], 'InlineLinkRx', new RegExp("" + "(^|link:|" + ($$($nesting, 'CG_BLANK')) + "|\\\\?<(?=\\\\?(?:https?|file|ftp|irc)(:))|[>\\(\\)\\[\\];\"'])(\\\\?(?:https?|file|ftp|irc)://)(?:([^\\s\\[\\]]+)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]|(?!\\2)([^\\s]+?)>|([^\\s\\[\\]<]*([^\\s,.?!\\[\\]<\\)])))"))
|
|
23078
|
+
} else {
|
|
23079
|
+
nil
|
|
23080
|
+
};
|
|
23077
23081
|
Opal.const_set($nesting[0], 'InlineLinkMacroRx', new RegExp("" + "\\\\?(?:link|(mailto)):(|[^:\\s\\[][^\\s\\[]*)\\[(|" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
23078
23082
|
Opal.const_set($nesting[0], 'MacroNameRx', new RegExp("" + "^" + ($$($nesting, 'CG_WORD')) + "[" + ($$($nesting, 'CC_WORD')) + "-]*$"));
|
|
23079
23083
|
Opal.const_set($nesting[0], 'InlineStemMacroRx', new RegExp("" + "\\\\?(stem|(?:latex|ascii)math):([a-z]+(?:,[a-z-]+)*)?\\[(" + ($$($nesting, 'CC_ALL')) + "*?[^\\\\])\\]", 'm'));
|
|
@@ -23765,10 +23769,11 @@ Opal.modules["asciidoctor/substitutors"] = function(Opal) {
|
|
|
23765
23769
|
return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice(1, (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length());};
|
|
23766
23770
|
if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](3))['$start_with?']($$($nesting, 'RS')))) {
|
|
23767
23771
|
return "" + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](1))) + ((($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$slice($rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](1)).$length(), 1), (($c = $gvars['~']) === nil ? nil : $c['$[]'](0)).$length()));};
|
|
23768
|
-
|
|
23769
|
-
|
|
23770
|
-
return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));
|
|
23771
|
-
|
|
23772
|
+
if ($truthy((($c = $gvars['~']) === nil ? nil : $c['$[]'](6)))) {
|
|
23773
|
+
} else {
|
|
23774
|
+
return (($c = $gvars['~']) === nil ? nil : $c['$[]'](0));
|
|
23775
|
+
};
|
|
23776
|
+
doc.$register("links", (target = $rb_plus((($c = $gvars['~']) === nil ? nil : $c['$[]'](3)), (($c = $gvars['~']) === nil ? nil : $c['$[]'](6)))));
|
|
23772
23777
|
link_text = (function() {if ($truthy(doc_attrs['$key?']("hide-uri-scheme"))) {
|
|
23773
23778
|
|
|
23774
23779
|
return target.$sub($$($nesting, 'UriSniffRx'), "");
|
|
@@ -25069,7 +25074,7 @@ Opal.modules["asciidoctor/version"] = function(Opal) {
|
|
|
25069
25074
|
|
|
25070
25075
|
var $nesting = [self].concat($parent_nesting);
|
|
25071
25076
|
|
|
25072
|
-
Opal.const_set($nesting[0], 'VERSION', "2.0.
|
|
25077
|
+
Opal.const_set($nesting[0], 'VERSION', "2.0.23")
|
|
25073
25078
|
})($nesting[0], $nesting)
|
|
25074
25079
|
};
|
|
25075
25080
|
|
|
@@ -29327,7 +29332,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
29327
29332
|
}
|
|
29328
29333
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $send = Opal.send, $truthy = Opal.truthy, $hash2 = Opal.hash2, $gvars = Opal.gvars;
|
|
29329
29334
|
|
|
29330
|
-
Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$extend', '$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', '$context', '$empty?', '$header?', '$!=', '$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', '$%']);
|
|
29335
|
+
Opal.add_stubs(['$include', '$new', '$proc', '$start_with?', '$match?', '$is_delimited_block?', '$extend', '$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', '$context', '$empty?', '$header?', '$!=', '$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?', '$close_table', '$columns', '$assign_column_widths', '$partition_header_footer', '$upto', '$partition', '$shorthand_property_syntax', '$each_char', '$yield_buffered_attribute', '$any?', '$*', '$each_byte', '$%']);
|
|
29331
29336
|
return (function($base, $parent_nesting) {
|
|
29332
29337
|
var self = $module($base, 'Asciidoctor');
|
|
29333
29338
|
|
|
@@ -31075,6 +31080,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
31075
31080
|
};
|
|
31076
31081
|
if ($truthy(interrupt)) {
|
|
31077
31082
|
|
|
31083
|
+
this_line = nil;
|
|
31078
31084
|
reader.$unshift_lines(block_attribute_lines);
|
|
31079
31085
|
break;;};
|
|
31080
31086
|
} else if ($truthy((($b = continuation['$==']("active")) ? this_line['$empty?']()['$!']() : continuation['$==']("active")))) {
|
|
@@ -32218,6 +32224,7 @@ Opal.modules["asciidoctor/parser"] = function(Opal) {
|
|
|
32218
32224
|
}
|
|
32219
32225
|
};
|
|
32220
32226
|
};
|
|
32227
|
+
parser_ctx.$close_table();
|
|
32221
32228
|
if ($truthy(($truthy($a = (($logical_op_recvr_tmp_2 = table.$attributes()), ($truthy($b = $logical_op_recvr_tmp_2['$[]']("colcount")) ? $b : (($writer = ["colcount", table.$columns().$size()]), $send($logical_op_recvr_tmp_2, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)])))['$=='](0)) ? $a : explicit_colspecs))) {
|
|
32222
32229
|
} else {
|
|
32223
32230
|
table.$assign_column_widths()
|
|
@@ -33824,7 +33831,7 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
|
|
|
33824
33831
|
|
|
33825
33832
|
var $nesting = [self].concat($parent_nesting), $PreprocessorReader_initialize$47, $PreprocessorReader_has_more_lines$ques$48, $PreprocessorReader_empty$ques$49, $PreprocessorReader_peek_line$50, $PreprocessorReader_push_include$51, $PreprocessorReader_include_depth$52, $PreprocessorReader_exceeds_max_depth$ques$53, $PreprocessorReader_shift$54, $PreprocessorReader_include_processors$ques$55, $PreprocessorReader_create_include_cursor$56, $PreprocessorReader_to_s$57, $PreprocessorReader_prepare_lines$59, $PreprocessorReader_process_line$60, $PreprocessorReader_preprocess_conditional_directive$61, $PreprocessorReader_preprocess_include_directive$66, $PreprocessorReader_resolve_include_path$80, $PreprocessorReader_pop_include$82, $PreprocessorReader_split_delimited_value$83, $PreprocessorReader_skip_front_matter$excl$84, $PreprocessorReader_resolve_expr_val$85;
|
|
33826
33833
|
|
|
33827
|
-
self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.
|
|
33834
|
+
self.$$prototype.include_stack = self.$$prototype.lines = self.$$prototype.file = self.$$prototype.dir = self.$$prototype.path = self.$$prototype.lineno = self.$$prototype.maxdepth = self.$$prototype.process_lines = self.$$prototype.includes = self.$$prototype.document = self.$$prototype.unescape_next_line = self.$$prototype.include_processor_extensions = self.$$prototype.skipping = self.$$prototype.look_ahead = self.$$prototype.conditional_stack = nil;
|
|
33828
33835
|
|
|
33829
33836
|
self.$attr_reader("include_stack");
|
|
33830
33837
|
|
|
@@ -34110,6 +34117,10 @@ Opal.modules["asciidoctor/reader"] = function(Opal) {
|
|
|
34110
34117
|
};
|
|
34111
34118
|
if ($truthy(line['$empty?']())) {
|
|
34112
34119
|
|
|
34120
|
+
if ($truthy(self.skipping)) {
|
|
34121
|
+
|
|
34122
|
+
self.$shift();
|
|
34123
|
+
return nil;};
|
|
34113
34124
|
self.look_ahead = $rb_plus(self.look_ahead, 1);
|
|
34114
34125
|
return line;};
|
|
34115
34126
|
if ($truthy(($truthy($a = ($truthy($b = line['$end_with?']("]")) ? line['$start_with?']("[")['$!']() : $b)) ? line['$include?']("::") : $a))) {
|
|
@@ -35210,7 +35221,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35210
35221
|
}
|
|
35211
35222
|
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $send = Opal.send, $truthy = Opal.truthy, $gvars = Opal.gvars;
|
|
35212
35223
|
|
|
35213
|
-
Opal.add_stubs(['$attr_accessor', '$attr_reader', '$new', '$[]', '$>', '$to_i', '$<', '$==', '$[]=', '$-', '$attributes', '$truncate', '$*', '$/', '$to_f', '$empty?', '$body', '$each', '$<<', '$size', '$+', '$assign_column_widths', '$warn', '$logger', '$update_attributes', '$assign_width', '$round', '$map', '$shift', '$reinitialize', '$head=', '$nil?', '$unshift', '$pop', '$foot=', '$parent', '$sourcemap', '$dup', '$header_row?', '$table', '$style', '$merge', '$delete', '$===', '$start_with?', '$rstrip', '$slice', '$length', '$advance', '$lstrip', '$strip', '$split', '$include?', '$readlines', '$catalog_inline_anchor', '$=~', '$apply_subs', '$attr_writer', '$convert', '$text', '$!=', '$file', '$lineno', '$include', '$to_set', '$mark', '$key?', '$nested?', '$document', '$error', '$message_with_context', '$cursor_at_prev_line', '$nil_or_empty?', '$escape', '$columns', '$match', '$chop', '$end_with?', '$gsub', '$!', '$push_cellspec', '$cell_open?', '$close_cell', '$take_cellspec', '$squeeze', '$upto', '$times', '$cursor_before_mark', '$rowspan', '$activate_rowspan', '$colspan', '$end_of_row?', '$close_row', '$private', '$rows', '$effective_column_visits']);
|
|
35224
|
+
Opal.add_stubs(['$attr_accessor', '$attr_reader', '$new', '$[]', '$>', '$to_i', '$<', '$==', '$[]=', '$-', '$attributes', '$truncate', '$*', '$/', '$to_f', '$empty?', '$body', '$each', '$<<', '$size', '$+', '$assign_column_widths', '$warn', '$logger', '$update_attributes', '$assign_width', '$round', '$map', '$shift', '$reinitialize', '$head=', '$nil?', '$unshift', '$pop', '$foot=', '$parent', '$sourcemap', '$dup', '$header_row?', '$table', '$style', '$merge', '$delete', '$===', '$start_with?', '$rstrip', '$slice', '$length', '$advance', '$lstrip', '$strip', '$split', '$include?', '$readlines', '$catalog_inline_anchor', '$=~', '$apply_subs', '$attr_writer', '$convert', '$text', '$!=', '$file', '$lineno', '$include', '$to_set', '$mark', '$key?', '$nested?', '$document', '$error', '$message_with_context', '$cursor_at_prev_line', '$nil_or_empty?', '$escape', '$columns', '$match', '$chop', '$end_with?', '$gsub', '$!', '$push_cellspec', '$cell_open?', '$close_cell', '$take_cellspec', '$squeeze', '$upto', '$times', '$cursor_before_mark', '$rowspan', '$activate_rowspan', '$colspan', '$end_of_row?', '$close_row', '$private', '$rows', '$<=>', '$effective_column_visits']);
|
|
35214
35225
|
return (function($base, $parent_nesting) {
|
|
35215
35226
|
var self = $module($base, 'Asciidoctor');
|
|
35216
35227
|
|
|
@@ -35626,7 +35637,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35626
35637
|
if ($truthy(inner_document_lines['$empty?']())) {
|
|
35627
35638
|
} else if ($truthy((unprocessed_line1 = inner_document_lines['$[]'](0))['$include?']("::"))) {
|
|
35628
35639
|
|
|
35629
|
-
preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1]).$readlines();
|
|
35640
|
+
preprocessed_lines = $$($nesting, 'PreprocessorReader').$new(self.document, [unprocessed_line1], inner_document_cursor).$readlines();
|
|
35630
35641
|
if ($truthy((($a = unprocessed_line1['$=='](preprocessed_lines['$[]'](0))) ? $rb_lt(preprocessed_lines.$size(), 2) : unprocessed_line1['$=='](preprocessed_lines['$[]'](0))))) {
|
|
35631
35642
|
} else {
|
|
35632
35643
|
|
|
@@ -35774,9 +35785,9 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35774
35785
|
(function($base, $super, $parent_nesting) {
|
|
35775
35786
|
var self = $klass($base, $super, 'ParserContext');
|
|
35776
35787
|
|
|
35777
|
-
var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$30, $ParserContext_starts_with_delimiter$ques$31, $ParserContext_match_delimiter$32, $ParserContext_skip_past_delimiter$33, $ParserContext_skip_past_escaped_delimiter$34, $ParserContext_buffer_has_unclosed_quotes$ques$35, $ParserContext_take_cellspec$36, $ParserContext_push_cellspec$37, $ParserContext_keep_cell_open$38, $ParserContext_mark_cell_closed$39, $ParserContext_cell_open$ques$40, $ParserContext_cell_closed$ques$41, $ParserContext_close_open_cell$42, $ParserContext_close_cell$43, $
|
|
35788
|
+
var $nesting = [self].concat($parent_nesting), $ParserContext_initialize$30, $ParserContext_starts_with_delimiter$ques$31, $ParserContext_match_delimiter$32, $ParserContext_skip_past_delimiter$33, $ParserContext_skip_past_escaped_delimiter$34, $ParserContext_buffer_has_unclosed_quotes$ques$35, $ParserContext_take_cellspec$36, $ParserContext_push_cellspec$37, $ParserContext_keep_cell_open$38, $ParserContext_mark_cell_closed$39, $ParserContext_cell_open$ques$40, $ParserContext_cell_closed$ques$41, $ParserContext_close_open_cell$42, $ParserContext_close_cell$43, $ParserContext_close_table$46, $ParserContext_close_row$47, $ParserContext_activate_rowspan$48, $ParserContext_end_of_row$ques$50, $ParserContext_effective_column_visits$51, $ParserContext_advance$52;
|
|
35778
35789
|
|
|
35779
|
-
self.$$prototype.delimiter = self.$$prototype.delimiter_rx = self.$$prototype.buffer = self.$$prototype.cellspecs = self.$$prototype.cell_open = self.$$prototype.format = self.$$prototype.start_cursor_data = self.$$prototype.reader = self.$$prototype.
|
|
35790
|
+
self.$$prototype.delimiter = self.$$prototype.delimiter_rx = self.$$prototype.buffer = self.$$prototype.cellspecs = self.$$prototype.cell_open = self.$$prototype.format = self.$$prototype.start_cursor_data = self.$$prototype.reader = self.$$prototype.column_visits = self.$$prototype.table = self.$$prototype.current_row = self.$$prototype.colcount = self.$$prototype.active_rowspans = self.$$prototype.linenum = nil;
|
|
35780
35791
|
|
|
35781
35792
|
self.$include($$($nesting, 'Logging'));
|
|
35782
35793
|
Opal.const_set($nesting[0], 'FORMATS', ["psv", "csv", "dsv", "tsv"].$to_set());
|
|
@@ -35965,8 +35976,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
35965
35976
|
return nil;
|
|
35966
35977
|
}, $ParserContext_close_open_cell$42.$$arity = -1);
|
|
35967
35978
|
|
|
35968
|
-
Opal.def(self, '$close_cell', $ParserContext_close_cell$43 = function $$close_cell(eol) {
|
|
35969
|
-
|
|
35979
|
+
Opal.def(self, '$close_cell', $ParserContext_close_cell$43 = function $$close_cell(eol) {
|
|
35970
35980
|
var $a, $b, $$44, self = this, cell_text = nil, cellspec = nil, repeat = nil, q = nil;
|
|
35971
35981
|
|
|
35972
35982
|
|
|
@@ -36005,7 +36015,7 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
36005
36015
|
cell_text = cell_text.$squeeze(q)
|
|
36006
36016
|
}};
|
|
36007
36017
|
};
|
|
36008
|
-
$send((1), 'upto', [repeat], ($$44 = function(i){var self = $$44.$$s || this, $c, $d, $$45, $e, column = nil, extra_cols = nil, offset = nil, cell = nil;
|
|
36018
|
+
$send((1), 'upto', [repeat], ($$44 = function(i){var self = $$44.$$s || this, $c, $d, $$45, $e, column = nil, extra_cols = nil, offset = nil, cell = nil, cursor_before_mark = nil, row_status = nil;
|
|
36009
36019
|
if (self.colcount == null) self.colcount = nil;
|
|
36010
36020
|
if (self.table == null) self.table = nil;
|
|
36011
36021
|
if (self.current_row == null) self.current_row = nil;
|
|
@@ -36033,13 +36043,10 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
36033
36043
|
j = nil;
|
|
36034
36044
|
};
|
|
36035
36045
|
return self.table.$columns()['$<<']($$$($$($nesting, 'Table'), 'Column').$new(self.table, $rb_plus(offset, j)));}, $$45.$$s = self, $$45.$$arity = 1, $$45));};
|
|
36036
|
-
} else if ($truthy((column = self.table.$columns()['$[]'](self.current_row.$size())))) {
|
|
36037
36046
|
} else {
|
|
36038
|
-
|
|
36039
|
-
self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": self.reader.$cursor_before_mark()})));
|
|
36040
|
-
Opal.ret(nil);
|
|
36047
|
+
column = self.table.$columns()['$[]'](self.current_row.$size())
|
|
36041
36048
|
};
|
|
36042
|
-
cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": self.reader.$cursor_before_mark()}));
|
|
36049
|
+
cell = $$$($$($nesting, 'Table'), 'Cell').$new(column, cell_text, cellspec, $hash2(["cursor"], {"cursor": (cursor_before_mark = self.reader.$cursor_before_mark())}));
|
|
36043
36050
|
self.reader.$mark();
|
|
36044
36051
|
if ($truthy(($truthy($c = cell.$rowspan()['$!']()) ? $c : cell.$rowspan()['$=='](1)))) {
|
|
36045
36052
|
} else {
|
|
@@ -36047,22 +36054,44 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
36047
36054
|
};
|
|
36048
36055
|
self.column_visits = $rb_plus(self.column_visits, ($truthy($c = cell.$colspan()) ? $c : 1));
|
|
36049
36056
|
self.current_row['$<<'](cell);
|
|
36050
|
-
if ($truthy(($truthy($c = self['$end_of_row?']()) ? ($truthy($d = ($truthy($e = self.colcount['$!='](-1)) ? $e : $rb_gt(self.linenum, 0))) ? $d : ($truthy($e = eol) ? i['$=='](repeat) : $e)) : $c))) {
|
|
36051
|
-
|
|
36057
|
+
if ($truthy(($truthy($c = $rb_gt((row_status = self['$end_of_row?']()), -1)) ? ($truthy($d = ($truthy($e = self.colcount['$!='](-1)) ? $e : $rb_gt(self.linenum, 0))) ? $d : ($truthy($e = eol) ? i['$=='](repeat) : $e)) : $c))) {
|
|
36058
|
+
if ($truthy($rb_gt(row_status, 0))) {
|
|
36059
|
+
|
|
36060
|
+
self.$logger().$error(self.$message_with_context("dropping cell because it exceeds specified number of columns", $hash2(["source_location"], {"source_location": cursor_before_mark})));
|
|
36061
|
+
return self.$close_row(true);
|
|
36062
|
+
} else {
|
|
36063
|
+
return self.$close_row()
|
|
36064
|
+
}
|
|
36052
36065
|
} else {
|
|
36053
36066
|
return nil
|
|
36054
36067
|
};}, $$44.$$s = self, $$44.$$arity = 1, $$44));
|
|
36055
36068
|
self.cell_open = false;
|
|
36056
36069
|
return nil;
|
|
36057
|
-
} catch ($returner) { if ($returner === Opal.returner) { return $returner.$v } throw $returner; }
|
|
36058
36070
|
}, $ParserContext_close_cell$43.$$arity = -1);
|
|
36071
|
+
|
|
36072
|
+
Opal.def(self, '$close_table', $ParserContext_close_table$46 = function $$close_table() {
|
|
36073
|
+
var self = this;
|
|
36074
|
+
|
|
36075
|
+
|
|
36076
|
+
if (self.column_visits['$=='](0)) {
|
|
36077
|
+
return nil};
|
|
36078
|
+
self.$logger().$error(self.$message_with_context("dropping cells from incomplete row detected end of table", $hash2(["source_location"], {"source_location": self.reader.$cursor_before_mark()})));
|
|
36079
|
+
return nil;
|
|
36080
|
+
}, $ParserContext_close_table$46.$$arity = 0);
|
|
36059
36081
|
self.$private();
|
|
36060
36082
|
|
|
36061
|
-
Opal.def(self, '$close_row', $ParserContext_close_row$
|
|
36083
|
+
Opal.def(self, '$close_row', $ParserContext_close_row$47 = function $$close_row(drop) {
|
|
36062
36084
|
var $a, self = this, $writer = nil;
|
|
36063
36085
|
|
|
36064
36086
|
|
|
36065
|
-
|
|
36087
|
+
|
|
36088
|
+
if (drop == null) {
|
|
36089
|
+
drop = false;
|
|
36090
|
+
};
|
|
36091
|
+
if ($truthy(drop)) {
|
|
36092
|
+
} else {
|
|
36093
|
+
self.table.$rows().$body()['$<<'](self.current_row)
|
|
36094
|
+
};
|
|
36066
36095
|
if (self.colcount['$=='](-1)) {
|
|
36067
36096
|
self.colcount = self.column_visits};
|
|
36068
36097
|
self.column_visits = 0;
|
|
@@ -36070,13 +36099,13 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
36070
36099
|
self.active_rowspans.$shift();
|
|
36071
36100
|
($truthy($a = self.active_rowspans['$[]'](0)) ? $a : (($writer = [0, 0]), $send(self.active_rowspans, '[]=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]));
|
|
36072
36101
|
return nil;
|
|
36073
|
-
}, $ParserContext_close_row$
|
|
36102
|
+
}, $ParserContext_close_row$47.$$arity = -1);
|
|
36074
36103
|
|
|
36075
|
-
Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$
|
|
36076
|
-
var $$
|
|
36104
|
+
Opal.def(self, '$activate_rowspan', $ParserContext_activate_rowspan$48 = function $$activate_rowspan(rowspan, colspan) {
|
|
36105
|
+
var $$49, self = this;
|
|
36077
36106
|
|
|
36078
36107
|
|
|
36079
|
-
$send((1), 'upto', [$rb_minus(rowspan, 1)], ($$
|
|
36108
|
+
$send((1), 'upto', [$rb_minus(rowspan, 1)], ($$49 = function(i){var self = $$49.$$s || this, $a, $writer = nil;
|
|
36080
36109
|
if (self.active_rowspans == null) self.active_rowspans = nil;
|
|
36081
36110
|
|
|
36082
36111
|
|
|
@@ -36086,26 +36115,30 @@ Opal.modules["asciidoctor/table"] = function(Opal) {
|
|
|
36086
36115
|
};
|
|
36087
36116
|
$writer = [i, $rb_plus(($truthy($a = self.active_rowspans['$[]'](i)) ? $a : 0), colspan)];
|
|
36088
36117
|
$send(self.active_rowspans, '[]=', Opal.to_a($writer));
|
|
36089
|
-
return $writer[$rb_minus($writer["length"], 1)];}, $$
|
|
36118
|
+
return $writer[$rb_minus($writer["length"], 1)];}, $$49.$$s = self, $$49.$$arity = 1, $$49));
|
|
36090
36119
|
return nil;
|
|
36091
|
-
}, $ParserContext_activate_rowspan$
|
|
36120
|
+
}, $ParserContext_activate_rowspan$48.$$arity = 2);
|
|
36092
36121
|
|
|
36093
|
-
Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$
|
|
36094
|
-
var
|
|
36122
|
+
Opal.def(self, '$end_of_row?', $ParserContext_end_of_row$ques$50 = function() {
|
|
36123
|
+
var self = this;
|
|
36095
36124
|
|
|
36096
|
-
|
|
36097
|
-
|
|
36125
|
+
if (self.colcount['$=='](-1)) {
|
|
36126
|
+
return 0
|
|
36127
|
+
} else {
|
|
36128
|
+
return self.$effective_column_visits()['$<=>'](self.colcount)
|
|
36129
|
+
}
|
|
36130
|
+
}, $ParserContext_end_of_row$ques$50.$$arity = 0);
|
|
36098
36131
|
|
|
36099
|
-
Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$
|
|
36132
|
+
Opal.def(self, '$effective_column_visits', $ParserContext_effective_column_visits$51 = function $$effective_column_visits() {
|
|
36100
36133
|
var self = this;
|
|
36101
36134
|
|
|
36102
36135
|
return $rb_plus(self.column_visits, self.active_rowspans['$[]'](0))
|
|
36103
|
-
}, $ParserContext_effective_column_visits$
|
|
36104
|
-
return (Opal.def(self, '$advance', $ParserContext_advance$
|
|
36136
|
+
}, $ParserContext_effective_column_visits$51.$$arity = 0);
|
|
36137
|
+
return (Opal.def(self, '$advance', $ParserContext_advance$52 = function $$advance() {
|
|
36105
36138
|
var self = this;
|
|
36106
36139
|
|
|
36107
36140
|
return (self.linenum = $rb_plus(self.linenum, 1))
|
|
36108
|
-
}, $ParserContext_advance$
|
|
36141
|
+
}, $ParserContext_advance$52.$$arity = 0), nil) && 'advance';
|
|
36109
36142
|
})($$($nesting, 'Table'), null, $nesting);
|
|
36110
36143
|
})($nesting[0], $nesting)
|
|
36111
36144
|
};
|
|
@@ -47039,7 +47072,7 @@ Html5Converter.prototype.convert = function (node, transform, opts) {
|
|
|
47039
47072
|
}
|
|
47040
47073
|
|
|
47041
47074
|
|
|
47042
|
-
var ASCIIDOCTOR_JS_VERSION = '2.2.
|
|
47075
|
+
var ASCIIDOCTOR_JS_VERSION = '2.2.8';
|
|
47043
47076
|
|
|
47044
47077
|
/**
|
|
47045
47078
|
* Get Asciidoctor.js version number.
|