diff options
author | Volpeon <git@volpeon.ink> | 2021-05-06 21:53:04 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-05-06 21:53:04 +0200 |
commit | e99681e1abb802e486a7042434ec2697585a9d0e (patch) | |
tree | 66a286c6b95b27d76c0170b0ad261b5016cdc553 /filters | |
parent | Update (diff) | |
download | volpeon.ink-e99681e1abb802e486a7042434ec2697585a9d0e.tar.gz volpeon.ink-e99681e1abb802e486a7042434ec2697585a9d0e.tar.bz2 volpeon.ink-e99681e1abb802e486a7042434ec2697585a9d0e.zip |
Update
Diffstat (limited to 'filters')
-rw-r--r-- | filters/common_actions.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/filters/common_actions.lua b/filters/common_actions.lua index 262f086..5b6c86b 100644 --- a/filters/common_actions.lua +++ b/filters/common_actions.lua | |||
@@ -1,12 +1,15 @@ | |||
1 | function CodeBlock(el) | 1 | function CodeBlock(el) |
2 | if el.classes[1] == "plain" then | 2 | if el.classes[1] == "plain" then |
3 | el = pandoc.Div({el}, {class = 's-code'}) | 3 | el = pandoc.Div({el}, {class = 's-code'}) |
4 | else | 4 | elseif el.classes[1] then |
5 | local formatted = pandoc.pipe('pygmentize', { | 5 | local formatted = pandoc.pipe('pygmentize', { |
6 | '-l', el.classes[1], '-f', 'html', '-O', | 6 | '-l', el.classes[1], '-f', 'html', '-O', |
7 | 'cssclass=s-code s-code--highlight' | 7 | 'cssclass=s-code s-code--highlight' |
8 | }, el.text) | 8 | }, el.text) |
9 | el = pandoc.RawBlock('html', formatted) | 9 | |
10 | if formatted then | ||
11 | el = pandoc.RawBlock('html', formatted) | ||
12 | end | ||
10 | end | 13 | end |
11 | 14 | ||
12 | return el | 15 | return el |
@@ -16,7 +19,7 @@ function Header(el) | |||
16 | if el.level == 1 then | 19 | if el.level == 1 then |
17 | local newchildren = pandoc.List() | 20 | local newchildren = pandoc.List() |
18 | 21 | ||
19 | newchildren:insert(pandoc.Span(el.content, {class = 's-body__title-inner'})) | 22 | newchildren:insert(pandoc.Span(el.content, {class = 's-headlines__title-inner'})) |
20 | 23 | ||
21 | el.content = newchildren | 24 | el.content = newchildren |
22 | end | 25 | end |