From cbce97624b05a399cd5805c5938b342a8e10fe9b Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Thu, 9 Feb 2023 08:15:15 -0500 Subject: Add another import of NavigableString just before the constructor is used, since most people don't run all the code in the doc in order. --- doc/source/index.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/source') diff --git a/doc/source/index.rst b/doc/source/index.rst index f1be0c5..55dde0b 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1972,6 +1972,7 @@ If you need to add a string to a document, no problem--you can pass a Python string in to ``append()``, or you can call the ``NavigableString`` constructor:: + from bs4 import NavigableString soup = BeautifulSoup("", 'html.parser') tag = soup.b tag.append("Hello") -- cgit v1.2.3