Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Links are not formatted correctly #27

Open
raxod502-plaid opened this issue Jun 8, 2023 · 0 comments
Open

Links are not formatted correctly #27

raxod502-plaid opened this issue Jun 8, 2023 · 0 comments

Comments

@raxod502-plaid
Copy link

Hi, I tried using this library to translate some basic Markdown and received an unexpected result:

> console.log(JSON.stringify(require("md-to-adf")("link 1 <https://example.com> and link 2 [here [brackets] there](https://example.com)"), null, 2))
{
  "type": "doc",
  "content": [
    {
      "type": "paragraph",
      "content": [
        {
          "type": "text",
          "text": "link 1 <https://example.com> and link 2 [here [brackets] there](https://example.com)"
        }
      ]
    }
  ],
  "version": 1
}

Neither link is formatted correctly, although other compliant Markdown parsers translate them both properly as links, e.g.:

% pandoc -fmarkdown -thtml <<< "link 1 <https://example.com> and link 2 [here [brackets] there](https://example.com)"
<p>link 1 <a href="https://example.com"
class="uri">https://example.com</a> and link 2 <a
href="https://example.com">here [brackets] there</a></p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant