node_doc

NodeDoc - Root document node for Atlassian Document Format (ADF).

Reference:

https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/doc/

class atlas_doc_parser.nodes.node_doc.NodeDoc(type: str = 'doc', version: int = 1, content: list[NodeBlockCard | NodeCodeBlock | NodeMediaSingle | NodeParagraph | NodeTaskList | NodeOrderedList | NodeBulletList | NodeBlockquote | NodeDecisionList | NodeEmbedCard | NodeExtension | NodeHeading | NodeMediaGroup | NodeRule | NodePanel | NodeTable | NodeExpand] = REQ)[source]

The root node of an ADF document.

The doc node serves as the root container representing a document in the Atlassian Document Format (ADF). It is the top-level node that contains all other block-level nodes in a Confluence page or Jira issue field.

Parameters:
  • version – The ADF specification version. Currently always 1.

  • type – The node type, always “doc”.

  • content – List of top-level block nodes (paragraphs, headings, lists, tables, etc.).

Reference:

https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/doc/

to_markdown(ignore_error: bool = False) str[source]

Convert the document to Markdown format.

Parameters:

ignore_error – If True, silently skip nodes that fail to convert.

Returns:

The complete document as Markdown text.