-
Notifications
You must be signed in to change notification settings - Fork 2.7k
RTF: Fix TextBreak.php #2816
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
base: master
Are you sure you want to change the base?
RTF: Fix TextBreak.php #2816
Conversation
Returns line return instead of paragraph return on textrun, footnote, and endnote.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rasamassen Thank you for your contribution.
Could you add an unit test, please ?
Probably not. I don't program much anymore - it's been a decade or more - and it's been a lot of work to figure out the parts of the RTF writer that weren't working; figuring out how the tests work will be a lot more work I don't have time for. I can give you a sample below that shows the error if you compare the current code to my revisions. Hopefully that helps you create a test. // Create PhpWord // Set default settings // Styles // Build Document In the original code, there was a paragraph break, resulting in the additional lines losing their paragraph styling. Original Output (lines 2 and 3 are left-align when they should be center; line 4 is center): New Output (correct): |
@rasamassen Could you invite me on your repository and I will add unit test for your PRs ? Else I can't merge PR without linked unit tests. |
Returns line return instead of paragraph return on textrun, footnote, and endnote.
Description
TextBreak was always creating a new paragraph, even when it should have just been making a line break.
Fixes # (issue)
Checklist: