diff --git a/docutils/parsers/rst/tableparser.py b/docutils/parsers/rst/tableparser.py
index 2cd3879..fd24424 100644
--- a/docutils/parsers/rst/tableparser.py
+++ b/docutils/parsers/rst/tableparser.py
@@ -511,8 +511,8 @@ class SimpleTableParser(TableParser):
if i == lastcol and line[end:].strip():
text = line[start:].rstrip()
new_end = start + len(text)
- columns[i] = (start, new_end)
main_start, main_end = self.columns[-1]
+ columns[i] = (start, max(main_end, new_end))
if new_end > main_end:
self.columns[-1] = (main_start, new_end)
elif line[end:nextstart].strip():
diff --git a/test/test_parsers/test_rst/test_tables.py b/test/test_parsers/test_rst/test_tables.py
index ed7e177..28b8070 100755
--- a/test/test_parsers/test_rst/test_tables.py
+++ b/test/test_parsers/test_rst/test_tables.py
@@ -789,6 +789,56 @@ A table with three columns.
"""],
["""\
============== ======
+A simple table this text extends to the right
+cell 3 as does this text
+============== ======
+""",
+"""\
+<document source="test data">
+ <table>
+ <tgroup cols="2">
+ <colspec colwidth="14">
+ <colspec colwidth="30">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ A simple table
+ <entry>
+ <paragraph>
+ this text extends to the right
+ <row>
+ <entry>
+ <paragraph>
+ cell 3
+ <entry>
+ <paragraph>
+ as does this text
+"""],
+["""\
+============== ======
+A simple table this text extends to the right
+ continuation of cell 2
+============== ======
+""",
+"""\
+<document source="test data">
+ <table>
+ <tgroup cols="2">
+ <colspec colwidth="14">
+ <colspec colwidth="30">
+ <tbody>
+ <row>
+ <entry>
+ <paragraph>
+ A simple table
+ <entry>
+ <paragraph>
+ this text extends to the right
+ continuation of cell 2
+"""],
+["""\
+============== ======
A simple table with
no bottom border
""",