Skip to content

Commit 30a0f87

Browse files
committed
Output when brief description ends with multiple spaces
When we have multiple spaces at the end of a brief description like in: ``` #define BRLAPI_PACKET_RESUMEDRIVER0 'R' /**< Resume driver */ ``` and settings: ``` JAVADOC_AUTOBRIEF = YES MARKDOWN_SUPPORT = YES GENERATE_MAN = YES ``` This leads in e.g. the HTML output to some extra white space for the brief description and in the MAN output to: ``` #define BRLAPI_PACKET_RESUMEDRIVER0 'R' Resume driver " ``` The problem is the empty spaces at the end of the brief description that are converted ny the `MARKDOWN_SUPPORT` to `\ilinbr<br>`, the brief description is now stripped of leading and trailing whitespce and also the later is now stripped.
1 parent a3de740 commit 30a0f87

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/commentscan.l

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4771,6 +4771,7 @@ bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *pars
47714771
}
47724772

47734773
yyextra->current->doc=stripLeadingAndTrailingEmptyLines(yyextra->current->doc,yyextra->current->docLine);
4774+
yyextra->current->brief=stripLeadingAndTrailingEmptyLines(yyextra->current->brief,yyextra->current->docLine);
47744775

47754776
if (yyextra->current->section.isFileDoc() && yyextra->current->doc.isEmpty())
47764777
{

src/util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5389,6 +5389,7 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine)
53895389
c=*p;
53905390
if (c==' ' || c=='\t' || c=='\r') b--,p--;
53915391
else if (c=='r' && b>=7 && qstrncmp(p-7,"\\ilinebr",8)==0) bi=b-7,b-=8,p-=8;
5392+
else if (c=='>' && b>=11 && qstrncmp(p-11,"\\ilinebr<br>",12)==0) bi=b-11,b-=12,p-=12;
53925393
else if (c=='\n') bi=b,b--,p--;
53935394
else break;
53945395
}

0 commit comments

Comments
 (0)