diff options
author | Georg Brandl <georg@python.org> | 2010-01-30 18:49:42 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-01-30 18:49:42 +0100 |
commit | 4688518d8d788ce33ba07c85df1d30515bf12495 (patch) | |
tree | 684b7d439094cdb3da4638ef9de896abc09d96db /sphinx/directives/code.py | |
parent | 6aff01ea31fd66a736d807a24bf6c435722e0ad1 (diff) | |
download | sphinx-git-4688518d8d788ce33ba07c85df1d30515bf12495.tar.gz |
Make the ``start-after`` and ``end-before`` options to the ``literalinclude`` directive work correctly if not used together.
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index ffb9ce4d6..f5a8f8af4 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -155,9 +155,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: |