summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-04-26 12:55:59 -0400
committerLeonard Richardson <leonard.richardson@canonical.com>2012-04-26 12:55:59 -0400
commitd1261fb0a2df9929658dfdc9fe5880974e287d21 (patch)
tree39f1ffc1a9efe21e0f45386a96cbbb495301559d /doc/source
parent12f37383078c18a37968a8446961eff7a4e77e75 (diff)
Renamed replace_with_children() to the jQuery name, unwrap().
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/index.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 17d2211..ef60c24 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1894,21 +1894,21 @@ and replaces it with the tag or string of your choice::
``replace_with()`` returns the tag or string that was replaced, so
that you can examine it or add it back to another part of the tree.
-``replace_with_children()``
+``unwrap()``
---------------------------
-``Tag.replace_with_children()`` replaces a tag with whatever's inside
+``Tag.unwrap()`` replaces a tag with whatever's inside
that tag. It's good for stripping out markup::
markup = '<a href="http://example.com/">I linked to <i>example.com</i></a>'
soup = BeautifulSoup(markup)
a_tag = soup.a
- a_tag.i.replace_with_children()
+ a_tag.i.unwrap()
a_tag
# <a href="http://example.com/">I linked to example.com</a>
-Like ``replace_with()``, ``replace_with_children()`` returns the tag
+Like ``replace_with()``, ``unwrap()`` returns the tag
that was replaced.
Output
@@ -2696,7 +2696,7 @@ Method names
* ``renderContents`` -> ``encode_contents``
* ``replaceWith`` -> ``replace_with``
-* ``replaceWithChildren`` -> ``replace_with_children``
+* ``replaceWithChildren`` -> ``unwrap``
* ``findAll`` -> ``find_all``
* ``findAllNext`` -> ``find_all_next``
* ``findAllPrevious`` -> ``find_all_previous``