CoreOffice / XMLCoder

Easy XML parsing using Codable protocols in Swift
https://coreoffice.github.io/XMLCoder/
MIT License
795 stars 107 forks source link

Use 2 spaces instead of 4 when .prettyPrinted #183

Closed owenzhao closed 4 years ago

owenzhao commented 4 years ago

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 commented 4 years ago

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

MaxDesiatov commented 4 years ago

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