From bce5fdfa3ab60ae443fd5ae32424826e9296f59a Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sun, 10 Jul 2022 11:23:10 +0200 Subject: Add support for custom emojis --- filters/lib/common.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'filters/lib') 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) end end +function string.split(str, sep) + sep = sep or '%s' + + local parts = pandoc.List() + + for field, s in str:gmatch("([^" .. sep .. "]*)(" .. sep .. "?)") do + parts:insert(field) + if s == "" then return parts end + end +end + return { - wide = wide + wide = wide, dump = dump } -- cgit v1.2.3-54-g00ecf