From 66ad1f5854f7fee7e0743ef09deb821f32a3b381 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Wed, 24 Nov 2010 19:25:29 +0200 Subject: [PATCH] Start short-indent lists on next-line --- wrap-and-sort | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wrap-and-sort b/wrap-and-sort index 2e3299b..896bd98 100755 --- a/wrap-and-sort +++ b/wrap-and-sort @@ -77,7 +77,11 @@ class Control(object): if not short_indent: indentation *= (len(entry) + 2) packages_with_indention = map(lambda x: indentation + x, packages) - control[entry] = ",\n".join(packages_with_indention).strip() + packages_with_indention = ",\n".join(packages_with_indention) + if short_indent: + control[entry] = "\n" + packages_with_indention + else: + control[entry] = packages_with_indention.strip() else: control[entry] = ", ".join(packages).strip()