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

The Markdown link seems to be preventing the footnotes generation. #23

Closed
krymtkts opened this issue Nov 26, 2023 · 2 comments
Closed
Labels
bug Something isn't working marked-footnote

Comments

@krymtkts
Copy link

  • Extension Name: marked-footnote
  • Extension Version: v1.1.2
  • Project Version:
  • Device: [e.g Desktop] all of devices
  • OS@version (or Browser): Windows 11 Home 23H2 22631.2715
  • Node And NPM Version:

Description

The Markdown link seems to be preventing the footnotes generation.

Specifically, [ causes a bug.

To Reproduce (⚠️ read below)

https://replit.com/@krymtkts/marked-footnote-repro#index.html

<!doctype html>
<html lang="en">
  <body class="markdown-body">
    <div id="content"></div>

    <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/marked-footnote/dist/index.umd.min.js"></script>
    <script>
      const md = `# Example

[^1]: works fine.

[^2]: not work with [link](https://github.com/bent10/marked-extensions/tree/main/packages/footnote).

it works fine[^1]. not work with link[^2].
`

      document.getElementById("content").innerHTML = new marked.Marked()
        .use(markedFootnote())
        .parse(md)
    </script>
  </body>
</html>

Expected Behavior

Footnotes are not generated.

Actual Behavior

Footnotes are generated.

Additional Information

bent10 added a commit that referenced this issue Nov 26, 2023
github-actions bot pushed a commit that referenced this issue Nov 26, 2023
## marked-footnote [1.1.3](https://github.com/bent10/marked-extensions/compare/marked-footnote@1.1.2...marked-footnote@1.1.3) (2023-11-26)

### Bug Fixes

* allows link in footnote content ([a3e49ac](a3e49ac)), closes [#23](#23)
@bent10
Copy link
Owner

bent10 commented Nov 26, 2023

Thanks for reporting this issue!

I've released marked-footnote@1.1.3 that fixed this issue. Feel free to explore and let me know if you have any feedback.

@bent10 bent10 closed this as completed Nov 26, 2023
@bent10 bent10 reopened this Nov 26, 2023
@bent10 bent10 added marked-footnote bug Something isn't working labels Nov 26, 2023
@krymtkts
Copy link
Author

It works as expected. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working marked-footnote
Projects
None yet
Development

No branches or pull requests

2 participants