mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #232] HTML checking in MD docs #200
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#200
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 @countofsanfrancisco on GitHub (Oct 25, 2019).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/232
This is an enhancement request.
It would be nice to have basic html syntax checking.
It would be nice if this tool can also check links (internal or external). However, internal links is more important for me.
@DavidAnson commented on GitHub (Oct 25, 2019):
HTML in Markdown is somewhat discouraged, as by MD033: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md033
What did you have in mind?
Regarding link checking, that is probably covered by some combination of #40, #68, #121, #144, #213.
@countofsanfrancisco commented on GitHub (Oct 25, 2019):
According to that rules, we can disable it or allow specific elements. MD is great but it doesn't cover some needed complexities inside of tables or in creating anchors. Things that are needed when you convert the MD to a full HTML and include things like table of contents, etc... I found using tags like
<p>,<br>and<a>in side of MD tables greatly help make the HTML readable. In very rare cases we need to resort to because MD can't "merge" cells.Long story short, for the HTML, the most common problem is forgetting the equivalent end tag. For example, if I wrote this:
It would be nice to check that there is an end tag (i.e.
</p>) and the id is wrapped in quotation double quotation marks. If not, call out an error.We have multiple editors to the document and simple human mistakes occur.
I don't think you really need to go any further than that if you don't want.
@DavidAnson commented on GitHub (Oct 25, 2019):
Makes sense, thanks!
@sanmai-NL commented on GitHub (Nov 20, 2020):
You'd better enhance webhint or some other HTML linter, or use Markdown preprocessor such as mdBook that allows you to include other files as fragments, and split out the HTML source code.