diff options
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 | ||