aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-10-25 10:16:34 -0700
committerJohn MacFarlane <[email protected]>2022-10-25 10:17:23 -0700
commit6e1cfa2af546029385eb8bf8049c08e7b8e16fe2 (patch)
tree1065b9f3699106d60e192aa57d50669276988708 /doc
parent119de20e60ecf40ce00f7d7206f7f87c7ad4c3c1 (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')
-rw-r--r--doc/custom-readers.md11
-rw-r--r--doc/custom-writers.md9
2 files changed, 11 insertions, 9 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.
diff --git a/doc/custom-writers.md b/doc/custom-writers.md
index 1d90ea722..55c64eb8a 100644
--- a/doc/custom-writers.md
+++ b/doc/custom-writers.md
@@ -53,19 +53,20 @@ then only the `Writer` function will be used.
Writers can be customized through format extensions, such as
`smart`, `citations`, or `hard_line_breaks`. The global
-`writer_extensions` table indicates supported extensions with a
+`Extensions` table indicates supported extensions with a
key. Extensions enabled by default are assigned a true value,
while those that are supported but disabled are assigned a false
value.
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 others disabled by default:
``` lua
-writer_extensions = {
+Extensions = {
smart = true,
citations = false,
+ foobar = false
}
```