Skip to main content

Module replace_list

Module replace_list 

Source
Expand description

Replacing a children list with stubs, existing blocks and new blocks, and parsing new blocks.

EnumsΒ§

ListEntry πŸ”’
A parsed entry of a list-replace value, or of a new block’s innerBlocks.

ConstantsΒ§

BLOCK_FIELDS πŸ”’
The stored fields of a block.
NEW_BLOCK_KEYS πŸ”’
What a new block may have; a clientId is replaced by a new one.

FunctionsΒ§

block_attributes πŸ”’
block_name πŸ”’
check_block_keys πŸ”’
check_list_entries πŸ”’
Checks a list-replace value against the page and returns where each existing block it names is now. The list is the children of the block at parent_path, or the top level.
collect_references πŸ”’
The existing blocks entries name, with whether each is named by a stub.
collect_required_children πŸ”’
Existing children of fully replaced blocks must be accounted for, like the replaced list’s own.
parse_inner_blocks πŸ”’
The block’s innerBlocks, None when it has none.
parse_list_entries πŸ”’
parse_list_entry πŸ”’
One entry of a list-replace value: a stub, an existing block by clientId, or a new block.
parse_new_block πŸ”’
A block an add or wrap creates. Its inner blocks are new too, whatever ids they carry.
parse_new_entry πŸ”’
A new block; parse_child parses each of its inner blocks.