for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from typing import Dict
from cleo.io.io import IO
from sdoc.sdoc2.node.Node import Node
from sdoc.sdoc2.NodeStore import NodeStore
class TitleNode(Node):
"""
Node for title in sdoc document.
# ------------------------------------------------------------------------------------------------------------------
def __init__(self, io: IO, options: Dict[str, str], argument: str):
Object constructor.
:param OutputStyle io: The IO object.
:param dict[str,str] options: The options of the title.
:param str argument:
super().__init__(io, 'title', options, argument)
def get_command(self) -> str:
Returns the command of this node, i.e. title.
return 'title'
def get_hierarchy_level(self, parent_hierarchy_level: int = -1) -> int:
Returns 0.
return 0
def is_block_command(self) -> bool:
Returns False.
return False
def is_inline_command(self) -> bool:
Returns True.
return True
# ----------------------------------------------------------------------------------------------------------------------
NodeStore.register_inline_command('title', TitleNode)