diff --git a/src/dfmt.d b/src/dfmt.d index c8c47c2..83bd5dc 100644 --- a/src/dfmt.d +++ b/src/dfmt.d @@ -197,6 +197,28 @@ private: newline(); break; } + else if (current.type == tok!",") + { + // compute length until next , or ; + int length_of_next_chunk = INVALID_TOKEN_LENGTH; + for (size_t i=index+1; i= 0); + length_of_next_chunk += len; + } + assert (length_of_next_chunk > 0); + writeToken(); + if (currentLineLength+1+length_of_next_chunk >= config.columnSoftLimit) + { + pushIndent(); + newline(); + } + else + write(" "); + } else formatStep(); }