Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14008903
D18751.id45007.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18751.id45007.diff
View Options
diff --git a/src/markup/engine/__tests__/remarkup/table-with-long-header.txt b/src/markup/engine/__tests__/remarkup/table-with-long-header.txt
new file mode 100644
--- /dev/null
+++ b/src/markup/engine/__tests__/remarkup/table-with-long-header.txt
@@ -0,0 +1,8 @@
+|x|
+||--
+~~~~~~~~~~
+<div class="remarkup-table-wrap"><table class="remarkup-table">
+<tr><td>x</td></tr>
+</table></div>
+~~~~~~~~~~
+| x |
diff --git a/src/markup/engine/remarkup/blockrule/PhutilRemarkupSimpleTableBlockRule.php b/src/markup/engine/remarkup/blockrule/PhutilRemarkupSimpleTableBlockRule.php
--- a/src/markup/engine/remarkup/blockrule/PhutilRemarkupSimpleTableBlockRule.php
+++ b/src/markup/engine/remarkup/blockrule/PhutilRemarkupSimpleTableBlockRule.php
@@ -73,7 +73,14 @@
// Mark previous row with headings.
foreach ($cells as $i => $cell) {
if ($cell['content']) {
- $rows[last_key($rows)]['content'][$i]['type'] = 'th';
+ $last_key = last_key($rows);
+ if (!isset($rows[$last_key]['content'][$i])) {
+ // If this row has more cells than the previous row, there may
+ // not be a cell above this one to turn into a <th />.
+ continue;
+ }
+
+ $rows[$last_key]['content'][$i]['type'] = 'th';
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 31, 7:44 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714979
Default Alt Text
D18751.id45007.diff (1 KB)
Attached To
Mode
D18751: Fix an error with Remarkup when a header-indicator row has more cells than the one above it
Attached
Detach File
Event Timeline
Log In to Comment