Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsmedina committed Apr 3, 2016
2 parents a2c5b92 + b3269e7 commit ac62bcc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 11 additions & 2 deletions htmlmin/minify.py
Expand Up @@ -7,12 +7,21 @@
import re

import six

import bs4

try:
from django.conf import settings
except:
settings = {}

from .util import force_text

EXCLUDE_TAGS = set(["pre", "script", "textarea"])
EXCLUDE_TAGS = ("pre", "script", "textarea",)
try:
EXCLUDE_TAGS = getattr(settings, "EXCLUDE_TAGS_FROM_MINIFYING", ("pre", "script", "textarea",))
except:
pass # working in non Django projects

# element list coming from
# https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/HTML5_element_list
# combining text-level semantics & edits
Expand Down
2 changes: 2 additions & 0 deletions htmlmin/tests/test_minify.py
Expand Up @@ -10,6 +10,8 @@
import unittest
from os.path import abspath, dirname, join

from django.conf import settings

import six

from htmlmin.minify import html_minify
Expand Down

0 comments on commit ac62bcc

Please sign in to comment.