Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
atlas_doc_parser 1.0.1 documentation
Logo
atlas_doc_parser 1.0.1 documentation
  • Atlassian Document Format Parser
  • Maintainer Guide
    • What is atlas_doc_parser?
    • Cross-Referencing Three Sources of Truth
    • The Data Model Architecture
    • Implementing a New Mark or Node Class
    • How to Test Marks and Nodes
    • Graceful Handling of Unimplemented Types
Back to top
View this page

mark_link¶

class atlas_doc_parser.marks.mark_link.MarkLinkAttrs(href: str = REQ, title: str = OPT, id: str = OPT, collection: str = OPT, occurrenceKey: str = OPT)[source]¶

Attributes for MarkLink.

Parameters:
  • href – Required. The hyperlink destination URI.

  • title – Optional. The hyperlink title (HTML title attribute).

  • id – Optional. String identifier.

  • collection – Optional. String value for collection.

  • occurrenceKey – Optional. String value for occurrence key.

class atlas_doc_parser.marks.mark_link.MarkLink(type: str = 'link', attrs: MarkLinkAttrs = REQ)[source]¶

Sets a hyperlink on text nodes.

The link mark applies exclusively to text nodes and creates a clickable hyperlink. The href attribute is required and specifies the destination URL.

  • https://developer.atlassian.com/cloud/jira/platform/apis/document/marks/link/

to_markdown(text: str) → str[source]¶

Apply this mark’s formatting to text.

The default implementation returns the input text unchanged. This design reflects the library’s philosophy:

  1. Content extraction over formatting. In the AI era, we convert ADF to Markdown primarily to extract textual content for LLMs, RAG systems, and knowledge bases. Preserving formatting is secondary to preserving content.

  2. When in doubt, preserve content without formatting. If a mark type doesn’t have a standard Markdown equivalent (e.g., background color), we return the raw text rather than inventing custom syntax or losing the content entirely.

  3. Use native Markdown only. We prefer standard Markdown syntax (**bold**, *italic*). Dialect-specific extensions are avoided.

Subclasses override this method to apply formatting. For example, MarkStrong.to_markdown("text") returns "**text**".

Parameters:

text – The text content to format.

Returns:

The formatted text. Default returns text unchanged.

Copyright © 2026, Sanhe Hu
Made with Sphinx and @pradyunsg's Furo
On this page
  • mark_link
    • MarkLinkAttrs
    • MarkLink
      • MarkLink.to_markdown()