summaryrefslogtreecommitdiff
path: root/docs/modules
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2024-02-22 03:32:26 -0700
committerDan Allen <dan.j.allen@gmail.com>2024-02-22 03:32:26 -0700
commitb794da8ea2169e2ea24c3adb14b6068b06aa1794 (patch)
treedb4f15ac2201233e2a182ec76ae2d548f42a30cd /docs/modules
parent34ce59bdf419b7ffc621361743da129dcbf2a946 (diff)
fix typo on preprocessor page; add note about using it as an event listener
Diffstat (limited to 'docs/modules')
-rw-r--r--docs/modules/extensions/pages/preprocessor.adoc6
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].