summaryrefslogtreecommitdiff
path: root/bs4/builder
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/builder')
-rw-r--r--bs4/builder/__init__.py4
-rw-r--r--bs4/builder/_html5lib.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/bs4/builder/__init__.py b/bs4/builder/__init__.py
index 46b28bd..4207750 100644
--- a/bs4/builder/__init__.py
+++ b/bs4/builder/__init__.py
@@ -8,7 +8,7 @@ from bs4.element import (
CharsetMetaAttributeValue,
ContentMetaAttributeValue,
HTMLAwareEntitySubstitution,
- whitespace_re
+ nonwhitespace_re
)
__all__ = [
@@ -173,7 +173,7 @@ class TreeBuilder(object):
# values. Split it into a list.
value = attrs[attr]
if isinstance(value, basestring):
- values = whitespace_re.split(value)
+ values = nonwhitespace_re.findall(value)
else:
# html5lib sometimes calls setAttributes twice
# for the same tag when rearranging the parse
diff --git a/bs4/builder/_html5lib.py b/bs4/builder/_html5lib.py
index 2c929b9..6fa8593 100644
--- a/bs4/builder/_html5lib.py
+++ b/bs4/builder/_html5lib.py
@@ -15,7 +15,7 @@ from bs4.builder import (
)
from bs4.element import (
NamespacedAttribute,
- whitespace_re,
+ nonwhitespace_re,
)
import html5lib
from html5lib.constants import (
@@ -206,7 +206,7 @@ class AttrList(object):
# A node that is being cloned may have already undergone
# this procedure.
if not isinstance(value, list):
- value = whitespace_re.split(value)
+ value = nonwhitespace_re.findall(value)
self.element[name] = value
def items(self):
return list(self.attrs.items())