btrfs-progs: help: indent option description newlines
A newline character in option description text will break line and then indent the text properly, can be used for lists or paragraphs. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3d17609d66
commit
c135550c28
|
@ -156,11 +156,13 @@ static void format_text(const char *line, FILE *outf)
|
|||
while (*line && *line == ' ')
|
||||
line++;
|
||||
while (*line && *line != ' ') {
|
||||
if (*line == '\n')
|
||||
break;
|
||||
fputc(*line, outf);
|
||||
line++;
|
||||
i++;
|
||||
}
|
||||
if (i > HELPINFO_DESC_WIDTH) {
|
||||
if (i > HELPINFO_DESC_WIDTH || (*line == '\n')) {
|
||||
if (*line) {
|
||||
fputc('\n', outf);
|
||||
line++;
|
||||
|
|
Loading…
Reference in New Issue