@asciidoctor/tabs
Advanced tools
Comparing version 1.0.0-beta.5 to 1.0.0-beta.6
@@ -9,5 +9,5 @@ /* Generated by Opal 0.11.99.dev */ | ||
} | ||
var self = Opal.top, $nesting = [], nil = Opal.nil, $$$ = Opal.const_get_qualified, $$ = Opal.const_get_relative, $breaker = Opal.breaker, $slice = Opal.slice, $module = Opal.module, $klass = Opal.klass, $hash2 = Opal.hash2, $truthy = Opal.truthy, $send = Opal.send; | ||
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, $truthy = Opal.truthy, $hash2 = Opal.hash2, $send = Opal.send; | ||
Opal.add_stubs(['$use_dsl', '$on_context', '$counter', '$document', '$create_block', '$[]', '$blocks', '$parse_content', '$==', '$size', '$context', '$items?', '$reset_counter', '$-', '$attr?', '$id', '$register', '$id=', '$reftext?', '$set_attr', '$<<', '$generate_id', '$+', '$!', '$option?', '$gsub', '$title=', '$create_open_block', '$create_list', '$backend', '$list_item_supports_id?', '$each', '$items', '$map', '$text', '$instance_variable_get', '$text=', '$role=', '$text?', '$create_paragraph', '$blocks?', '$style', '$title?', '$any?', '$keys', '$attributes', '$!=', '$push', '$[]=', '$join', '$create_html_fragment', '$private', '$delete', '$instance_variable_defined?', '$converter', '$convert', '$tap', '$create_list_item', '$instance_variable_set', '$include?', '$counters', '$attribute_locked?']); | ||
Opal.add_stubs(['$use_dsl', '$on_context', '$document', '$attr?', '$create_open_block', '$counter', '$create_block', '$[]', '$blocks', '$parse_content', '$==', '$size', '$context', '$items?', '$reset_counter', '$-', '$generate_id', '$+', '$!', '$option?', '$gsub', '$key?', '$[]=', '$title=', '$create_list', '$backend', '$list_item_supports_id?', '$each', '$items', '$map', '$<<', '$text', '$instance_variable_get', '$id=', '$text=', '$role=', '$set_attr', '$register', '$text?', '$create_paragraph', '$blocks?', '$style', '$id', '$title?', '$any?', '$keys', '$attributes', '$!=', '$push', '$join', '$create_html_fragment', '$private', '$delete', '$instance_variable_defined?', '$converter', '$convert', '$tap', '$create_list_item', '$instance_variable_set', '$include?', '$counters', '$attribute_locked?']); | ||
return (function($base, $parent_nesting) { | ||
@@ -33,6 +33,11 @@ var self = $module($base, 'Asciidoctor'); | ||
Opal.def(self, '$process', $Block_process$1 = function $$process(parent, reader, attrs) { | ||
var $a, $b, $$2, $$5, self = this, tabs_number = nil, doc = nil, block = nil, children = nil, seed_tabs = nil, id = nil, $writer = nil, reftext = nil, tabs_id = nil, tabs_role = nil, gid = nil, tabs_user_role = nil, tabs = nil, tablist = nil, panes = nil, set_id_on_tab = nil; | ||
var $a, $b, $$2, $$5, self = this, doc = nil, tabs_number = nil, block = nil, children = nil, seed_tabs = nil, tabs_id = nil, tabs_role = nil, gid = nil, tabs_user_role = nil, tabs_attrs = nil, $writer = nil, tabs = nil, tablist = nil, panes = nil, set_id_on_tab = nil; | ||
tabs_number = (doc = parent.$document()).$counter("tabs-number"); | ||
doc = parent.$document(); | ||
if ($truthy(doc['$attr?']("filetype", "html"))) { | ||
} else { | ||
return self.$create_open_block(parent, nil, attrs) | ||
}; | ||
tabs_number = doc.$counter("tabs-number"); | ||
block = self.$create_block(parent, attrs['$[]']("cloaked-context"), nil, attrs, $hash2(["content_model"], {"content_model": "compound"})); | ||
@@ -44,16 +49,2 @@ children = self.$parse_content(block, reader).$blocks(); | ||
}; | ||
if ($truthy(doc['$attr?']("filetype", "html"))) { | ||
} else { | ||
if ($truthy(seed_tabs.$id())) { | ||
} else { | ||
($truthy($a = (id = attrs['$[]']("id"))) ? doc.$register("refs", [(($writer = [id]), $send(seed_tabs, 'id=', Opal.to_a($writer)), $writer[$rb_minus($writer["length"], 1)]), seed_tabs]) : $a) | ||
}; | ||
if ($truthy(seed_tabs['$reftext?']())) { | ||
} else { | ||
($truthy($a = (reftext = attrs['$[]']("reftext"))) ? seed_tabs.$set_attr("reftext", reftext) : $a) | ||
}; | ||
parent['$<<'](seed_tabs); | ||
return self.$reset_counter(doc, "tabs-number", $rb_minus(tabs_number, 1)); | ||
}; | ||
tabs_id = ($truthy($a = attrs['$[]']("id")) ? $a : self.$generate_id("" + "tabs " + (tabs_number), doc)); | ||
@@ -75,5 +66,11 @@ tabs_role = $rb_plus("tabs", (function() {if ($truthy(($truthy($a = block['$option?']("nosync")['$!']()) ? ($truthy($b = block['$option?']("sync")) ? $b : doc['$option?']("tabs-sync")) : $a))) { | ||
}; return nil; })()); | ||
tabs_attrs = $hash2(["id", "role"], {"id": tabs_id, "role": tabs_role}); | ||
if ($truthy(attrs['$key?']("attribute_entries"))) { | ||
$writer = ["attribute_entries", attrs['$[]']("attribute_entries")]; | ||
$send(tabs_attrs, '[]=', Opal.to_a($writer)); | ||
$writer[$rb_minus($writer["length"], 1)];}; | ||
$writer = [attrs['$[]']("title")]; | ||
$send((tabs = self.$create_open_block(parent, nil, $hash2(["id", "role"], {"id": tabs_id, "role": tabs_role}))), 'title=', Opal.to_a($writer)); | ||
$send((tabs = self.$create_open_block(parent, nil, tabs_attrs)), 'title=', Opal.to_a($writer)); | ||
$writer[$rb_minus($writer["length"], 1)];; | ||
@@ -80,0 +77,0 @@ tablist = self.$create_list(parent, "ulist", $hash2(["role"], {"role": "tablist"})); |
{ | ||
"name": "@asciidoctor/tabs", | ||
"version": "1.0.0-beta.5", | ||
"version": "1.0.0-beta.6", | ||
"description": "An Asciidoctor.js extension that adds a tabs block to the AsciiDoc syntax.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
34039
559