Skip to content

Commit 183dc52

Browse files
authored
Update pandoc_codeblock_include.py
check for endAt
1 parent 812759a commit 183dc52

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandoc_codeblock_include.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@ def include(elem, doc):
3838

3939
if doc.format in ['latex', 'beamer']:
4040
# Clear the attributes else latex will get a problem with the listings
41-
del elem.attributes['include']
42-
del elem.attributes['endAt']
41+
if 'include' in elem.attributes:
42+
del elem.attributes['include']
43+
if 'endAt' in elem.attributes:
44+
del elem.attributes['endAt']
4345

4446
def main(doc = None):
4547
return run_filter(include, doc = doc)

0 commit comments

Comments
 (0)