consolidation / output-formatters

Apply transformations to structured data to write output in different formats.
Other
192 stars 13 forks source link

Fix tsvEscape for nested data array #70

Closed MPParsley closed 5 years ago

MPParsley commented 5 years ago

See https://github.com/drush-ops/drush/issues/3721

Overview

This pull request:

Summary

Short overview of what changed.

Description

Any additional information.

greg-1-anderson commented 5 years ago

It is not workable to recursively call tsvEscape like this, as you would end up with too many \ts in your output.

I have done some work in #69 to reconcile what should happen when a formatter receives data that its validate method should have rejected. The fallback I chose in one place was to simply json_encode the nested array. Some of the code there might be refactored and re-used.