Skip to content

Commit fad92e4

Browse files
committed
IncludeFilter.py works with pandoc 1.x and 2.x now
1 parent 89f5f35 commit fad92e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

doc/src/IncludeFilter.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ def include(key, val):
1111
if kv[0] == 'include':
1212
src0 = subprocess.check_output(['pandoc', '-s', kv[1], '-t', 'json'])
1313
j = json.loads(src0)
14-
return recurse(j['blocks'])
14+
if type(j) is list: return recurse(j[1])
15+
else : return recurse(j['blocks'])
1516
elif kv[0] == 'image':
1617
return {"t":"Para","c":[{"t":"Str","c":"![][" + kv[1] + "]"}]}
1718
return None

0 commit comments

Comments
 (0)