summaryrefslogtreecommitdiff
path: root/bs4/builder/_html5lib.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonardr@segfault.org>2024-01-17 10:56:15 -0500
committerLeonard Richardson <leonardr@segfault.org>2024-01-17 10:56:15 -0500
commitceee9911ca1cc8b1e67efeea6ed74564f4820c3f (patch)
tree830b16ecff7737945d20331376ed1e9dc5dfc645 /bs4/builder/_html5lib.py
parent5df3671025db06ae9da2f8c81cd836f383127bc4 (diff)
Added the correct stacklevel to instances of the XMLParsedAsHTMLWarning.
[bug=2034451]
Diffstat (limited to 'bs4/builder/_html5lib.py')
-rw-r--r--bs4/builder/_html5lib.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bs4/builder/_html5lib.py b/bs4/builder/_html5lib.py
index dac2173..7c46a85 100644
--- a/bs4/builder/_html5lib.py
+++ b/bs4/builder/_html5lib.py
@@ -77,7 +77,9 @@ class HTML5TreeBuilder(HTMLTreeBuilder):
# html5lib only parses HTML, so if it's given XML that's worth
# noting.
- DetectsXMLParsedAsHTML.warn_if_markup_looks_like_xml(markup)
+ DetectsXMLParsedAsHTML.warn_if_markup_looks_like_xml(
+ markup, stacklevel=3
+ )
yield (markup, None, None, False)