Place guards, checks for multiline shell hacks

This commit is contained in:
Ted Nyman
2013-12-06 20:39:02 -08:00
parent 8603760ebe
commit 7e178cc416
5 changed files with 18 additions and 14 deletions

View File

@@ -190,9 +190,9 @@ module Linguist
# Public: Is the blob safe to colorize?
#
# We use Pygments for syntax highlighting blobs. Pygments
# can be too slow for very large blobs or for certain
# can be too slow for very large blobs or for certain
# corner-case blobs.
#
#
# Return true or false
def safe_to_colorize?
!large? && text? && !high_ratio_of_long_lines?