#commonmark #markdown #links #validate

app marker

Tool for finding issues in CommonMark documents

8 breaking releases

0.9.0 Oct 13, 2023
0.8.0 Oct 18, 2019
0.7.0 Apr 4, 2018
0.5.0 Jun 27, 2017
0.1.0 Nov 28, 2016

#449 in Text processing

Download history 4/week @ 2023-07-21 1/week @ 2023-07-28 1/week @ 2023-08-04 1/week @ 2023-08-11 11/week @ 2023-08-18 11/week @ 2023-08-25 1/week @ 2023-09-01 22/week @ 2023-09-08 1/week @ 2023-09-15 6/week @ 2023-09-22 2/week @ 2023-09-29 5/week @ 2023-10-06 239/week @ 2023-10-13 185/week @ 2023-10-20 96/week @ 2023-10-27 98/week @ 2023-11-03

618 downloads per month

Apache-2.0

20KB
462 lines

Marker

This is a tool for finding issues in CommonMark documentation. Right now, it only identifies broken links (malformed URLs, non-existent paths, etc.).

Installing Marker

Marker can be installed using cargo:

cargo install marker

Running Marker

When run without any arguments, Marker will search the current working directory and its descendants for CommonMark documents (everything with a file extension of .md). The --root flag can also be provided to change the search location.

For example, given the following document in the current working directory:

This is a [broken reference].
This [won't load](http://www.acrawford.com/404).
[I cannot type](http:://example.com)
[This file](not_here.md) doesn't exist.
This is an [absolute path](/root.md).

When Marker is run, the following is output and the program exits with a non-zero exit status:

Found broken reference ([broken reference]) in ./example.md
Found broken url       (404 -> http://www.acrawford.com/404) in ./example.md: 404 Not Found
Found malformed URL    (malformed url -> http:://example.com) in ./example.md: empty host
Found broken path      (bad path -> not_here.md) in ./example.md
Found absolute path    (absolute path -> /root.md) in ./example.md

Dependencies

~6–19MB
~304K SLoC