aboutsummaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2024-09-08 08:52:29 -0700
committerJohn MacFarlane <[email protected]>2024-09-08 08:52:29 -0700
commit079af93d78fd5f4aad86489be454b38b407dfd08 (patch)
treef8d022a8e1c753fcac5c53da32ec9f853b463bdf /CONTRIBUTING.md
parent45da887ff78bb2d7b3212f5b413169e7f4949a97 (diff)
CONTRIBUTING.md: summarize steps for adding new cli option.
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md21
1 files changed, 21 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8cda552f1..e791aad48 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -422,6 +422,27 @@ The library is structured as follows:
- `Text.Pandoc.UUID` contains functions for generating UUIDs.
- `Text.Pandoc.XML` contains functions for formatting XML.
+Adding a new command-line option
+--------------------------------
+
+To add a new command-line option, you'll need to make changes in several
+places:
+
+- `Text.Pandoc.App.Opt` -- new constructor for Opt and default
+ value
+- `Text.Pandoc.App.CommandLineOptions` -- the option parser
+- `Text.Pandoc.App` or `Text.Pandoc.App.OutputSettings` --
+ handle the new option
+- possibly in pandoc-server: `Text.Pandoc.Server` -- handle the
+ new option
+
+If your change requires a new field for ReaderOptions or
+WriterOptions, you'll also need to
+
+- `Text.Pandoc.Options` -- type change and default value
+- in pandoc-lua-engine: Text.Pandoc.Lua.Marshal.WriterOptions
+ and/or Text.Pandoc.Lua.Marshal.ReaderOptions
+
Lua filters
-----------