Args: code: The source code language: The language of the code, most common languages are supported (optional - defaults to Python) caption: A caption to display below the Code (optional) name: A unique name for the block to reference when add
(
self, code: str, language: str = "python", caption: str = None, name: BlockId = None, label: str = None
)
| 111 | _tag = "Code" |
| 112 | |
| 113 | def __init__( |
| 114 | self, code: str, language: str = "python", caption: str = None, name: BlockId = None, label: str = None |
| 115 | ): |
| 116 | """ |
| 117 | Args: |
| 118 | code: The source code |
| 119 | language: The language of the code, most common languages are supported (optional - defaults to Python) |
| 120 | caption: A caption to display below the Code (optional) |
| 121 | name: A unique name for the block to reference when adding text or embedding (optional) |
| 122 | label: A label used when displaying the block (optional) |
| 123 | """ |
| 124 | super().__init__(content=code, language=language, caption=caption, name=name, label=label) |
| 125 | |
| 126 | |
| 127 | class HTML(EmbeddedTextBlock): |