Fix a loop

This commit is contained in:
Takeshi KOMIYA
2017-02-25 16:54:49 +09:00
parent 675b5f4237
commit 9718c4d925

View File

@@ -430,7 +430,7 @@ class LiteralInclude(Directive):
logger.warning('line number spec is out of range(1-%d): %r' %
(lines, self.options['emphasize_lines']),
location=location)
extra_args['hl_lines'] = [x + 1 for x in hl_lines if x < len(lines)]
extra_args['hl_lines'] = [x + 1 for x in hl_lines if x < lines]
extra_args['linenostart'] = reader.lineno_start
if 'caption' in self.options: