diff options
author | Leonard Richardson <leonardr@segfault.org> | 2015-07-05 11:16:40 -0400 |
---|---|---|
committer | Leonard Richardson <leonardr@segfault.org> | 2015-07-05 11:16:40 -0400 |
commit | 39d06d4d20b7de5ef74505512429eb778b9c1566 (patch) | |
tree | 11b9343c74a8fd1587cd9f0d45dd908fd3b21995 /doc | |
parent | 1e39ce4c8644ea6e572a50246025f32ce560e539 (diff) | |
download | beautifulsoup4-39d06d4d20b7de5ef74505512429eb778b9c1566.tar.gz |
Added reference to old 'text' name to documentation.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/conf.py | 4 | ||||
-rw-r--r-- | doc/source/index.rst | 14 |
2 files changed, 12 insertions, 6 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py index 102c3cf..cd679b5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -41,7 +41,7 @@ master_doc = 'index' # General information about the project. project = u'Beautiful Soup' -copyright = u'2012, Leonard Richardson' +copyright = u'2004-2015, Leonard Richardson' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -50,7 +50,7 @@ copyright = u'2012, Leonard Richardson' # The short X.Y version. version = '4' # The full version, including alpha/beta/rc tags. -release = '4.2.0' +release = '4.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/doc/source/index.rst b/doc/source/index.rst index 81659ed..ba3b54e 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1130,7 +1130,7 @@ up tags like <html> and <title>, because those tags don't define If you pass in a function to filter on a specific attribute like ``href``, the argument passed into the function will be the attribute value, not the whole tag. Here's a function that finds all ``a`` tags -whose ``href`` attribute _does not_ match a regular expression:: +whose ``href`` attribute *does not* match a regular expression:: def not_lacie(href): return href and not re.compile("lacie").search(href) @@ -1359,6 +1359,12 @@ tags whose ``.string`` is "Elsie":: soup.find_all("a", string="Elsie") # [<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>] +The ``string`` argument is new in Beautiful Soup 4.4.0. In earlier +versions it was called ``text``:: + + soup.find_all("a", text="Elsie") + # [<a href="http://example.com/elsie" class="sister" id="link1">Elsie</a>] + .. _limit: The ``limit`` argument @@ -3120,11 +3126,11 @@ B.string. (Previously, it was None.) their values, not strings. This may affect the way you search by CSS class. -If you pass one of the ``find*`` methods both :ref:`text <text>` `and` +If you pass one of the ``find*`` methods both :ref:`string <string>` `and` a tag-specific argument like :ref:`name <name>`, Beautiful Soup will search for tags that match your tag-specific criteria and whose -:ref:`Tag.string <.string>` matches your value for :ref:`text -<text>`. It will `not` find the strings themselves. Previously, +:ref:`Tag.string <.string>` matches your value for :ref:`string +<string>`. It will `not` find the strings themselves. Previously, Beautiful Soup ignored the tag-specific arguments and looked for strings. |