mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 17:26:22 +03:00
[GH-ISSUE #627] Add an option allowed_languages to the fenced-code-language #2330
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#2330
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 @regseb on GitHub (Nov 4, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/627
Add an option allowed_languages to the fenced-code-language rule to define the allowed languages. With this option,
markdownlintwill be able to check:javascript/js);html/HTML);markdown/markdonw)json/jfather).@DavidAnson commented on GitHub (Nov 4, 2022):
I think this has already been done for the next version here:
github.com/DavidAnson/markdownlint@01ba757d3a@regseb commented on GitHub (Nov 4, 2022):
I didn't see that there was already the #608 issue. 😞
I looked at the commit, the languages are case insensitive. You could add
ignoreCaseoption to check case (html/HTML).@DavidAnson commented on GitHub (Nov 4, 2022):
Since the new feature hasn't gone out yet, what do you folks think about making it case sensitive? If someone really wants to be able to use HTML and html, they could always add both to the allow list.
@regseb commented on GitHub (Nov 5, 2022):
It's better if the rule is case sensitive because it has more possibilities.
@nschonni commented on GitHub (Nov 5, 2022):
I think the default of case sensitivity makes sense, but I like the idea of
ignoreCase. I don't think I'd see people wanting to put all permutations of the casing if there is a large code base. Either they'll want just one style + plus a list, or just a list, but "I don't care if you camelCase it or whatever" approach@DavidAnson commented on GitHub (Nov 5, 2022):
My thinking is to except the PR to make this case sensitive by default and then wait to see if there are really people who want to allow a mix of case and aren't willing to specify which ones. Does anyone really want HtMl?
@DavidAnson commented on GitHub (Nov 5, 2022):
*accept
@nschonni commented on GitHub (Nov 5, 2022):
I think skipping the
ignoreCasemight be an easy sell, if the casing would be fixable based on the allowed values. That would probably add a bunch of complication though