-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Pandoc-style footnotes should not be flagged by "no-shortcut-reference-link" or"no-undefined-references" #234
Comments
I believe that if you add "plugins": [
+ "footnotes",
"preset-lint-recommended",
"preset-lint-consistent" |
You are right. When using the linter through remark-cli together with I haven't figured out a way to actually use remark-footnotes within atom/linter-markdown yet, so the references still get flagged inside atom, but I suppose that's more of an npm/windows/atom/linter-markdown/personal-incompetence issue, and not related to remark-lint per se. |
I use linter-remark in atom: it loads remark config files, so if you move the cli options to a config file, it should work! |
I played around with linter-remark yesterday, too. To be honest, I am not particularly happy with either linter-markdown or linter-remark in atom at the moment. I find the mere fact that - "just" for linting markdown - I need to add non-atom packages through npm quite tedious. And judging from some of the github issues in the linter-markdown repo I am not the only one. In those issues, other people mention all the problems that arise (especially with maintaining those external packages) and it also seems like many people can't really extract the necessary information from the current documentation (yet those of us running into those problems also obviously aren't able to improve the docs and submit them via PRs - if we were, we wouldn't need to ask ;) ). Concerning this particular issue (footnotes getting flagged), I wonder what adding the |
Sorry, that it’s so confusing. remark-lint is part of the remark ecosystem: lots of tools for working with Markdown. Linting it is one thing. Another is converting to HTML. To man pages. Generating tables of contents and other sections. remark is part of the unified collective. hundreds of projects for dealing with content. HTML, XML, markdown, prose, and more. That’s why, every plugin does exactly one thing. Linting plugins lint. Footnote plugins footnote. They integrate with each other: they’re separate but can be combined. Not everyone uses footnotes, so parsing something as footnotes if it should’ve been a link, is a bad idea in my opinion. More information about unified is on its website: https://unifiedjs.com. Does that help? Anything else I can help with? |
Well, I think I understand what remark could do for a user. Personally, I rely on pandoc for conversion, so I don't require any of the conversion features that remark could provide. As far as I know, there (currently) aren't any linters for pandoc. And no non-remark options for linting markdown within atom. What I don't entirely understand is this: Obviously, this statement is true: "Not everyone uses footnotes". But why should the linter flag syntactically correct footnotes It's possible that this discussion comes down to "What standards should markdown linters currently adhere to, considering that markdown is not (yet) standardized across all and any converters / use cases" - I would argue that footnotes |
What Markdown is, is mostly accepted to be, or at least moving towards, CM or GFM. Reference links are a part of Markdown in its original form, in CM, and in GFM. Other parsers, such as Pandoc have unstandardized features (note: CM is maintained by the author of Pandoc). Footnotes are a popular feature indeed. Several parsers support different syntaxes for footnotes. If you want to support a different syntax for footnotes, fork remark-footnotes, and remark-lint will still work. |
As I said, it therefore comes down to which parts are "standard enough" to be included without loading extra plugins into remark. Just linting with recommended presets will currently not flag references but will flag footnotes. That's fair. |
Good! Glad I could clarify that. I haven’t worked on linter-markdown in years. I think linter-remark is a better idea, that’s why I maintain it. linter-markdown seems abandoned, unfortunately. The reason for preferring linter-remark, and local plugins/configurations, is exactly because things like footnotes aren’t the same for every file you may work on. Leading to mistakes if they’re toggled on globally in linter-markdown, but not in the project you’re currently working on. |
I will give that another try, thanks a lot! |
Do not understand how to do this in the context of https://github.com/orgs/remarkjs/discussions/1392 . It sounds as if (4 years ago) the maintainers had issues to include support for footnotes. Is it still too difficult to fix |
Am just aware of the "Pandoc" style of footnotes. |
GFM has footnotes. |
Subject of the feature
Pandoc-style footnotes work either inline or as reference-style blocks:
While this feature has been implemented in Remark using remark-footnotes, I have not found a way to make the remark-linter honor that syntax while
no-shortcut-reference-link
andno-undefined-references
are active.no-shortcut-reference-link
flags both inline and block footnoes.no-undefined-references
flags only inline footnotes.Expected behaviour
no-shortcut-reference-link
andno-undefined-references
should ignore references when they are actually footnotes (as indicated by^
) while still flagging regular references without a definition or "lazy" references not using the trailing[]
.Info
I am using remark-lint within the Atom editor through the linter-markdown package. The .remarkrc contains
The text was updated successfully, but these errors were encountered: