robgridley/zebra

Consider adding back newlines in toZpl()

NiklasBr opened this issue · 2 comments

In commit 42e48e2 you removed the newlines from output, I don't know why, but guess it has to do with output size. But can I ask you to consider adding the line breaks back, or at least the possibility to use line breaks. They have been invaluable to us when diff:ing
output to find subtle changes.

For example, maybe make it something like this?

public function toZpl($implode = '')
{
    return implode($implode, array_merge(['^XA'], $this->zpl, ['^XZ']));
}

It was to shave a few bytes off of the output size on complex labels. I didn't consider that anyone would be diff-ing the output from this library. I have added a newlines argument to the Builder::toZpl() method and released version 2.0.1.

Super, thanks!