aboutsummaryrefslogtreecommitdiff
path: root/doc/lua-filters.md
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2019-06-12 18:58:38 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2019-06-12 09:58:38 -0700
commit11bb8627677fb8b49af92d7c55aec07c69f95843 (patch)
tree3bd8a3ea839a94747b2cc41e78ef7f062c7489f9 /doc/lua-filters.md
parentd81b9f55c142f89db38edd44db999ef2de162a8d (diff)
downloadpandoc-11bb8627677fb8b49af92d7c55aec07c69f95843.tar.gz
Lua: add a `clone()` method to all AST elements (#5572)
Closes: #5568
Diffstat (limited to 'doc/lua-filters.md')
-rw-r--r--doc/lua-filters.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 3ac2a62d2..dadc9a2fc 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -644,6 +644,20 @@ This section describes the types of objects available to Lua
filters. See the [pandoc module](#module-pandoc}) for functions
to create these objects.
+## Shared Properties
+
+### `clone`
+
+`clone ()`
+
+All instances of the types listed here, with the exception of
+read-only objects, can be cloned via the `clone()` method.
+
+Usage:
+
+ local emph = pandoc.Emph {pandoc.Str 'important'}
+ local cloned_emph = emph:clone() -- note the colon
+
## Pandoc {#type-ref-pandoc}
Pandoc document
@@ -1247,6 +1261,7 @@ Object equality is determined via
: delimiter of list numbers; one of `DefaultDelim`, `Period`,
`OneParen`, and `TwoParens` (string)
+
## Hierarchical Element {#type-ref-Element}
Hierarchical elements can be either *Sec* (sections) or *Blk*