[ODS] Add support for whitespaces inside <text:span>
The `<text:p>` node can contain the string value directly or contain child elements. In this case, whitespaces contain in the child elements should be replaced by their XML equivalent: - space => `<text:s />` - tab => `<text:tab />` - line break => `<text:line-break />` @see https://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1415200_253892949
This commit is contained in:
1 parent
9f4c094fa0
commit
dbdf5f7f38
3 files changed
+80
-18
No files matched your search
@@ -277,6 +277,17 @@ class ReaderTest extends TestCase
|
||||
$this->assertEquals([$expectedRow], $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function testReadShouldSupportWhitespaceAsXML()
|
||||
{
|
||||
$allRows = $this->getAllRowsForFile('sheet_with_whitespaces_as_xml.ods');
|
||||
|
||||
$expectedRow = ["Lorem ipsum\tdolor sit amet"];
|
||||
$this->assertEquals([$expectedRow], $allRows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NOTE: The LIBXML_NOENT is used to ACTUALLY substitute entities (and should therefore not be used)
|
||||
*
|
||||
|
||||
Binary file not shown.
Reference in new issue
Block a user