summaryrefslogtreecommitdiff
path: root/bs4/__init__.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2012-02-07 17:19:43 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2012-02-07 17:19:43 -0500
commitf23376fdeee206cbf24d4b3aff43a307fb3786a6 (patch)
treecf37f1842d033e1cef46d6954495096c3d5661f5 /bs4/__init__.py
parent1cc507c9ac0154904a65f7352736cb665686e4a4 (diff)
Made the formatter something you pass in rather than a variable you set.
Diffstat (limited to 'bs4/__init__.py')
-rw-r--r--bs4/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bs4/__init__.py b/bs4/__init__.py
index ee68e25..21e5d6c 100644
--- a/bs4/__init__.py
+++ b/bs4/__init__.py
@@ -297,9 +297,10 @@ class BeautifulSoup(Tag):
def decode(self, pretty_print=False,
eventual_encoding=DEFAULT_OUTPUT_ENCODING,
- substitute_html_entities=False):
+ formatter="minimal"):
"""Returns a string or Unicode representation of this document.
To get Unicode, pass None for encoding."""
+
if self.is_xml:
# Print the XML declaration
encoding_part = ''
@@ -313,8 +314,7 @@ class BeautifulSoup(Tag):
else:
indent_level = 0
return prefix + super(BeautifulSoup, self).decode(
- indent_level, eventual_encoding,
- substitute_html_entities)
+ indent_level, eventual_encoding, formatter)
class StopParsing(Exception):