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

fix(hocon_pp): ensure the pretty-print result is a list of lines #286

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

zmstone
Copy link
Member

@zmstone zmstone commented Feb 14, 2024

  • Fixed a bug: missing , between 'oneliner' struct fields and array elements.
  • Make sure the hocon_pp:do function returns a list of binary() strings, one for each line -- some callers rely on this contract.
  • Do not format as a 'onliner' if map values or array elements has long strings (longer than 40 bytes).
  • Sort map fields.
  • Avoid generating triple-quote strings when 'onliner' is opted

ieQu1
ieQu1 previously approved these changes Feb 14, 2024
It is technically possible to format oneliner triple quotes,
but it would require escaping the linebreaks,
making it pointless to use triple quotes.
@zmstone zmstone force-pushed the 0214-fix-pp-api-contract branch from a7079c2 to d8c3ad7 Compare February 14, 2024 11:50
@zmstone zmstone merged commit 09979bc into emqx:master Feb 14, 2024
3 checks passed
@zmstone zmstone deleted the 0214-fix-pp-api-contract branch February 14, 2024 13:33
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