summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-02-14 16:16:06 -0500
committerBrad King <brad.king@kitware.com>2003-02-14 16:16:06 -0500
commitdec0b5106611cbccd1f75c1fa3371d66bdd69a47 (patch)
treebf56c6a5498fc2c2a1ee5212c69890d108c22de7 /Source
parent0005e70c054ac55a536ffbc68447b7aa57e909d2 (diff)
downloadcmake-dec0b5106611cbccd1f75c1fa3371d66bdd69a47.tar.gz
ENH: Improved formatting of plain-text help to add a blank line before the beginning of a preformatted section.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmDocumentation.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 852abed84b..3167c7fa24 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -384,16 +384,20 @@ void cmDocumentation::PrintColumn(std::ostream& os, int width,
}
else
{
- // If this is the first line not beginning in a blank after
- // a sequence of lines beginning in blanks, add an extra
+ // If we are switching from a line that has leading blanks
+ // to a line that does not, or vice versa, add an extra
// newline.
if(blanks)
{
+ if(!lastHadBlanks && !firstLine)
+ {
+ os << "\n";
+ }
lastHadBlanks = true;
}
else
{
- if(lastHadBlanks)
+ if(lastHadBlanks && !firstLine)
{
os << "\n";
}