Skip to content

Commit b209fec

Browse files
author
Nishant Bhatt
committed
To suport preseve text inside sub container
if we use preseve text inside table, issue fix https://stackoverflow.com/questions/33070424/phpword-cannot-add-preservetext-in-section
1 parent 7b7d4e4 commit b209fec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Element/AbstractContainer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ private function checkValidity($method)
254254
// Special condition, e.g. preservetext can only exists in cell when
255255
// the cell is located in header or footer
256256
$validSubcontainers = array(
257-
'PreserveText' => array(array('Cell'), array('Header', 'Footer')),
257+
'PreserveText' => array(array('Cell'), array('Header', 'Footer', 'Section')),
258258
'Footnote' => array(array('Cell', 'TextRun'), array('Section')),
259259
'Endnote' => array(array('Cell', 'TextRun'), array('Section')),
260260
);

0 commit comments

Comments
 (0)