Skip to content
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

Invalid XML when calling .addText() with empty array. #89

Closed
JimmyTheChimp opened this issue May 17, 2017 · 2 comments
Closed

Invalid XML when calling .addText() with empty array. #89

JimmyTheChimp opened this issue May 17, 2017 · 2 comments
Assignees
Milestone

Comments

@JimmyTheChimp
Copy link

I'll try to nail down some more details when I get a chance, but basically something along the lines of the following code causes invalid XML to be generated and PowerPoint will require a "repair" operation to open the file. The file does not display correctly even when repaired.

var dataDrivenTextArray = [];
slide.addText(dataDrivenTextArray,
  {
    x: 1,
    y: 1,
    w: 2,
    h: 0.5,
    valign: 'top'
  });

I've attached an example of the corrupted output.

SummaryExport (61).pptx

@JimmyTheChimp
Copy link
Author

Here's a fiddle for ya if it helps.
https://jsfiddle.net/JimmyTheChimp/Loo3rony/1/

@gitbrent gitbrent self-assigned this May 18, 2017
gitbrent pushed a commit that referenced this issue May 18, 2017
@gitbrent gitbrent added this to the v1.5.0 milestone May 18, 2017
@gitbrent
Copy link
Owner

Hi @JimmyTheChimp ,

Thanks for reporting this.

The library correctly handles empty arrays now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants