diff options
| author | John MacFarlane <[email protected]> | 2022-10-25 10:16:34 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-10-25 10:17:23 -0700 |
| commit | 6e1cfa2af546029385eb8bf8049c08e7b8e16fe2 (patch) | |
| tree | 1065b9f3699106d60e192aa57d50669276988708 /doc/custom-readers.md | |
| parent | 119de20e60ecf40ce00f7d7206f7f87c7ad4c3c1 (diff) | |
Lua: rename `reader_extensions`/`writer_extensions` globals...
...as `Extensions`.
Update documnetation.
Include a custom extension in the documentation example.
See #8390.
Diffstat (limited to 'doc/custom-readers.md')
| -rw-r--r-- | doc/custom-readers.md | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/custom-readers.md b/doc/custom-readers.md index 4d2009690..2d9938121 100644 --- a/doc/custom-readers.md +++ b/doc/custom-readers.md @@ -98,19 +98,20 @@ end Custom readers can be built such that their behavior is controllable through format extensions, such as `smart`, `citations`, or `hard-line-breaks`. Supported extensions are those -that are present as a key in the global `reader_extensions` table. +that are present as a key in the global `Extensions` table. Fields of extensions that are enabled default have the value `true`, while those that are supported but disabled have value `false`. Example: A writer with the following global table supports the -extensions `smart` and `citations`, with the former enabled and -the latter disabled by default: +extensions `smart`, `citations`, and `foobar`, with `smart` enabled and +the other two disabled by default: ``` lua -reader_extensions = { +Extensions = { smart = true, citations = false, + foobar = false } ``` @@ -129,7 +130,7 @@ end ``` Extensions that are neither enabled nor disabled in the -`reader_extensions` field are treated as unsupported by the +`Extensions` field are treated as unsupported by the reader. Trying to modify such an extension via the command line will lead to an error. |
