summaryrefslogtreecommitdiff
path: root/bs4/element.py
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/element.py')
-rw-r--r--bs4/element.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bs4/element.py b/bs4/element.py
index d1b7c12..0486da2 100644
--- a/bs4/element.py
+++ b/bs4/element.py
@@ -689,7 +689,10 @@ class NavigableString(unicode, PageElement):
return u
def __copy__(self):
- return self
+ """A copy of a NavigableString has the same contents and class
+ as the original, but it is not connected to the parse tree.
+ """
+ return type(self)(self)
def __getnewargs__(self):
return (unicode(self),)