-
Notifications
You must be signed in to change notification settings - Fork 1.9k
add xml:space="preserve" for all whitespaces #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Currently only spaces at begin or end of a text add the xml:space attribute. So at the moment comments with newlines can nott be added.
@sebikeller could I ask you to write a test that covers this change? |
@sebikeller - I've just tried adding some integration tests to master that add white spaces to values and notes at beginning and endings of multiple lines and I can't reproduce your problem. |
I agree, with an integration test, its not possible to reproduce the problem. But if you open the generated file with excel, you'll see the difference. branch masterapplied pr |
Recreating the file in excel, following xml can be extracted: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<comments xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
<authors>...</authors>
<commentList>
<comment ref="A1" authorId="0" shapeId="0">
<text>
<r>
<rPr>
<b/>
</rPr>
<t>First Line:</t>
</r>
<r>
<t xml:space="preserve">
</t>
</r>
<r>
<t xml:space="preserve">Second Line
</t>
</r>
<r>
<t xml:space="preserve">Third Line
</t>
</r>
<r>
<t>Last Line</t>
</r>
</text>
</comment>
</commentList>
</comments>
|
Since we cant recreate it with an integration test, it actually means, that the exceljs parser has difference with that of excel. |
@sebikeller - agreed! I'll add a unit test on the strings xforms to keep a check on this... |
Currently only spaces at begin or end of a text add the xml:space attribute.
So at the moment comments with newlines can not be added.