mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 17:56:02 +03:00
[GH-ISSUE #1200] MD045: no-alt-text triggered even though html alt-text is specified #2485
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#2485
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 @skwde on GitHub (May 7, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1200
It seems that this should no longer appear, because support was supposedly added through this issue https://github.com/DavidAnson/markdownlint/issues/992 and related merge request https://github.com/DavidAnson/markdownlint/pull/993.
Though I still get this issue.
With following
test.mdI get
after running
@DavidAnson commented on GitHub (May 7, 2024):
MD045 supports CommonMark syntax for image alternate text (technically the "image description") and the PR referenced above allowed the rule to also recognize alternate text in an HTML IMG tag via the ALT attribute. There are examples of both in the documentation: https://github.com/DavidAnson/markdownlint/blob/main/doc/md045.md
What's shown above in this issue as "fig-alt" is neither of those and therefore not recognized. It looks like this is something Quarto does because it does not use the image description in the standard way: https://quarto.org/docs/authoring/figures.html#alt-text
@DavidAnson commented on GitHub (May 7, 2024):
Quarto’s custom format does not work well with CommonMark syntax as it parses like content and is displayed to the user: https://dlaa.me/markdownlint/#%25m%23%20Issue%201200%0A%0A!%5BElephant%5D(elephant.png)%7Bfig-alt%3D%22A%20drawing%20of%20an%20elephant.%22%7D%0A