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

Bloblang minification / alternative to newlines for separating statements #2583

Open
mihaitodor opened this issue May 13, 2024 · 0 comments
Open
Labels
ash pls Waiting for ash to chime in bloblang Bloblang features enhancement

Comments

@mihaitodor
Copy link
Member

mihaitodor commented May 13, 2024

It would be nice to have an alternative character such as the semicolon for separating Bloblang statements.

Bonus: Have a CLI command which minifies Bloblang code (i.e. replaces newlines with semicolons and trims unnecessary whitespace) without altering raw strings (i.e. """ ... """).

Current workaround (it’s hackish and slow):

let mapping = """
data: |
  root.foo = "bar"
  root.bar = "baz"
""".parse_yaml().data

root = this.bloblang($mapping.replace_all("\\n", "\n"))
@mihaitodor mihaitodor added enhancement bloblang Bloblang features ash pls Waiting for ash to chime in labels May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ash pls Waiting for ash to chime in bloblang Bloblang features enhancement
Projects
None yet
Development

No branches or pull requests

1 participant