summaryrefslogtreecommitdiffstats
path: root/filters
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2022-07-10 18:51:39 +0200
committerVolpeon <git@volpeon.ink>2022-07-10 18:51:39 +0200
commit31992bdba775fc3022a858ace9743620e70aee17 (patch)
tree5946c1e2edfcad8d3b36b1e1fd554e0a6c2f39db /filters
parentAdd support for custom emojis (diff)
downloadvolpeon.ink-31992bdba775fc3022a858ace9743620e70aee17.tar.gz
volpeon.ink-31992bdba775fc3022a858ace9743620e70aee17.tar.bz2
volpeon.ink-31992bdba775fc3022a858ace9743620e70aee17.zip
Fixed date handling
Diffstat (limited to 'filters')
-rw-r--r--filters/emojis.lua6
1 files changed, 2 insertions, 4 deletions
diff --git a/filters/emojis.lua b/filters/emojis.lua
index 5eb9d4b..427d04b 100644
--- a/filters/emojis.lua
+++ b/filters/emojis.lua
@@ -1,15 +1,13 @@
1local common = require 'filters.lib.common'
2
3function Str(el) 1function Str(el)
4 local prefix, emojiref, suffix = el.text:match('^(.*):([^ ]+):(.*)$') 2 local prefix, emojiref, suffix = el.text:match('^(.*):([^ ]+):(.*)$')
5 3
6 if emojiref then 4 if emojiref then
7 local els = pandoc.List() 5 local els = pandoc.List()
8 6
9 els:insert(pandoc.Str(prefix)) 7 els:insert(pandoc.Str(prefix))
10 els:insert(pandoc.Image(emojiref, "/emojis/" .. emojiref .. ".png", emojiref, { class = 'o-emoji' })) 8 els:insert(pandoc.Image(emojiref, "/emojis/" .. emojiref .. ".png", emojiref, { class = 'o-emoji' }))
11 els:insert(pandoc.Str(suffix)) 9 els:insert(pandoc.Str(suffix))
12 10
13 return els 11 return els
14 end 12 end
15 13