summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scanner.l21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 6ad0860..7b24d39 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -6260,16 +6260,19 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- yyextra->docBlock+=substitute(yytext,"*"," ");
+
+ QCString pat = substitute(yytext,"*"," ");
+ yyextra->docBlock+=pat;
yyextra->docBlockName="~~~";
- yyextra->fencedSize=yyleng;
+ yyextra->fencedSize=pat.stripWhiteSpace().length();
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- yyextra->docBlock+=substitute(yytext,"*"," ");
+ QCString pat = substitute(yytext,"*"," ");
+ yyextra->docBlock+=pat;
yyextra->docBlockName="```";
- yyextra->fencedSize=yyleng;
+ yyextra->fencedSize=pat.stripWhiteSpace().length();
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
@@ -6385,15 +6388,17 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
- yyextra->docBlock+=substitute(yytext,"*"," ");
- if (yyextra->fencedSize==yyleng)
+ QCString pat = substitute(yytext,"*"," ");
+ yyextra->docBlock+=pat;
+ if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
BEGIN(DocBlock);
}
}
<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
- yyextra->docBlock+=substitute(yytext,"*"," ");
- if (yyextra->fencedSize==yyleng)
+ QCString pat = substitute(yytext,"*"," ");
+ yyextra->docBlock+=pat;
+ if (yyextra->fencedSize==pat.stripWhiteSpace().length())
{
BEGIN(DocBlock);
}