summaryrefslogtreecommitdiff
path: root/sphinx/pycode
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2016-01-20 22:48:16 +0900
committershimizukawa <shimizukawa@gmail.com>2016-01-20 22:50:59 +0900
commit0f2e62db24aa4e484da08c558d8c873598576943 (patch)
treed4de17ffa8dae273076a7ad2b3604a4742ebe0df /sphinx/pycode
parente89d8777f2fed9a339ecc614297a967d03200123 (diff)
downloadsphinx-git-0f2e62db24aa4e484da08c558d8c873598576943.tar.gz
Fix #2253: ``:pyobject:`` option of ``literalinclude`` directive can't detect indented body block when the block starts with blank or comment lines.
Diffstat (limited to 'sphinx/pycode')
-rw-r--r--sphinx/pycode/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py
index 8e8ecf706..3da887d6c 100644
--- a/sphinx/pycode/__init__.py
+++ b/sphinx/pycode/__init__.py
@@ -300,7 +300,7 @@ class ModuleAnalyzer(object):
yield tokentup
tokeniter = tokeniter()
for type, tok, spos, epos, line in tokeniter:
- if expect_indent:
+ if expect_indent and type != token.NL:
if type != token.INDENT:
# no suite -- one-line definition
assert stack