Skip to content

Commit fcb13f5

Browse files
committed
issue doxygen#12140 Concatenating pages with same name behaves different in V.1.15 and 1.17
- wrong state was called and also reset on wrong place / double reset - wrong variable was used to to handle filename
1 parent 8020a2e commit fcb13f5

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/docparser.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ void DocParser::handleIFile(char cmdChar,const QCString &cmdName)
14161416
cmdChar,cmdName);
14171417
return;
14181418
}
1419-
tokenizer.setStateFile();
1419+
tokenizer.setStateIFile();
14201420
tok=tokenizer.lex();
14211421
tokenizer.setStatePara();
14221422
if (!tok.is(TokenRetval::TK_WORD))
@@ -1426,21 +1426,20 @@ void DocParser::handleIFile(char cmdChar,const QCString &cmdName)
14261426
return;
14271427
}
14281428
context.fileName = context.token->name;
1429-
tokenizer.setStatePara();
14301429
}
14311430

14321431
void DocParser::handleILine(char cmdChar,const QCString &cmdName)
14331432
{
14341433
AUTO_TRACE();
14351434
tokenizer.setStateILine();
14361435
Token tok = tokenizer.lex();
1436+
tokenizer.setStatePara();
14371437
if (!tok.is(TokenRetval::TK_WORD))
14381438
{
14391439
warn_doc_error(context.fileName,tokenizer.getLineNr(),"invalid argument for command '{:c}{}'",
14401440
cmdChar,cmdName);
14411441
return;
14421442
}
1443-
tokenizer.setStatePara();
14441443
}
14451444

14461445
/* Helper function that deals with the most common tokens allowed in

src/doctokenizer.l

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1380,13 +1380,17 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
13801380
return Token::make_TK_NONE();
13811381
}
13821382
<St_IFile>{BLANK}*{FILEMASK} {
1383-
yyextra->fileName = QCString(yytext).stripWhiteSpace();
1383+
QCString text(yytext);
1384+
text = text.stripWhiteSpace();
1385+
yyextra->fileName = text;
1386+
yyextra->token.name = text;
13841387
return Token::make_TK_WORD();
13851388
}
13861389
<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
13871390
QCString text(yytext);
13881391
text = text.stripWhiteSpace();
13891392
yyextra->fileName = text.mid(1,text.length()-2);
1393+
yyextra->token.name = text.mid(1,text.length()-2);
13901394
return Token::make_TK_WORD();
13911395
}
13921396
<St_File>{FILEMASK} {

0 commit comments

Comments
 (0)