From 5acccafe171778a0b1e2c0092cba6fd629043a6d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 28 May 2019 09:41:27 -0700 Subject: Add documentation of the npm package to README.md. Thanks to Shawn Erquhart. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index f5ddd8a..be3e4ba 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,21 @@ actually running the tests, you can do: and you'll get all the tests in JSON format. +JavaScript developers may find it more convenient to use the +[`commonmark-spec` npm package], which is published from this +repository. It exports an array `tests` of JSON objects with +the format + +```json +{ + "markdown": "Foo\nBar\n---\n", + "html": "

Foo\nBar

\n", + "section": "Setext headings", + "number": 65 +} +``` + +[`commonmark-spec` npm package]: https://www.npmjs.com/package/commonmark-spec The spec -------- -- cgit v1.2.3