aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-12-09 08:36:17 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-12-11 08:59:11 -0800
commite88224621de1a8f1be4ea7ad9bf05fe635ddc3cc (patch)
tree1d74be95383ce4e9064e71d6f6c0c828375c87ec /doc
parent83b5b79c0e4f073198b5af11b9e8a0a4471fcd41 (diff)
downloadpandoc-e88224621de1a8f1be4ea7ad9bf05fe635ddc3cc.tar.gz
Custom reader: ensure old Readers continue to work
Retry conversion by passing a string instead of sources when the `Reader` fails with a message that hints at an outdated function. A deprecation notice is reported in that case.
Diffstat (limited to 'doc')
-rw-r--r--doc/custom-readers.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/custom-readers.md b/doc/custom-readers.md
index df2de2182..37b6d6a3e 100644
--- a/doc/custom-readers.md
+++ b/doc/custom-readers.md
@@ -66,6 +66,13 @@ and fast [lpeg] parsing library, which is automatically in scope.
You can also use external Lua libraries (for example,
an XML parser).
+A previous pandoc version passed a raw string instead of a list
+of sources to the Reader function. Reader functions that rely on
+this are obsolete, but still supported: Pandoc analyzes any
+script error, detecting when code assumed the old behavior. The
+code is rerun with raw string input in this case, thereby
+ensuring backwards compatibility.
+
[patterns]: http://lua-users.org/wiki/PatternsTutorial
[lpeg]: http://www.inf.puc-rio.br/~roberto/lpeg/