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

XRENDERING-667: New lines added when parsing and re-rendering groups in xwiki/2.1 #289

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michitux
Copy link
Contributor

  • Don't print a new line when closing a group and we're already on a newline.
  • Add a test.

Jira issue: https://jira.xwiki.org/browse/XRENDERING-667

…in xwiki/2.1

* Don't print a new line when closing a group and we're already on a
  newline.
* Add a test.
…in xwiki/2.1

* Extend the test for empty lines to cover more cases.
@michitux michitux marked this pull request as draft December 13, 2023 13:03
@michitux
Copy link
Contributor Author

This should not be merged as while it fixes the original bug, it introduces another bug which is the removal of a newline at the end of syntax like the following when parsing and rendering it again:

(((



Test



)))

We're already losing a newline there at the start of the syntax, but with this "fix" we would also lose one at the end. It is not clear to me whose fault this is as we're already loosing newlines in other cases. It is possible that in this case, this paragraph is to blame, and it should print one more newline, see https://jira.xwiki.org/browse/XRENDERING-684 for similar issues with tables and lists.

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

Successfully merging this pull request may close these issues.

2 participants