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

XNode#toString() should output all child nodes #3001

Merged
merged 5 commits into from
Nov 10, 2023

Conversation

harawata
Copy link
Member

@harawata harawata commented Nov 7, 2023

  • It still adds indentation, but it won't be perfect in multi-line text nodes. As this is just a toString() and not a coder formatter program, simplicity has precedence over perfect formatting.
  • Add a new line after each open/close tag even for a short line like <id>3</id>. It should not bother you much because there aren't many short lines like that in MyBatis mappers.
  • Use 2 spaces for indentation instead of 4 to save earth.

Should fix #2080
Should close #2084 #2552 #2998 as obsolete

- Keeping indentation, but it won't be perfect in multi-line text nodes.
- Add a new line after each open/close tag even for a short line like `<id>3</id>`. There aren't many short lines like that in MyBatis mappers.
- Use 2 spaces for indentation instead of 4 to save earth.

Should fix mybatis#2080
Should close mybatis#2084 mybatis#2552 mybatis#2998
@coveralls
Copy link

coveralls commented Nov 7, 2023

Coverage Status

coverage: 86.597% (+0.006%) from 86.591%
when pulling b880ac0 on harawata:gh/2080-xnode-tostring
into a0f2a95 on mybatis:master.

@harawata harawata merged commit 02e07b8 into mybatis:master Nov 10, 2023
14 checks passed
This was referenced Nov 10, 2023
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.

XNode#toString() cannot display all information
3 participants