public function BlockParser::addFreeform in Gutenberg 8.2
Pushes a length of text from the input document to the output list.
As a freeform block.
@since 3.8.0 @internal
Parameters
int|null $length: How many bytes of document text to output.
1 call to BlockParser::addFreeform()
- BlockParser::proceed in src/
Parser/ BlockParser.php - Processes the next token from the input document.
File
- src/
Parser/ BlockParser.php, line 358
Class
- BlockParser
- Class BlockParser.
Namespace
Drupal\gutenberg\ParserCode
public function addFreeform($length = NULL) {
$length = $length ? $length : strlen($this->document) - $this->offset;
if (0 === $length) {
return;
}
$this
->addToOutput((array) $this
->freeform(substr($this->document, $this->offset, $length)));
}