diff options
author | Volpeon <git@volpeon.ink> | 2022-07-10 18:51:39 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2022-07-10 18:51:39 +0200 |
commit | 31992bdba775fc3022a858ace9743620e70aee17 (patch) | |
tree | 5946c1e2edfcad8d3b36b1e1fd554e0a6c2f39db /filters | |
parent | Add support for custom emojis (diff) | |
download | volpeon.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.lua | 6 |
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 @@ | |||
1 | local common = require 'filters.lib.common' | ||
2 | |||
3 | function Str(el) | 1 | function 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 | ||