diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 790e938..e8c5623 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -1649,7 +1649,12 @@ private void writeWrapped(string string, size_t indent = 0, size_t first_line_pos = 0) { - auto wrapped = string.wrap(lineWidth, getRepString!' '(first_line_pos), getRepString!' '(indent)); + // handle pre-indented strings and bullet lists + size_t first_line_indent = 0; + while (string.startsWith(" ")) string = string[1 .. $], indent++, first_line_indent++; + if (string.startsWith("- ")) indent += 2; + + auto wrapped = string.wrap(lineWidth, getRepString!' '(first_line_pos+first_line_indent), getRepString!' '(indent)); wrapped = wrapped[first_line_pos .. $]; foreach (ln; wrapped.splitLines()) writeln(ln);