Source code for atlas_doc_parser.nodes.node_heading
# -*- coding: utf-8 -*-importtypingasTimportdataclassesfromfunc_args.apiimportREQ,OPTfrom..type_enumimportTypeEnumfrom..mark_or_nodeimportBase,BaseNode,BaseMarkfrom..markdown_helpersimportcontent_to_markdownifT.TYPE_CHECKING:# pragma: no coverfrom.node_textimportNodeTextfrom.node_dateimportNodeDatefrom.node_emojiimportNodeEmojifrom.node_hard_breakimportNodeHardBreakfrom.node_inline_cardimportNodeInlineCardfrom.node_mentionimportNodeMentionfrom.node_statusimportNodeStatusfrom.node_placeholderimportNodePlaceholderfrom.node_inline_extensionimportNodeInlineExtensionfrom.node_media_inlineimportNodeMediaInlinefrom..marks.mark_alignmentimportMarkAlignmentfrom..marks.mark_indentationimportMarkIndentation
[docs]@dataclasses.dataclass(frozen=True)classNodeHeadingAttrs(Base):""" Attributes for :class:`NodeHeading`. :param level: Required. The heading level from 1 to 6, following HTML convention (level 1 equals ``<h1>``, level 6 equals ``<h6>``). :param localId: Optional. A unique identifier for the node within the document. """level:int=REQlocalId:str=OPT
[docs]@dataclasses.dataclass(frozen=True)classNodeHeading(BaseNode):""" A heading node in ADF. The heading node is a top-level block node that represents headings (h1 through h6) in the document. It can contain inline nodes such as text, mentions, emojis, and other inline elements. Reference: https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/heading/ """type:str=TypeEnum.heading.valueattrs:NodeHeadingAttrs=REQcontent:list[T.Union["NodeText","NodeDate","NodeEmoji","NodeHardBreak","NodeInlineCard","NodeMention","NodeStatus","NodePlaceholder","NodeInlineExtension","NodeMediaInline",]]=OPTmarks:list[T.Union["MarkAlignment","MarkIndentation",]]=OPT