Markdown parity check

Enter a page address to compare the main content of its HTML and its Markdown version. The report lists missing, added and changed blocks, numbers and links. It also shows where each one sits in the source.

The check compares what the two versions say. It does not score the page. A pass does not prove that both versions mean the same thing.

A full address that starts with https://. The Markdown is requested from the same address.

More options

For a Markdown version at its own address on the same site.

Without one: main, article or role="main", then body.

Front matter at the top of the Markdown

How to use it

What this version checks

This hosted version checks the published pages of turva.dev. The site's own Worker renders both versions of the page, so a check sends no request over the network. An address on any other site is refused with a message that points to the command-line tool.

To check another site, run the same comparison on your own machine:

npx markdown-parity-check --url https://example.com/page

The page and the command run the same comparison code from the open npm package. The report has the same format too.

What the check compares

What a result tells you

Pass means that no rejecting difference was found in the compared blocks. Fail lists the differences. Error means that the comparison could not finish, for example because the main content was empty or the page went over a limit.

A missing Markdown version is a failure and never a pass. When the Markdown request returns HTML or an error page, the report says so and compares nothing.

JavaScript is not run. Content that a page builds in the browser is compared as the server sent it.

Not every turva.dev page passes. The HTML adds buttons, cards and forms. Some pages also leave out the Related list that the Markdown carries, and the report names each of these differences.

Limits

The command-line tool accepts larger pages.

Use it from an agent or CI

Send a JSON request:

POST https://turva.dev/markdown-parity-check
Content-Type: application/json
Accept: application/json
{"url": "https://turva.dev/tools", "strict": false, "frontMatter": "keep"}

The optional fields are markdownUrl and selector. The response is the report in the same JSON format as the command's --format json output. Its summary.exitCode carries the same 0, 1 or 2.

HTTP 200 carries a pass or a fail. 400, 413 and 415 mean that the request was malformed. 403 means that the address is outside what this version checks, and 422 means that the comparison could not finish. 429 and 503 ask you to try again later. The Retry-After header says when. 500 means that the service itself failed.

In CI, run the package with --strict. Source and releases are on GitHub and the package is on npm.

What is kept

The service compares the two versions in memory and discards them. It does not store the report or write the address to its logs. The address travels in the request body and not in the page URL. Every response to a check carries a no-store header.