aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-11-23 18:32:53 +0100
committerGitHub <noreply@github.com>2021-11-23 09:32:53 -0800
commitbffd74323cfd91f5c44ca34e09633247d1d28954 (patch)
tree2036e51b9043c15b4e88e513c9c9bdc20a4b469c /doc
parent0c0945b93c2ae502c0629d93e9ad520dbe17c625 (diff)
downloadpandoc-bffd74323cfd91f5c44ca34e09633247d1d28954.tar.gz
Lua: add function `pandoc.utils.text` (#7710)
The function converts a string to `Inlines`, treating interword spaces as `Space`s or `SoftBreak`s. If you want a `Str` with literal spaces, use `pandoc.Str`. Closes: #7709
Diffstat (limited to 'doc')
-rw-r--r--doc/lua-filters.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 9fc90a13f..db5d1ccac 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -3082,6 +3082,24 @@ Usage:
-- outputs "Moin"
print(pandoc.utils.stringify(inline))
+### text {#pandoc.utils.text}
+
+`text (words)`
+
+Converts a string to `Inlines`, treating interword spaces as
+`Space`s or `SoftBreak`s. If you want a single `Str` with literal
+spaces, use `pandoc.Str`.
+
+Parameters:
+
+`words`
+: markup-less text (string)
+
+Returns:
+
+- List of inline elements split into words (Inlines)
+
+
### to\_roman\_numeral {#pandoc.utils.to_roman_numeral}
`to_roman_numeral (integer)`