A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/bitcrowd/mdast-util-from-adf below:

bitcrowd/mdast-util-from-adf: Convert from Atlassian Document Format to Markdown Abstract Syntax Tree

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

import { fromADF } from "mdast-util-from-adf";
import { toMarkdown } from "mdast-util-to-markdown";

const doc = {
  version: 1,
  type: "doc",
  content: [
    {
      type: "paragraph",
      content: [
        {
          type: "text",
          text: "Hello ",
        },
        {
          type: "text",
          text: "ADF",
          marks: [
            {
              type: "link",
              attrs: {
                href: "https://developer.atlassian.com/cloud/jira/platform/apis/document/structure/",
              },
            },
            {
              type: "strong",
            },
          ],
        },
        {
          type: "text",
          text: "!",
        },
      ],
    },
  ],
};

console.log(toMarkdown(fromADF(doc)));

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4