You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a post meta field with a value that contains line breaks, the output of wp post meta list breaks. Example:
$ wp post meta list 123
+---------+----------+------------+
| post_id | meta_key | meta_value |
+---------+----------+------------+
| 123 | foo | foo |
| 123 | bar | bar
bar
bar
bar
bar
bar |
| 123 | baz | baz |
+---------+----------+------------+
Should this output be improved? A potential improvement would be:
+---------+----------+------------+
| post_id | meta_key | meta_value |
+---------+----------+------------+
| 123 | foo | foo |
| 123 | bar | bar |
| | | bar |
| | | bar |
| | | bar |
| | | bar |
| 123 | baz | baz |
+---------+----------+------------+
This might be difficult to implement though.
Note: The wp post get command doesn't suffer from this problem, which means line breaks in the post_content field don't break the output.
The text was updated successfully, but these errors were encountered:
001 Scenario: List post meta with line break value # features/post-meta.feature:492
Then STDOUT should be a table containing rows: # features/post-meta.feature:503
post_id meta_key meta_value
1 foo bar
bar
bar
(Exception)
But looks like we're facing a similar issue with the post list command as well.
The output changes depending on the window size though, and it seems like the line break is simply replaced with a blank space? 🤔
Handling the line break might be difficult, as @johnbillion mentioned. However, we could probably consider making a compromise by replacing the line break with a blank space in the table format. I haven't checked the JSON and YML formats, but I believe retaining the line break in those two formats would be much simpler.
Given a post meta field with a value that contains line breaks, the output of
wp post meta list
breaks. Example:Should this output be improved? A potential improvement would be:
This might be difficult to implement though.
Note: The
wp post get
command doesn't suffer from this problem, which means line breaks in thepost_content
field don't break the output.The text was updated successfully, but these errors were encountered: