summaryrefslogtreecommitdiff
path: root/bs4/__init__.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2020-09-26 11:18:12 -0400
committerLeonard Richardson <leonardr@segfault.org>2020-09-26 11:18:12 -0400
commit4eef28adde8d1b09dda10b1f6c4f8f896a2b9393 (patch)
treed7f3b1e645f4fa3afd128a5d05fce939bc36de90 /bs4/__init__.py
parente37c55b111b6d3ece22237188ad77a1ea9cd3724 (diff)
Fixed a bug that inconsistently moved elements over when passing
a Tag, rather than a list, into Tag.extend(). [bug=1885710]
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r--bs4/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py
index 73109d6..2b82864 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -253,7 +253,9 @@ class BeautifulSoup(Tag):
if not original_builder and not (
original_features == builder.NAME or
original_features in builder.ALTERNATE_NAMES
- ):
+ ) and markup:
+ # The user did not tell us which TreeBuilder to use,
+ # and we had to guess. Issue a warning.
if builder.is_xml:
markup_type = "XML"
else: