aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2023-03-20 09:15:56 +0100
committerAlbert Krewinkel <[email protected]>2023-03-20 09:15:56 +0100
commit4e2949ceca5a73557365d3f856bb0a91a0155df2 (patch)
tree3fa7ba194415a19f3c234e779c8b5bef6f923ee9 /doc
parenta53a6edfa58590163b5316805a0d719b904a3eb3 (diff)
lua-filters: Move docs from module `text` to `pandoc.text`
The latter is easier to use and more consistent with the other modules.
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md142
1 files changed, 71 insertions, 71 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 584825b61..70d44917e 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -2490,77 +2490,6 @@ Fields:
`toc`
: table of contents information (table)
-# Module text
-
-UTF-8 aware text manipulation functions, implemented in Haskell.
-The module is made available as part of the `pandoc` module via
-`pandoc.text`. The text module can also be loaded explicitly:
-
-``` lua
--- uppercase all regular text in a document:
-text = require 'text'
-function Str (s)
- s.text = text.upper(s.text)
- return s
-end
-```
-
-### fromencoding {#text.fromencoding}
-
-`fromencoding(s, encoding)`
-
-Converts a string to UTF-8. The `encoding` parameter specifies the
-encoding of the input string. On Windows, that parameter defaults
-to the current ANSI code page; on other platforms the function
-will try to use the file system's encoding.
-
-See [`toencoding`](#text.toencoding) for more info on supported
-encodings.
-
-### lower {#text.lower}
-
-`lower (s)`
-
-Returns a copy of a UTF-8 string, converted to lowercase.
-
-### upper {#text.upper}
-
-`upper (s)`
-
-Returns a copy of a UTF-8 string, converted to uppercase.
-
-### reverse {#text.reverse}
-
-`reverse (s)`
-
-Returns a copy of a UTF-8 string, with characters reversed.
-
-### len {#text.len}
-
-`len (s)`
-
-Returns the length of a UTF-8 string.
-
-### sub {#text.sub}
-
-`sub (s)`
-
-Returns a substring of a UTF-8 string, using Lua's string
-indexing rules.
-
-### toencoding {#text.toencoding}
-
-`toencoding(s, encoding)`
-
-Converts a UTF-8 string to a different encoding. The `encoding`
-parameter defaults to the current ANSI code page on Windows; on
-other platforms it will try to guess the file system's encoding.
-
-The set of known encodings is system dependent, but includes at
-least `UTF-8`, `UTF-16BE`, `UTF-16LE`, `UTF-32BE`, and `UTF-32LE`.
-Note that the default code page on Windows is available through
-`CP0`.
-
# Module pandoc
Fields and functions for pandoc scripts; includes constructors for
@@ -5834,6 +5763,77 @@ AST elements (table)
<!-- END: AUTOGENERATED CONTENT -->
+# Module pandoc.text
+
+UTF-8 aware text manipulation functions, implemented in Haskell.
+
+The text module can also be loaded under the name `text`, although
+this is discouraged and deprecated.
+
+``` lua
+-- uppercase all regular text in a document:
+function Str (s)
+ s.text = pandoc.text.upper(s.text)
+ return s
+end
+```
+
+### fromencoding {#text.fromencoding}
+
+`fromencoding(s, encoding)`
+
+Converts a string to UTF-8. The `encoding` parameter specifies the
+encoding of the input string. On Windows, that parameter defaults
+to the current ANSI code page; on other platforms the function
+will try to use the file system's encoding.
+
+See [`toencoding`](#text.toencoding) for more info on supported
+encodings.
+
+### lower {#text.lower}
+
+`lower (s)`
+
+Returns a copy of a UTF-8 string, converted to lowercase.
+
+### upper {#text.upper}
+
+`upper (s)`
+
+Returns a copy of a UTF-8 string, converted to uppercase.
+
+### reverse {#text.reverse}
+
+`reverse (s)`
+
+Returns a copy of a UTF-8 string, with characters reversed.
+
+### len {#text.len}
+
+`len (s)`
+
+Returns the length of a UTF-8 string.
+
+### sub {#text.sub}
+
+`sub (s)`
+
+Returns a substring of a UTF-8 string, using Lua's string
+indexing rules.
+
+### toencoding {#text.toencoding}
+
+`toencoding(s, encoding)`
+
+Converts a UTF-8 string to a different encoding. The `encoding`
+parameter defaults to the current ANSI code page on Windows; on
+other platforms it will try to guess the file system's encoding.
+
+The set of known encodings is system dependent, but includes at
+least `UTF-8`, `UTF-16BE`, `UTF-16LE`, `UTF-32BE`, and `UTF-32LE`.
+Note that the default code page on Windows is available through
+`CP0`.
+
# Module pandoc.template
Handle pandoc templates.