[GH-ISSUE #232] HTML checking in MD docs #200

Open
opened 2026-03-03 01:24:37 +03:00 by kerem · 4 comments
Owner

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.

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.
Author
Owner

@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.

<!-- gh-comment-id:546435946 --> @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.
Author
Owner

@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:

<p id="an_anchor_point">

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.

<!-- gh-comment-id:546443042 --> @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 <table> 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: ``` <p id="an_anchor_point"> ``` 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.
Author
Owner

@DavidAnson commented on GitHub (Oct 25, 2019):

Makes sense, thanks!

<!-- gh-comment-id:546444391 --> @DavidAnson commented on GitHub (Oct 25, 2019): Makes sense, thanks!
Author
Owner

@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.

<!-- gh-comment-id:731096744 --> @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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#200
No description provided.