mirror of
https://github.com/eliasstepanik/strudel.git
synced 2026-01-10 21:28:31 +00:00
13 lines
325 B
Python
Executable File
13 lines
325 B
Python
Executable File
#!/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)
|