summaryrefslogtreecommitdiff
path: root/sphinx/directives/code.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-02-17 10:49:53 +0100
committerGeorg Brandl <georg@python.org>2010-02-17 10:49:53 +0100
commitf9ba148d8517047057e419bfec6447e6206c0dbe (patch)
tree1b549708fbc7160cc83292baae383800030b9358 /sphinx/directives/code.py
parentc8ccbf9ce876faefb658a3be488fe4c4243d74a9 (diff)
parenta515165be65130bc59726d5ae4a29e582a55ee9c (diff)
downloadsphinx-git-f9ba148d8517047057e419bfec6447e6206c0dbe.tar.gz
merge with trunk
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r--sphinx/directives/code.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py
index 4136bcec6..5497a3652 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -159,9 +159,9 @@ class LiteralInclude(Directive):
use = not startafter
res = []
for line in lines:
- if not use and startafter in line:
+ if not use and startafter and startafter in line:
use = True
- elif use and endbefore in line:
+ elif use and endbefore and endbefore in line:
use = False
break
elif use: