Everything, except Blocks, can be squshed
This commit is contained in:
parent
e8609fe833
commit
2721b55e84
@ -134,37 +134,49 @@ render_block_modifier(modifier)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
RV-Squash()
|
||||||
|
{block}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Stashing the given block under the given
|
* Stashing the given block under the given
|
||||||
* name to be aliased by a late level
|
* name to be aliased by a late level
|
||||||
* (See generate_aliases)
|
* (See generate_aliases)
|
||||||
*/
|
*/
|
||||||
RV-Element--name(name)
|
RV-Element--name(name)
|
||||||
if 'RV-Element' in called-from
|
if 'RV-Squash' in called-from
|
||||||
push(_block.alias.stash.RV-Element, {
|
|
||||||
name: name
|
|
||||||
block: block
|
|
||||||
})
|
|
||||||
else
|
|
||||||
{block}
|
{block}
|
||||||
|
else
|
||||||
|
if 'RV-Element' in called-from
|
||||||
|
push(_block.alias.stash.RV-Element, {
|
||||||
|
name: name
|
||||||
|
block: block
|
||||||
|
})
|
||||||
|
else
|
||||||
|
{block}
|
||||||
|
|
||||||
RV-Element__Modifier--name(name)
|
RV-Element__Modifier--name(name)
|
||||||
if 'RV-Element__Modifier' in called-from
|
if 'RV-Squash' in called-from
|
||||||
push(_block.alias.stash.RV-Element__Modifier, {
|
|
||||||
name: name
|
|
||||||
block: block
|
|
||||||
})
|
|
||||||
else
|
|
||||||
{block}
|
{block}
|
||||||
|
else
|
||||||
|
if 'RV-Element__Modifier' in called-from
|
||||||
|
push(_block.alias.stash.RV-Element__Modifier, {
|
||||||
|
name: name
|
||||||
|
block: block
|
||||||
|
})
|
||||||
|
else
|
||||||
|
{block}
|
||||||
|
|
||||||
RV-Block__Modifier--name(name)
|
RV-Block__Modifier--name(name)
|
||||||
if 'RV-Block__Modifier' in called-from
|
if 'RV-Squash' in called-from
|
||||||
push(_block.alias.stash.RV-Block__Modifier, {
|
|
||||||
name: name
|
|
||||||
block: block
|
|
||||||
})
|
|
||||||
else
|
|
||||||
{block}
|
{block}
|
||||||
|
else
|
||||||
|
if 'RV-Block__Modifier' in called-from
|
||||||
|
push(_block.alias.stash.RV-Block__Modifier, {
|
||||||
|
name: name
|
||||||
|
block: block
|
||||||
|
})
|
||||||
|
else
|
||||||
|
{block}
|
||||||
|
|
||||||
|
|
||||||
RV-Block(block_name)
|
RV-Block(block_name)
|
||||||
@ -181,48 +193,57 @@ RV-Block(block_name)
|
|||||||
|
|
||||||
|
|
||||||
RV-Block__Modifier(modifier_name=null)
|
RV-Block__Modifier(modifier_name=null)
|
||||||
blocks = generate_aliases(modifier_name)
|
if 'RV-Squash' in called-from
|
||||||
modifier_name = blocks.name
|
{block}
|
||||||
blocks = blocks.blocks
|
else
|
||||||
push(blocks, block)
|
blocks = generate_aliases(modifier_name)
|
||||||
|
modifier_name = blocks.name
|
||||||
modifier = {
|
blocks = blocks.blocks
|
||||||
name: modifier_name
|
push(blocks, block)
|
||||||
blocks: blocks
|
|
||||||
elements: _block.element_stash
|
modifier = {
|
||||||
}
|
name: modifier_name
|
||||||
_block.element_stash = create_list()
|
blocks: blocks
|
||||||
|
elements: _block.element_stash
|
||||||
push(_block.block_modifiers, modifier)
|
}
|
||||||
|
_block.element_stash = create_list()
|
||||||
|
|
||||||
|
push(_block.block_modifiers, modifier)
|
||||||
|
|
||||||
RV-Element(element_name=null)
|
RV-Element(element_name=null)
|
||||||
blocks = generate_aliases(element_name)
|
if 'RV-Squash' in called-from
|
||||||
|
{block}
|
||||||
element_name = blocks.name
|
|
||||||
blocks = blocks.blocks
|
|
||||||
push(blocks, block)
|
|
||||||
|
|
||||||
element = {
|
|
||||||
name: element_name
|
|
||||||
blocks: blocks
|
|
||||||
modifiers: _block.modifier_stash
|
|
||||||
}
|
|
||||||
_block.modifier_stash = create_list()
|
|
||||||
|
|
||||||
if is_direct_descendant_of_block()
|
|
||||||
push(_block.elements, element)
|
|
||||||
else
|
else
|
||||||
push(_block.element_stash, element)
|
blocks = generate_aliases(element_name)
|
||||||
|
|
||||||
|
element_name = blocks.name
|
||||||
|
blocks = blocks.blocks
|
||||||
|
push(blocks, block)
|
||||||
|
|
||||||
|
element = {
|
||||||
|
name: element_name
|
||||||
|
blocks: blocks
|
||||||
|
modifiers: _block.modifier_stash
|
||||||
|
}
|
||||||
|
_block.modifier_stash = create_list()
|
||||||
|
|
||||||
|
if is_direct_descendant_of_block()
|
||||||
|
push(_block.elements, element)
|
||||||
|
else
|
||||||
|
push(_block.element_stash, element)
|
||||||
|
|
||||||
|
|
||||||
RV-Element__Modifier(modifier_name=null)
|
RV-Element__Modifier(modifier_name=null)
|
||||||
blocks = generate_aliases(modifier_name)
|
if 'RV-Squash' in called-from
|
||||||
modifier_name = blocks.name
|
{block}
|
||||||
blocks = blocks.blocks
|
else
|
||||||
push(blocks, block)
|
blocks = generate_aliases(modifier_name)
|
||||||
|
modifier_name = blocks.name
|
||||||
modifier = {
|
blocks = blocks.blocks
|
||||||
name: modifier_name
|
push(blocks, block)
|
||||||
blocks: blocks
|
|
||||||
}
|
modifier = {
|
||||||
push(_block.modifier_stash, modifier)
|
name: modifier_name
|
||||||
|
blocks: blocks
|
||||||
|
}
|
||||||
|
push(_block.modifier_stash, modifier)
|
Loading…
Reference in New Issue
Block a user