aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-05-28 09:41:27 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-05-28 09:41:27 -0700
commit5acccafe171778a0b1e2c0092cba6fd629043a6d (patch)
treebdbd51d8cd94f26f64ca3d0e8bd0621b4947f5ba
parent600070883209e8042e17cd82b3870d473b581907 (diff)
Add documentation of the npm package to README.md.
Thanks to Shawn Erquhart.
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
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": "<h2>Foo\nBar</h2>\n",
+ "section": "Setext headings",
+ "number": 65
+}
+```
+
+[`commonmark-spec` npm package]: https://www.npmjs.com/package/commonmark-spec
The spec
--------