doc/lua-filters.md: fix typos

Use American spelling.
This commit is contained in:
Albert Krewinkel 2020-10-12 16:57:30 +02:00
parent 34c75e0297
commit 4d564ce597
No known key found for this signature in database
GPG key ID: 388DC0B21F631124

View file

@ -32,7 +32,7 @@ Starting with version 2.0, pandoc makes it possible to write
filters in Lua without any external dependencies at all. A Lua filters in Lua without any external dependencies at all. A Lua
interpreter (version 5.3) and a Lua library for creating pandoc interpreter (version 5.3) and a Lua library for creating pandoc
filters is built into the pandoc executable. Pandoc data types filters is built into the pandoc executable. Pandoc data types
are marshalled to Lua directly, avoiding the overhead of writing are marshaled to Lua directly, avoiding the overhead of writing
JSON to stdout and reading it from stdin. JSON to stdout and reading it from stdin.
Here is an example of a Lua filter that converts strong emphasis Here is an example of a Lua filter that converts strong emphasis
@ -75,7 +75,7 @@ Python (`smallcaps.py`):
`pandoc --lua-filter ./smallcaps.lua` 1.03s `pandoc --lua-filter ./smallcaps.lua` 1.03s
As you can see, the Lua filter avoids the substantial overhead As you can see, the Lua filter avoids the substantial overhead
associated with marshalling to and from JSON over a pipe. associated with marshaling to and from JSON over a pipe.
# Lua filter structure # Lua filter structure
@ -292,7 +292,7 @@ use-case would be to load additional modules, or even to alter
default modules. default modules.
The following snippet is an example of code that might be useful The following snippet is an example of code that might be useful
when added to `init.lua`. The snippet adds all unicode-aware when added to `init.lua`. The snippet adds all Unicode-aware
functions defined in the [`text` module](#module-text) to the functions defined in the [`text` module](#module-text) to the
default `string` module, prefixed with the string `uc_`. default `string` module, prefixed with the string `uc_`.
@ -307,21 +307,25 @@ colon syntax (`mystring:uc_upper()`).
# Debugging Lua filters # Debugging Lua filters
It is possible to use a debugging interface to halt execution and step through a It is possible to use a debugging interface to halt execution and
Lua filter line by line as it is run inside Pandoc. This is accomplished using step through a Lua filter line by line as it is run inside Pandoc.
the remote-debugging interface of the package This is accomplished using the remote-debugging interface of the
[`mobdebug`](https://github.com/pkulchenko/MobDebug). Although mobdebug can be package [`mobdebug`](https://github.com/pkulchenko/MobDebug).
run from the terminal, it is more useful run within the donation-ware Lua editor Although mobdebug can be run from the terminal, it is more useful
and IDE, [Zerobrane](https://studio.zerobrane.com/). Zerobrane offers a REPL run within the donation-ware Lua editor and IDE,
console and UI to step-through and view all variables and state. [ZeroBrane](https://studio.zerobrane.com/). ZeroBrane offers a
REPL console and UI to step-through and view all variables and
state.
If you already have Lua 5.3 installed, you can add If you already have Lua 5.3 installed, you can add
[`mobdebug`](https://luarocks.org/modules/paulclinger/mobdebug) and its [`mobdebug`](https://luarocks.org/modules/paulclinger/mobdebug)
dependency [`luasocket`](https://luarocks.org/modules/luasocket/luasocket) using and its dependency
[`luarocks`](https://luarocks.org), which should then be available on the path. [`luasocket`](https://luarocks.org/modules/luasocket/luasocket)
Zerobrane also includes both of these in its package, so if you don't want to using [`luarocks`](https://luarocks.org), which should then be
install Lua seperately, you should add/modify your `LUA_PATH` and `LUA_CPATH` to available on the path. ZeroBrane also includes both of these in
include the correct locations; [see detailed instructions its package, so if you don't want to install Lua separately, you
should add/modify your `LUA_PATH` and `LUA_CPATH` to include the
correct locations; [see detailed instructions
here](https://studio.zerobrane.com/doc-remote-debugging). here](https://studio.zerobrane.com/doc-remote-debugging).
# Examples # Examples
@ -1765,7 +1769,7 @@ A list is any Lua table with integer indices. Indices start at
one, so if `alist = {'value'}` then `alist[1] == 'value'`. one, so if `alist = {'value'}` then `alist[1] == 'value'`.
Lists, when part of an element, or when generated during Lists, when part of an element, or when generated during
marshalling, are made instances of the `pandoc.List` type for marshaling, are made instances of the `pandoc.List` type for
convenience. The `pandoc.List` type is defined in the convenience. The `pandoc.List` type is defined in the
[*pandoc.List*](#module-pandoc.list) module. See there for [*pandoc.List*](#module-pandoc.list) module. See there for
available methods. available methods.
@ -2250,7 +2254,7 @@ format, and functions to filter and modify a subtree.
[`Emph (content)`]{#pandoc.emph} [`Emph (content)`]{#pandoc.emph}
: Creates an inline element representing emphasised text. : Creates an inline element representing emphasized text.
Parameters: Parameters:
@ -2453,7 +2457,7 @@ format, and functions to filter and modify a subtree.
[`Strikeout (content)`]{#pandoc.strikeout} [`Strikeout (content)`]{#pandoc.strikeout}
: Creates text which is striked out. : Creates text which is struck out.
Parameters: Parameters:
@ -2912,7 +2916,7 @@ Usage:
`make_sections (number_sections, base_level, blocks)` `make_sections (number_sections, base_level, blocks)`
Converst list of [Blocks](#type-block) into sections. Converts list of [Blocks](#type-block) into sections.
`Div`s will be created beginning at each `Header` `Div`s will be created beginning at each `Header`
and containing following content until the next `Header` and containing following content until the next `Header`
of comparable level. If `number_sections` is true, of comparable level. If `number_sections` is true,