This commit is contained in:
alex 2022-03-22 15:12:50 +00:00
parent c22eab7406
commit 876e8be54e
6 changed files with 72 additions and 0 deletions

12
paper/filter.py Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env python3
import sys
from pandocfilters import toJSONFilter, RawBlock
def toMiniREPL(key, value, format, meta):
# print(value, file=sys.stderr)
if key == 'CodeBlock':
return RawBlock("markdown", "<MiniRepl tune={`" + value[1] + "`} />")
if __name__ == "__main__":
toJSONFilter(toMiniREPL)