From e88224621de1a8f1be4ea7ad9bf05fe635ddc3cc Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 9 Dec 2021 08:36:17 +0100 Subject: 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. --- doc/custom-readers.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/custom-readers.md') 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/ -- cgit v1.2.3