summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-08-09 02:31:00 (GMT)
committerGuido van Rossum <guido@python.org>1995-08-09 02:31:00 (GMT)
commitaa7634476f84e1591ea3b1bb945095e23931a0f2 (patch)
tree4c5c17ee900afdc7b7217362270e7b10cf30191e /Lib
parent150316ee2e7db3d0ad633f2dbe53a066add49e45 (diff)
downloadcpython-aa7634476f84e1591ea3b1bb945095e23931a0f2.zip
cpython-aa7634476f84e1591ea3b1bb945095e23931a0f2.tar.gz
cpython-aa7634476f84e1591ea3b1bb945095e23931a0f2.tar.bz2
change blank line insertion at a few places and fix recursion bug for </var>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/htmllib.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/htmllib.py b/Lib/htmllib.py
index 38312c6..5591429 100644
--- a/Lib/htmllib.py
+++ b/Lib/htmllib.py
@@ -227,7 +227,7 @@ class HTMLParser(SGMLParser):
self.formatter.push_margin('blockquote')
def end_blockquote(self):
- self.formatter.end_paragraph(0)
+ self.formatter.end_paragraph(1)
self.formatter.pop_margin()
# --- List Elements
@@ -279,11 +279,11 @@ class HTMLParser(SGMLParser):
self.end_ul()
def start_dl(self, attrs):
- self.formatter.end_paragraph(0)
+ self.formatter.end_paragraph(1)
self.list_stack.append(['dl', '', 0])
def end_dl(self):
- self.ddpop()
+ self.ddpop(1)
if self.list_stack: del self.list_stack[-1]
def do_dt(self, attrs):
@@ -294,8 +294,8 @@ class HTMLParser(SGMLParser):
self.formatter.push_margin('dd')
self.list_stack.append(['dd', '', 0])
- def ddpop(self):
- self.formatter.end_paragraph(0)
+ def ddpop(self, bl=0):
+ self.formatter.end_paragraph(bl)
if self.list_stack:
if self.list_stack[-1][0] == 'dd':
del self.list_stack[-1]
@@ -320,11 +320,11 @@ class HTMLParser(SGMLParser):
def start_samp(self, attrs): self.start_tt(attrs)
def end_samp(self): self.end_tt()
- def start_string(self, attrs): self.start_b(attrs)
- def end_b(self): self.end_b()
+ def start_strong(self, attrs): self.start_b(attrs)
+ def end_strong(self): self.end_b()
def start_var(self, attrs): self.start_i(attrs)
- def end_var(self): self.end_var()
+ def end_var(self): self.end_i()
# Typographic Elements