Skip to content

Commit

Permalink
Bug 740218 - Full scope needed when making link inside cross-referenc…
Browse files Browse the repository at this point in the history
…ed section (fixed regression)
  • Loading branch information
Dimitri van Heesch committed Dec 19, 2014
1 parent b3c44e5 commit 60abada
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/doctokenizer.l
Expand Up @@ -49,6 +49,7 @@ static int g_inputPos = 0;
static const char *g_inputString;
static QCString g_fileName;
static bool g_insidePre;
static int g_sharpCount=0;

// context for section finding phase
static Definition *g_definition;
Expand Down Expand Up @@ -437,6 +438,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
%x St_Anchor
%x St_Snippet
%x St_SetScope
%x St_SetScopeEnd

%x St_Sections
%s St_SecLabel1
Expand Down Expand Up @@ -1018,8 +1020,29 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
g_token->name = g_token->name.stripWhiteSpace();
return TK_WORD;
}
<St_SetScope>{SCOPEMASK}"<" {
g_token->name = yytext;
g_token->name = g_token->name.stripWhiteSpace();
g_sharpCount=1;
BEGIN(St_SetScopeEnd);
}
<St_SetScope>{BLANK} {
}
<St_SetScopeEnd>"<" {
g_token->name += yytext;
g_sharpCount++;
}
<St_SetScopeEnd>">" {
g_token->name += yytext;
g_sharpCount--;
if (g_sharpCount<=0)
{
return TK_WORD;
}
}
<St_SetScopeEnd>. {
g_token->name += yytext;
}
<St_Ref2>"&"{ID}";" { /* symbol */
g_token->name = yytext;
return TK_SYMBOL;
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Expand Up @@ -6288,7 +6288,7 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
{
// append documentation block to the page.
pd->setDocumentation(doc,fileName,startLine);
//printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pi,name);
//printf("Adding page docs `%s' pi=%p name=%s\n",doc.data(),pd,name);
}
else // new page
{
Expand Down

0 comments on commit 60abada

Please sign in to comment.