summaryrefslogtreecommitdiff
path: root/sphinx/directives/code.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-05-21 09:51:35 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-05-21 09:52:46 +0900
commita43cac55bcc22311f63fc4cfc4c1b92facf9c3c1 (patch)
tree2ca79ad108d82dd7b62907e60c67715c8041021d /sphinx/directives/code.py
parentb18a3f82b476e04a88e641134919b643facb9ea1 (diff)
downloadsphinx-git-a43cac55bcc22311f63fc4cfc4c1b92facf9c3c1.tar.gz
Fix #3770: Fix KeyError from code-block directive
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 f0da0d747..e372762ce 100644
--- a/sphinx/directives/code.py
+++ b/sphinx/directives/code.py
@@ -127,7 +127,7 @@ class CodeBlock(Directive):
hl_lines = parselinenos(linespec, nlines)
if any(i >= nlines for i in hl_lines):
logger.warning('line number spec is out of range(1-%d): %r' %
- (nlines, self.options['emphasize_lines']),
+ (nlines, self.options['emphasize-lines']),
location=location)
hl_lines = [x + 1 for x in hl_lines if x < nlines]
@@ -441,7 +441,7 @@ class LiteralInclude(Directive):
hl_lines = parselinenos(self.options['emphasize-lines'], lines)
if any(i >= lines for i in hl_lines):
logger.warning('line number spec is out of range(1-%d): %r' %
- (lines, self.options['emphasize_lines']),
+ (lines, self.options['emphasize-lines']),
location=location)
extra_args['hl_lines'] = [x + 1 for x in hl_lines if x < lines]
extra_args['linenostart'] = reader.lineno_start