diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-12-16 20:08:24 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-12-16 20:08:24 (GMT) |
commit | fb864720e5a808a6e9052b2cc5a1a942cb7665ab (patch) | |
tree | 0de7715d3a2308f07d2c97970d88def415c52ae4 /src/definition.cpp | |
parent | a641157ea8fc582d539e35bed962018c58c0d407 (diff) | |
download | Doxygen-fb864720e5a808a6e9052b2cc5a1a942cb7665ab.zip Doxygen-fb864720e5a808a6e9052b2cc5a1a942cb7665ab.tar.gz Doxygen-fb864720e5a808a6e9052b2cc5a1a942cb7665ab.tar.bz2 |
Release-1.3-rc2
Diffstat (limited to 'src/definition.cpp')
-rw-r--r-- | src/definition.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/definition.cpp b/src/definition.cpp index f3b556a..46d66a9 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -122,7 +122,28 @@ void Definition::setDocumentation(const char *d,const char *docFile,int docLine, if (d==0) return; //printf("Definition::setDocumentation(%s,%s,%d)\n",d,docFile,docLine); if (stripWhiteSpace) - m_doc=((QCString)d).stripWhiteSpace(); + { + // strip leading empty lines in front of the text, but not the + // leading spaces in front of the first line, so list items are + // parsed with the correct indent + const char *p=d; + char c; + int s=0,so=0; + while ((c=*p) && (c==' ' || c=='\r' || c=='\n')) + { + if (c=='\n') so=s; + p++; + s++; + } + m_doc=d+so; + // zero any trailing whitespace + int e=m_doc.length()-1; + while (e>=0 && (c=m_doc.at(e)) && (c==' ' || c=='\r' || c=='\n')) + { + m_doc.at(e)='\0'; + e--; + } + } else m_doc=d; m_docFile = docFile; |