Armaan Sandhu
32ac7af788
strv: treat newlines as hard line breaks in strv_rebreak_lines()
...
A newline embedded in an input entry only reset the width counter and the
leading-whitespace state, but the text collected before it was never flushed.
If nothing but whitespace followed the newline, the end-of-line path then saw
that we were still in the leading whitespace and emitted an empty line,
dropping everything before the newline: "foo\n" turned into "".
Newlines also didn't start a new output entry, so returned entries could
contain newlines and be wider than the requested width, even though callers
expect one output entry per output line.
Flush the collected line at the newline instead, reusing the same logic as at
the end of the string, and treat a trailing newline as terminating the last
line rather than adding an empty one.
2026-08-13 07:11:49 +09:00
..
2026-08-12 03:53:42 -07:00
2026-06-25 10:39:11 +01:00
2026-08-13 07:11:49 +09:00
2026-07-10 16:35:19 +09:00
2026-07-19 20:21:47 +09:00
2026-08-08 04:09:10 +09:00
2026-08-10 16:09:06 +02:00
2026-07-15 02:18:05 +09:00
2026-08-11 00:38:17 +09:00
2026-07-15 17:51:48 +01:00
2026-08-12 03:11:02 +09:00
2026-07-15 02:18:05 +09:00
2026-07-21 12:23:00 +09:00
2026-07-19 21:23:47 +02:00
2026-07-28 14:59:02 +02:00
2026-07-10 16:35:19 +09:00
2026-08-12 03:02:33 +09:00
2026-07-21 12:23:00 +09:00
2026-07-26 13:20:55 +09:00
2026-07-31 10:06:14 +02:00
2026-07-08 12:13:43 +01:00
2026-07-10 16:35:19 +09:00
2026-08-04 22:46:13 +09:00
2026-07-15 02:18:05 +09:00
2026-07-10 16:35:19 +09:00
2026-07-10 16:35:19 +09:00
2026-07-18 04:56:32 +09:00
2026-07-15 02:18:05 +09:00
2026-07-25 19:36:35 +09:00
2026-07-10 16:35:19 +09:00
2026-07-10 16:35:19 +09:00
2026-07-17 11:09:34 +08:00
2026-07-25 19:37:47 +09:00
2026-07-18 04:56:32 +09:00
2026-08-02 22:06:40 +09:00
2026-07-18 04:56:32 +09:00
2026-07-18 04:56:32 +09:00
2026-07-18 04:56:32 +09:00
2026-08-06 16:34:17 +02:00
2026-07-18 04:56:32 +09:00
2026-08-08 04:05:25 +09:00
2026-07-24 13:44:32 +09:00
2026-07-30 07:24:17 +09:00
2026-07-28 20:19:30 +09:00
2026-07-31 16:51:08 -07:00
2026-07-23 13:19:11 +09:00
2026-07-10 16:35:19 +09:00
2026-07-18 04:56:32 +09:00
2026-07-10 16:35:19 +09:00
2026-07-10 16:35:19 +09:00
2026-07-15 02:18:05 +09:00
2026-07-10 16:35:19 +09:00
2026-07-24 13:44:04 +09:00
2026-07-20 12:37:27 +01:00
2026-07-18 04:56:32 +09:00
2026-07-11 17:09:14 +01:00
2026-06-26 16:03:18 -04:00
2026-07-15 02:18:05 +09:00
2026-07-29 03:47:58 +09:00
2026-07-28 08:58:25 +02:00
2026-08-04 14:11:43 -07:00
2026-07-19 21:23:47 +02:00
2026-07-10 16:35:19 +09:00
2026-07-01 18:18:00 +01:00
2026-07-09 16:48:26 +02:00
2026-07-10 16:35:19 +09:00
2026-08-05 23:56:41 +09:00
2026-08-02 15:13:35 +09:00
2026-08-12 18:51:34 +09:00
2026-07-18 00:01:47 +02:00
2026-07-18 04:56:32 +09:00
2026-08-13 07:11:37 +09:00
2026-07-24 00:35:10 +02:00
2026-07-07 13:40:13 +02:00
2026-07-10 16:35:19 +09:00
2026-07-10 16:35:19 +09:00
2026-08-03 14:25:49 +09:00
2026-07-31 09:49:41 +02:00
2026-07-17 09:18:33 +02:00
2026-08-03 14:29:07 +09:00
2026-08-04 22:46:13 +09:00
2026-08-06 10:06:00 +08:00
2026-08-04 08:17:04 +09:00
2026-08-13 07:11:49 +09:00
2026-07-31 16:51:08 -07:00
2026-07-15 02:18:05 +09:00
2026-08-02 02:06:12 +02:00
2026-07-28 08:35:39 +02:00
2026-07-13 15:39:17 +02:00
2026-08-03 13:54:17 +09:00
2026-07-28 08:35:39 +02:00
2026-07-10 16:35:19 +09:00
2026-07-29 11:41:17 +09:00
2026-07-10 16:35:19 +09:00
2026-07-15 12:12:40 +02:00
2026-07-18 04:56:32 +09:00
2026-06-23 23:10:01 +02:00
2026-07-26 14:40:05 +09:00
2026-08-09 01:56:13 +09:00
2026-07-10 16:35:19 +09:00
2026-08-12 03:02:33 +09:00
2026-07-15 02:18:05 +09:00