summaryrefslogtreecommitdiffstats
path: root/src/commentcnv.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2012-02-25 15:18:56 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2012-02-25 15:18:56 (GMT)
commitcff8111ed33af6033bd188868964d92ea3503188 (patch)
tree2a7451abfd771d43ea2b3ac2443d94c3eb5cfee7 /src/commentcnv.l
parent34d4ace6d4037862b6d280f1d7534292c714bf59 (diff)
downloadDoxygen-cff8111ed33af6033bd188868964d92ea3503188.zip
Doxygen-cff8111ed33af6033bd188868964d92ea3503188.tar.gz
Doxygen-cff8111ed33af6033bd188868964d92ea3503188.tar.bz2
Release-1.8.0
Diffstat (limited to 'src/commentcnv.l')
-rw-r--r--src/commentcnv.l18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 1ae07c0..b031265 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -82,21 +82,22 @@ static void replaceCommentMarker(const char *s,int len)
{
const char *p=s;
char c;
- // copy blanks
+ // copy leading blanks
while ((c=*p) && (c==' ' || c=='\t' || c=='\n'))
{
ADDCHAR(c);
g_lineNr += c=='\n';
p++;
}
- // replace start of comment marker by spaces
+ // replace start of comment marker by blanks and the last character by a *
+ int blanks=0;
while ((c=*p) && (c=='/' || c=='!' || c=='#'))
{
- ADDCHAR(' ');
+ blanks++;
p++;
if (*p=='<') // comment-after-item marker
{
- ADDCHAR(' ');
+ blanks++;
p++;
}
if (c=='!') // end after first !
@@ -104,6 +105,15 @@ static void replaceCommentMarker(const char *s,int len)
break;
}
}
+ if (blanks>0)
+ {
+ while (blanks>1)
+ {
+ ADDCHAR(' ');
+ blanks--;
+ }
+ ADDCHAR('*');
+ }
// copy comment line to output
ADDARRAY(p,len-(p-s));
}