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

Use 2 spaces instead of 4 when .prettyPrinted #183

Closed
owenzhao opened this issue May 25, 2020 · 2 comments · Fixed by #186
Closed

Use 2 spaces instead of 4 when .prettyPrinted #183

owenzhao opened this issue May 25, 2020 · 2 comments · Fixed by #186
Labels
enhancement New feature or request

Comments

@owenzhao
Copy link
Collaborator

As Xcode exported .xliff files uses two spaces, I just want them to be aligned.

The left is decoded and then encoded by XMLCoder, the right is Xcode exported original.
xliffs

@MaxDesiatov MaxDesiatov added the enhancement New feature or request label May 25, 2020
@MaxDesiatov
Copy link
Collaborator

Thanks for reporting this @owenzhao, I'll have a look.

@MaxDesiatov MaxDesiatov changed the title Is that possible to use two spaces instead of four when encoding with .prettyPrinted Use 2 spaces instead of 4 when encoding with .prettyPrinted May 31, 2020
@MaxDesiatov MaxDesiatov changed the title Use 2 spaces instead of 4 when encoding with .prettyPrinted Use 2 spaces instead of 4 when .prettyPrinted May 31, 2020
MaxDesiatov added a commit that referenced this issue May 31, 2020
New property can take `XMLEncoder.PrettyPrintIndentation` values such as `.tabs(1)` or `.spaces(2)`.

Resolve #183.
@MaxDesiatov
Copy link
Collaborator

@owenzhao you'll need to set the prettyPrintIndentation property on your encoder to .spaces(2). This feature is now available in master.

arjungupta0107 pushed a commit to salido/XMLCoder that referenced this issue Jun 26, 2020
New property can take `XMLEncoder.PrettyPrintIndentation` values such as `.tabs(1)` or `.spaces(2)`.

Resolve CoreOffice#183.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants