tools: Fix truncated file contents.

This commit is contained in:
Andrew Hamilton 2019-09-03 15:53:53 +10:00
parent 03f348622e
commit 23b4f8c931

View file

@ -249,7 +249,7 @@ def contents(path):
tail = file_.read() tail = file_.read()
except UnicodeDecodeError: except UnicodeDecodeError:
return Status.not_applicable, "Not unicode" return Status.not_applicable, "Not unicode"
text = _fix_input(head) text = _fix_input(head + tail)
try: try:
text = _syntax_highlight_using_path(text, path) text = _syntax_highlight_using_path(text, path)
except pygments.util.ClassNotFound: except pygments.util.ClassNotFound: