diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2024-02-22 03:32:26 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2024-02-22 03:32:26 -0700 |
| commit | b794da8ea2169e2ea24c3adb14b6068b06aa1794 (patch) | |
| tree | db4f15ac2201233e2a182ec76ae2d548f42a30cd | |
| parent | 34ce59bdf419b7ffc621361743da129dcbf2a946 (diff) | |
fix typo on preprocessor page; add note about using it as an event listener
| -rw-r--r-- | docs/modules/extensions/pages/preprocessor.adoc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/modules/extensions/pages/preprocessor.adoc b/docs/modules/extensions/pages/preprocessor.adoc index 0465773e..e43fa78a 100644 --- a/docs/modules/extensions/pages/preprocessor.adoc +++ b/docs/modules/extensions/pages/preprocessor.adoc @@ -10,10 +10,12 @@ If the preprocessor extension reads lines from the reader, it will cause side ef One of these side effects is that document attributes in the header may not be interpreted correctly. Another is that it may interfere with line number tracking. If the extension adds or removes lines, the parser could produce misleading line number information. -Thus, interacting with the reader in a prepreprocessor extension should be avoided, if possible. +Thus, interacting with the reader in a preprocessor extension should be avoided, if possible. A preprocessor extension can still be used to modify options on the Document object, in which case there's no side effect. -It may also be possible to avoid side effects by reading lines which are not interpreted as AsciiDoc, as is shown in the example on this page. +It can also be safely used as an event listener, perhaps to run other code. +It may also be possible to avoid side effects by reading lines above the actual AsciiDoc document, as is shown in the example on this page. +It's safe to do so because these lines are not interpreted as AsciiDoc. ==== Prior to invoking the preprocessor extension, Asciidoctor splits the source text of the primary document into lines and xref:asciidoc::normalization.adoc[normalizes them]. |
