summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bs4/dammit.py1
-rw-r--r--doc/source/index.rst4
2 files changed, 2 insertions, 3 deletions
diff --git a/bs4/dammit.py b/bs4/dammit.py
index 983ade0..c199cd5 100644
--- a/bs4/dammit.py
+++ b/bs4/dammit.py
@@ -273,7 +273,6 @@ class UnicodeDammit:
return None
self.tried_encodings.append((proposed, errors))
markup = self.markup
-
# Convert smart quotes to HTML if coming from an encoding
# that might have them.
if (self.smart_quotes_to is not None
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 7a516ef..cd15b8a 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -264,7 +264,7 @@ This table summarizes the advantages and disadvantages of each parser library:
| | ``BeautifulSoup(markup, "xml")`` | * The only currently supported | |
| | | XML parser | |
+----------------------+--------------------------------------------+--------------------------------+--------------------------+
-| html5lib | ``BeautifulSoup(markup, html5lib)`` | * Extremely lenient | * Very slow |
+| html5lib | ``BeautifulSoup(markup, "html5lib")`` | * Extremely lenient | * Very slow |
| | | * Parses pages the same way a | * External Python |
| | | web browser does | dependency |
| | | * Creates valid HTML5 | * Python 2 only |
@@ -2146,7 +2146,7 @@ One last caveat: if you create a ``CData`` object, the text inside
that object is always presented `exactly as it appears, with no
formatting`. Beautiful Soup will call the formatter method, just in
case you've written a custom method that counts all the strings in the
-document or something, but it will ignore the return value.
+document or something, but it will ignore the return value::
from bs4.element import CData
soup = BeautifulSoup("<a></a>")