fixed styles
This commit is contained in:
@@ -141,7 +141,7 @@ class CompilerFilter(FilterBase):
|
|||||||
self.infile = open(self.filename)
|
self.infile = open(self.filename)
|
||||||
options["infile"] = self.filename
|
options["infile"] = self.filename
|
||||||
|
|
||||||
if "{outfile}" in self.command and not "outfile" in options:
|
if "{outfile}" in self.command and "outfile" not in options:
|
||||||
# create temporary output file if needed
|
# create temporary output file if needed
|
||||||
ext = self.type and ".%s" % self.type or ""
|
ext = self.type and ".%s" % self.type or ""
|
||||||
self.outfile = NamedTemporaryFile(mode='r+', suffix=ext)
|
self.outfile = NamedTemporaryFile(mode='r+', suffix=ext)
|
||||||
|
|||||||
@@ -134,10 +134,10 @@ def _make_jsmin(python_only=False):
|
|||||||
if last is not None:
|
if last is not None:
|
||||||
result.append((first, last))
|
result.append((first, last))
|
||||||
return ''.join(['%s%s%s' % (
|
return ''.join(['%s%s%s' % (
|
||||||
chr(first),
|
chr(first2),
|
||||||
last > first + 1 and '-' or '',
|
last2 > first2 + 1 and '-' or '',
|
||||||
last != first and chr(last) or ''
|
last2 != first2 and chr(last2) or ''
|
||||||
) for first, last in result])
|
) for first2, last2 in result])
|
||||||
|
|
||||||
return _re.sub(r'([\000-\040\047])', # for better portability
|
return _re.sub(r'([\000-\040\047])', # for better portability
|
||||||
lambda m: '\\%03o' % ord(m.group(1)), (sequentize(result)
|
lambda m: '\\%03o' % ord(m.group(1)), (sequentize(result)
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ def compress(parser, token):
|
|||||||
|
|
||||||
if len(args) >= 3:
|
if len(args) >= 3:
|
||||||
mode = args[2]
|
mode = args[2]
|
||||||
if not mode in OUTPUT_MODES:
|
if mode not in OUTPUT_MODES:
|
||||||
raise template.TemplateSyntaxError(
|
raise template.TemplateSyntaxError(
|
||||||
"%r's second argument must be '%s' or '%s'." %
|
"%r's second argument must be '%s' or '%s'." %
|
||||||
(args[0], OUTPUT_FILE, OUTPUT_INLINE))
|
(args[0], OUTPUT_FILE, OUTPUT_INLINE))
|
||||||
|
|||||||
Reference in New Issue
Block a user