fix line separator issue

This commit is contained in:
Jeppe Pihl 2014-10-06 13:47:58 +02:00
parent 0b0cf82a75
commit 702252c4e4

View File

@ -9,7 +9,6 @@
import sys
import codecs
import os
from difflib import unified_diff
from docutils import nodes
@ -296,9 +295,11 @@ class LiteralInclude(Directive):
lines = res
if 'lineno-match' in self.options:
# handle that preceding, empty lines ('\n') are removed.
# handle that docutils remove preceding lines which only contains
# line separation.
for line in lines:
if line != os.linesep:
# check if line contains anything else than line separation.
if line and line.splitlines()[0]:
break
linenostart += 1