diff --git a/pystache/loader.py b/pystache/loader.py index d4a7e53..1db6c40 100644 --- a/pystache/loader.py +++ b/pystache/loader.py @@ -6,6 +6,7 @@ """ import os +import platform import sys from pystache import common @@ -118,7 +119,8 @@ def read(self, path, encoding=None): if encoding is None: encoding = self.file_encoding - + if platform.system() == "Windows": + return self.unicode(b, encoding).replace('\r', '') return self.unicode(b, encoding) def load_file(self, file_name):