Skip to content

Commit

Permalink
Merge pull request #5 from laszewsk/master
Browse files Browse the repository at this point in the history
Update pandoc_codeblock_include.py
  • Loading branch information
chdemko committed Dec 13, 2018
2 parents 812759a + 183dc52 commit 2b4f974
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pandoc_codeblock_include.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ def include(elem, doc):

if doc.format in ['latex', 'beamer']:
# Clear the attributes else latex will get a problem with the listings
del elem.attributes['include']
del elem.attributes['endAt']
if 'include' in elem.attributes:
del elem.attributes['include']
if 'endAt' in elem.attributes:
del elem.attributes['endAt']

def main(doc = None):
return run_filter(include, doc = doc)
Expand Down

0 comments on commit 2b4f974

Please sign in to comment.