Skip to content

Type Editor


Type Editor / @type-editor/changeset / tokenizer/tokenize-block-node / tokenizeBlockNode

Function: tokenizeBlockNode()

ts
function tokenizeBlockNode<T>(
  blockNode,
  encoder,
  rangeStart,
  rangeEnd,
  nodeOffset,
  nodeEndOffset,
  target,
): void;

Defined in: tokenizer/tokenize-block-node.ts:19

Tokenize a block (non-leaf) node by encoding its boundaries and recursively tokenizing its content.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
blockNodeNode_2The block node to tokenize.
encoderTokenEncoder<T>The encoder to use for converting nodes to tokens.
rangeStartnumberThe start position in the document.
rangeEndnumberThe end position in the document.
nodeOffsetnumberThe offset of this node in the document.
nodeEndOffsetnumberThe end offset of this node in the document.
targetT[]The array to append tokens to.

Returns

void