From dec0b5106611cbccd1f75c1fa3371d66bdd69a47 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 14 Feb 2003 16:16:06 -0500 Subject: ENH: Improved formatting of plain-text help to add a blank line before the beginning of a preformatted section. --- Source/cmDocumentation.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx index 852abed..3167c7f 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"; } -- cgit v0.12