antonmihaylov / OpenXmlTemplates

Word .docx templating system that is designer (no scripting tags) and server-friendly (no word installation required)
GNU Lesser General Public License v3.0
89 stars 25 forks source link

Add support for newline characters, and repeating table rows #3

Closed dgwaldo closed 4 years ago

dgwaldo commented 4 years ago

We found two blocking issues when using the library.

First was that text inserted with \n or \r\n characters, wasn't being properly formatted.

Second was that the code would throw a null reference exception when using a repeating content control wrapped around a table row.

This PR fixes both of those issues. One other thing to note is that with VS 2019, no one on the team was able to open the solution or project files. We kept getting unsupported project type errors. Recreating a new project and pulling in the files worked just fine. Code edits were made in that project. Code was then copy pasted into Github for this PR. Might be nice to take a look at the project with VS2019 and see what's up. Hence no unit tests for this because of the extra work required to get that project running.

Thanks for this project!

antonmihaylov commented 4 years ago

Thank you very much for the contribution!

It looks good at a first glance. I will write some tests for it and put some info in the readme for the new supported features.

I had no idea it has a problem with Visual Studio. I'm using Rider, so I haven't been able to notice it. I'll look into the problem