diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-18 22:30:19 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2020-08-18 22:30:19 +0200 |
| commit | b5205f3253e745083f55f40f4a5e64cb2da39aac (patch) | |
| tree | c754b027780304bccfe114789839b312b96b8952 /repo/www/helpers.py | |
| parent | 205b6d12ff5673bd8ae59f827f07b69771b9dfee (diff) | |
| download | memory-leaks-b5205f3253e745083f55f40f4a5e64cb2da39aac.tar.xz | |
Pass filters to generation scripts explicitly
Diffstat (limited to 'repo/www/helpers.py')
| -rw-r--r-- | repo/www/helpers.py | 5 |
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: |
