Add support for custom file extensions in link checking.#1559
Merged
Conversation
Member
|
@mre looks good overall. Does this mean that non Markdown/HTML files are no longer checked when the new argument isn't specified? |
Member
Author
|
Yeah, good point. I think plaintext is missing to be compatible with what we had before. That's the only missing format, or? Was considering to extend it to other formats like JSON or YAML as well. |
This adds support for overwriting extensions: ``` lychee . --extensions md,html,txt,json,yaml ``` The above would only check these extensions. This was enabled by moving to `ignore` (#1500 by @thomas-zahner). Fixes #410
Co-authored-by: Thomas Zahner <thomas.zahner@protonmail.ch>
…ved clarity and functionality
… for FileExtensions
Member
Author
|
@thomas-zahner, I made all changes. Can you check again? |
thomas-zahner
approved these changes
Feb 28, 2025
Member
thomas-zahner
left a comment
There was a problem hiding this comment.
I haven't tested it yet but it looks good, I like the new type 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for overwriting extensions:
The above would only check these extensions.
This was enabled by moving to
ignore(#1500 by @thomas-zahner).I'm not 100% convinced about the design yet. Feedback welcome!
Guess we should use whatever
ignore::types::Typesfor file extension matching as it's well-maintained and more exhaustive. Switching this would remove some custom code we have inFileType.Fixes #410