Skip to content

Commit b15c02c

Browse files
committed
soup2html() tweak to handle table cells.
- Legacy-Id: 326
1 parent 61cdc1e commit b15c02c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

ietf/utils/soup2text.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def soup2text(html):
106106
# some preprocessing to handle common pathological cases
107107
html = re.sub("<br */?>[ \t\n]*(<br */?>)+", "<p/>", html)
108108
html = re.sub("<br */?>([^\n])", r"<br />\n\1", html)
109+
html = re.sub("(<t[hd][^>]*>)([^ \t\n])", r"\1 \2", html)
109110
soup = TextSoup(html)
110111
return str(soup)
111112

0 commit comments

Comments
 (0)