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

Can't add markdown footnotes to list item without the linter throwing errors #160

Open
rickstaa opened this issue Mar 2, 2023 · 2 comments

Comments

@rickstaa
Copy link

rickstaa commented Mar 2, 2023

For one of my projects, I try to add a footnote to a list item:

- [url](https://www.url.com) - Description[^1].

[^1]: Some footnote.

This, however, keeps throwing a Found reference to undefined definition remark-lint:no-undefined-references error.

What I already tried

I tried placing the footnote after the punctuation mark, but this does not seem to fix the issue and throws an additional List item description must end with proper punctuation remark-lint:awesome-list-item error.

My current workaround

The only thing I can currently think of is adding <!--lint ignores no-undefined-references--> above this reference. I however would love another way since this is a bit constrictive.

How to reproduce

  1. Paste the example code above in a markdown file.
  2. Run the awesome-linter.
  3. See the errors that appear.
@sindresorhus
Copy link
Owner

You should open an issue on the no-undefined-references rule as it's where the problem is.

@rickstaa
Copy link
Author

rickstaa commented Mar 2, 2023

You should open an issue on the no-undefined-references rule, as it's where the problem is.

I think I found the problem (see remarkjs/remark-lint#234 (comment)). The footnotes are also not accepted when they are not in a list item:

Test[^1].

[^1]: A footnote.

I think this could be solved by adding the remark-gfm to awesome-lint package. Do you have a way to extend the awesome-lint? I tried to add a remark configuration file:

{
  "dependencies": {
    "remark-gfm": "^3.0.1"
  },
  "remarkConfig": {
    "plugins": [
      "remark-gfm"
    ]
  }
}

But according to #144, there is not yet a way to extend awesome-lint. Is there a way to add remark-gfm to the package?

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

2 participants