diff options
Diffstat (limited to 'filters')
-rw-r--r-- | filters/icons.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/filters/icons.lua b/filters/icons.lua new file mode 100644 index 0000000..3800e5d --- /dev/null +++ b/filters/icons.lua | |||
@@ -0,0 +1,11 @@ | |||
1 | function Str(el) | ||
2 | local icon = el.text:match('^:(.*):$') | ||
3 | |||
4 | if icon then | ||
5 | return pandoc.RawInline('html', | ||
6 | '<svg class="o-icon o-icon--inline" width="1em" height="1em"><use href="/symbols.svg#' .. icon .. | ||
7 | '"></use></svg>') | ||
8 | end | ||
9 | |||
10 | return el | ||
11 | end | ||