fixed styles
This commit is contained in:
@@ -141,7 +141,7 @@ class CompilerFilter(FilterBase):
|
||||
self.infile = open(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
|
||||
ext = self.type and ".%s" % self.type or ""
|
||||
self.outfile = NamedTemporaryFile(mode='r+', suffix=ext)
|
||||
|
@@ -111,10 +111,10 @@ def _make_cssmin(python_only=False):
|
||||
escape = r'(?:\\(?:%(unicoded)s|%(escaped)s))' % locals()
|
||||
|
||||
nmchar = r'[^\000-\054\056\057\072-\100\133-\136\140\173-\177]'
|
||||
#nmstart = r'[^\000-\100\133-\136\140\173-\177]'
|
||||
#ident = (r'(?:'
|
||||
# nmstart = r'[^\000-\100\133-\136\140\173-\177]'
|
||||
# ident = (r'(?:'
|
||||
# r'-?(?:%(nmstart)s|%(escape)s)%(nmchar)s*(?:%(escape)s%(nmchar)s*)*'
|
||||
#r')') % locals()
|
||||
# r')') % locals()
|
||||
|
||||
comment = r'(?:/\*[^*]*\*+(?:[^/*][^*]*\*+)*/)'
|
||||
|
||||
@@ -192,7 +192,7 @@ def _make_cssmin(python_only=False):
|
||||
r'|(%(escape)s[^\\"\047u>@\r\n\f\040\t/;:{}]*)'
|
||||
) % locals()).sub
|
||||
|
||||
#print main_sub.__self__.pattern
|
||||
# print main_sub.__self__.pattern
|
||||
|
||||
def main_subber(keep_bang_comments):
|
||||
""" Make main subber """
|
||||
|
@@ -134,10 +134,10 @@ def _make_jsmin(python_only=False):
|
||||
if last is not None:
|
||||
result.append((first, last))
|
||||
return ''.join(['%s%s%s' % (
|
||||
chr(first),
|
||||
last > first + 1 and '-' or '',
|
||||
last != first and chr(last) or ''
|
||||
) for first, last in result])
|
||||
chr(first2),
|
||||
last2 > first2 + 1 and '-' or '',
|
||||
last2 != first2 and chr(last2) or ''
|
||||
) for first2, last2 in result])
|
||||
|
||||
return _re.sub(r'([\000-\040\047])', # for better portability
|
||||
lambda m: '\\%03o' % ord(m.group(1)), (sequentize(result)
|
||||
|
@@ -201,7 +201,7 @@ def compress(parser, token):
|
||||
|
||||
if len(args) >= 3:
|
||||
mode = args[2]
|
||||
if not mode in OUTPUT_MODES:
|
||||
if mode not in OUTPUT_MODES:
|
||||
raise template.TemplateSyntaxError(
|
||||
"%r's second argument must be '%s' or '%s'." %
|
||||
(args[0], OUTPUT_FILE, OUTPUT_INLINE))
|
||||
|
Reference in New Issue
Block a user