Skip to content

fix: serializing whitespace and quoting priority - #4236

Merged
IgorEisberg merged 2 commits into
mainfrom
libyaml-fix
Sep 26, 2026
Merged

IgorEisberg merged 2 commits into
mainfrom
libyaml-fix

Conversation

@IgorEisberg

Copy link
Copy Markdown
Collaborator

Not strictly useful for Apktool, this is just perfecting the YAML library.

  • Fix leading/trailing whitespace not respected and properly quoted by the serializer.
  • Use pyYAML's quoting priority as the standard: prefer single-quoting for literals, only fall back to double-quoting when escape sequences are involved.
  • Rename escapeString/unescapeString to encodeString/decodeString, since they do full YAML encoding/decoding rather than deal with escape sequences only.

Added a few more test cases for the leading/trailing whitespace.

@IgorEisberg
IgorEisberg enabled auto-merge (squash) September 26, 2026 13:30
@IgorEisberg
IgorEisberg merged commit 51e58e9 into main Sep 26, 2026
21 checks passed
@IgorEisberg
IgorEisberg deleted the libyaml-fix branch September 26, 2026 13:39
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