aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/custom-readers.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/custom-readers.md b/doc/custom-readers.md
index 1004ca56c..2c72573b4 100644
--- a/doc/custom-readers.md
+++ b/doc/custom-readers.md
@@ -457,16 +457,18 @@ This custom reader consumes the JSON output of
a document containing the current top articles on the
Haskell subreddit.
-It assumes that the `luajson` library is available. (It can be
-installed using `luarocks install luajson`---but be sure you are
-installing it for Lua 5.3, which is the version packaged with
-pandoc.)
+It assumes that the `pandoc.json` library is available, which
+ships with pandoc versions after (not including) 3.1. It's still
+possible to use this with older pandoc version by using a
+different JSON library. E.g., `luajson` can be installed using
+`luarocks install luajson`---but be sure you are installing it for
+Lua 5.4, which is the version packaged with pandoc.
```lua
-- consumes the output of https://www.reddit.com/r/haskell.json
-local json = require'json' -- luajson must be available
+local json = require 'pandoc.json'
local function read_inlines(raw)
local doc = pandoc.read(raw, "commonmark")