summaryrefslogtreecommitdiff
path: root/bs4/doc/source/index.rst
diff options
context:
space:
mode:
Diffstat (limited to 'bs4/doc/source/index.rst')
-rw-r--r--bs4/doc/source/index.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/bs4/doc/source/index.rst b/bs4/doc/source/index.rst
index ad1dbf7..3cf96f0 100644
--- a/bs4/doc/source/index.rst
+++ b/bs4/doc/source/index.rst
@@ -1525,23 +1525,23 @@ say. It works just like ``.insert()`` on a Python list::
tag.contents
# [u'I linked to ', u'but did not endorse', <i>example.com</i>]
-``move_before()`` and ``move_after()``
+``insert_before()`` and ``insert_after()``
------------------------------------------
-The ``move_before()`` method moves a tag or string so that it
+The ``insert_before()`` method moves a tag or string so that it
immediately precedes something else in the parse tree::
soup = BeautifulSoup("<b>stop</b>")
tag = soup.new_tag("i")
tag.string = "Don't"
- tag.move_before(soup.b.string)
+ tag.insert_before(soup.b.string)
soup.b
# <b><i>Don't</i>stop</b>
-The ``move_after()`` method moves a tag or string so that it
+The ``insert_after()`` method moves a tag or string so that it
immediately follows something else in the parse tree::
- soup.new_string(" ever ").move_after(soup.b.i)
+ soup.new_string(" ever ").insert_after(soup.b.i)
soup.b
# <b><i>Don't</i> ever stop</b>
soup.b.contents