summaryrefslogtreecommitdiffstats
path: root/filters/lib
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-07-10 11:23:10 +0200
committerVolpeon <git@volpeon.ink>2022-07-10 11:23:10 +0200
commitbce5fdfa3ab60ae443fd5ae32424826e9296f59a (patch)
tree2ed1502b7badda56502da8bb2bbab3238a616a60 /filters/lib
parentUpdate (diff)
downloadvolpeon.ink-bce5fdfa3ab60ae443fd5ae32424826e9296f59a.tar.gz
volpeon.ink-bce5fdfa3ab60ae443fd5ae32424826e9296f59a.tar.bz2
volpeon.ink-bce5fdfa3ab60ae443fd5ae32424826e9296f59a.zip
Add support for custom emojis
Diffstat (limited to 'filters/lib')
-rw-r--r--filters/lib/common.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/filters/lib/common.lua b/filters/lib/common.lua
index 7654eb9..4d44ff3 100644
--- a/filters/lib/common.lua
+++ b/filters/lib/common.lua
@@ -25,6 +25,17 @@ function dump(o)
25 end 25 end
26end 26end
27 27
28function string.split(str, sep)
29 sep = sep or '%s'
30
31 local parts = pandoc.List()
32
33 for field, s in str:gmatch("([^" .. sep .. "]*)(" .. sep .. "?)") do
34 parts:insert(field)
35 if s == "" then return parts end
36 end
37end
38
28return { 39return {
29 wide = wide 40 wide = wide, dump = dump
30} 41}