Skip to main content

CodeBlockNode

ClassDataClassSource

CodeBlockNode(type: Literal["code_block"] = "code_block", code: str)

Node: Code (Block)

Provide the block code, corresponding to

<pre><code>...</code></pre>

or

<pre>...</pre>

Intended for [code]...[/code] in BBCode.

Fields​

NameTypeRequired
Description
typeLiteral["code_block"]The type identifer of this document node.
codestrThe multi-line code text in the node.

Properties​

pure_text​

pure_text: str = self.pure_text

The pure text of the current node.


size​

size: int = self.size

The estimated text length of the current node.