mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #119] Include filename in mardown-it objects #101
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @johntron on GitHub (May 3, 2018).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/119
I'd like to add a custom rule to check for broken links and orphaned pages in my Markdown documents. I've been using Markdown in a personal knowledgebase, and have a lot of relative paths I want to maintain.
This would be simple with the customRules API, but it doesn't provide the filename in the line-annotated markdown-it objects. I believe this could be added by modifying this call in lintFile() and the called function, lintContent() to accept the filename as an argument. I can submit a PR if this makes sense.
@DavidAnson commented on GitHub (May 3, 2018):
Sure! If you want to start with a sketch, I’d be happy to review that to be sure we are on the same page.
@DavidAnson commented on GitHub (May 4, 2018):
Thinking about this, I propose:
paramsfileoptions.filesnullwhen not available (strings)@DavidAnson commented on GitHub (May 4, 2018):
Update: The value of
fileshould be the same path already used to open it successfully. I don’t think we should commit to normalizing it.@DavidAnson commented on GitHub (May 25, 2018):
(Don't worry about a PR - I did this just now and will push it tomorrow after reviewing the changes.)