smitthakkar96 / pagure

Forked from pagure 7 years ago
Clone

eae5cce Rename is_binary into could_be_text and adjust its logic

Authored and Committed by pingou 8 years ago
    Rename is_binary into could_be_text and adjust its logic
    
    Finally the easiest way to see if the content of a blob is binary or
    text is to try to encode it in UTF-8.
    If that works, we'll assume jinja will render it correctly, otherwise
    we consider it a binary file and bail out.
    
        
file modified
+4 -34