node_table

class atlas_doc_parser.nodes.node_table.NodeTableAttrs(displayMode: Literal['default', 'fixed'] = OPT, isNumberColumnEnabled: bool = OPT, layout: Literal['wide', 'full-width', 'center', 'align-end', 'align-start', 'default'] = OPT, localId: str = OPT, width: float = OPT)[source]

Attributes for NodeTable.

Parameters:
  • displayMode – Optional. Controls responsive behavior on narrow screens. “default” scales columns down up to 40%, “fixed” maintains original widths.

  • isNumberColumnEnabled – Optional. If True, adds automatic row numbering.

  • layout – Optional. Controls table alignment. Options include “wide”, “full-width”, “center”, “align-end”, “align-start”, “default”.

  • localId – Optional. A unique identifier for the node.

  • width – Optional. Table width in pixels. Overrides layout when specified. Recommended minimums: 48px for 1 column, 96px for 2 columns, 144px for 3+. Maximum: 1800px.

class atlas_doc_parser.nodes.node_table.NodeTable(type: str = 'table', attrs: NodeTableAttrs = OPT, content: list[NodeTableRow] = REQ, marks: list[MarkFragment] = OPT)[source]

A container for defining table structures.

The table node is a top-level block node that contains one or more tableRow nodes. Each tableRow contains tableCell or tableHeader nodes with paragraph content.

Layout options:
  • center: Center-aligned (default=760px)

  • wide: Wider center-aligned (960px)

  • full-width: Stretches edge to edge (1800px)

  • align-start/align-end: Aligned to start/end of content area

Note: Tables render on web and desktop only; mobile rendering is unavailable.

Reference:

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

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

Convert this node to Markdown format.

The default implementation raises NotImplementedError. This is intentional for several reasons:

  1. Fail fast during development. When implementing new node types, we want to immediately discover which nodes haven’t implemented to_markdown() rather than silently producing empty output or skipping content. This helps catch missing implementations early.

  2. The ignore_error parameter provides an escape hatch. In production, if our code has bugs or a node type is partially implemented, users can pass ignore_error=True to gracefully skip nodes that fail to convert. This flag should be propagated recursively to all nested to_markdown() calls via helper functions like content_to_markdown().

  3. Error handling is explicit. The library user decides whether to fail fast (for debugging and development) or degrade gracefully (for production use cases where partial output is acceptable).

Subclasses must override this method to provide actual conversion logic.

Parameters:

ignore_error – If True, errors in nested conversions are silently skipped. If False (default), errors propagate immediately. This flag should be passed down to any nested to_markdown() calls.

Returns:

The Markdown representation of this node.

Raises:

NotImplementedError – Always raised by the base class to ensure subclasses implement this method.