summaryrefslogtreecommitdiff
path: root/repo/www/helpers.py
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@gmail.com>2020-08-18 22:30:19 +0200
committerKévin Le Gouguec <kevin.legouguec@gmail.com>2020-08-18 22:30:19 +0200
commitb5205f3253e745083f55f40f4a5e64cb2da39aac (patch)
treec754b027780304bccfe114789839b312b96b8952 /repo/www/helpers.py
parent205b6d12ff5673bd8ae59f827f07b69771b9dfee (diff)
downloadmemory-leaks-b5205f3253e745083f55f40f4a5e64cb2da39aac.tar.xz
Pass filters to generation scripts explicitly
Diffstat (limited to 'repo/www/helpers.py')
-rw-r--r--repo/www/helpers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/repo/www/helpers.py b/repo/www/helpers.py
index 16cd496..434ef6c 100644
--- a/repo/www/helpers.py
+++ b/repo/www/helpers.py
@@ -1,5 +1,6 @@
from collections import defaultdict
from dataclasses import dataclass, field
+from itertools import chain
from os import path
from subprocess import run
from typing import Iterator
@@ -55,10 +56,10 @@ def deserialize_directories(directories):
}
-def pandoc(page, output, template, title=None, site_title=None):
+def pandoc(page, output, template, filters, title=None, site_title=None):
cmd = (
'pandoc', '-s', page, '-o', output, '--template', template,
- '--lua-filter', 'convert-internal-links.lua'
+ *chain(*(('--lua-filter', f) for f in filters))
)
if title is not None: