summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2007-05-06 12:30:18 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2007-05-06 12:30:18 (GMT)
commit0b087b99d43fb3803b26407d771ca32e6cf5c34b (patch)
treecfc812b095178411db5aae564fc43cac8b714078 /src/docparser.cpp
parent80f45b6274c81f9cfd1772e5039005124ae04fab (diff)
downloadDoxygen-0b087b99d43fb3803b26407d771ca32e6cf5c34b.zip
Doxygen-0b087b99d43fb3803b26407d771ca32e6cf5c34b.tar.gz
Doxygen-0b087b99d43fb3803b26407d771ca32e6cf5c34b.tar.bz2
Release-1.5.2-20070506
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index e1bfac5..da673bf 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -1422,7 +1422,7 @@ static void readTextFileByName(const QString &file,QString &text)
FileDef *fd;
if ((fd=findFileDef(Doxygen::exampleNameDict,file,ambig)))
{
- text = fileToString(fd->absFilePath(),FALSE);
+ text = fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"));
}
else if (ambig)
{
@@ -2092,6 +2092,8 @@ void DocRef::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
+ case TK_HTMLTAG:
+ break;
default:
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected token %s",
tokToString(tok));
@@ -2111,7 +2113,7 @@ void DocRef::parse()
}
handlePendingStyleCommands(this,m_children);
- DBG(("DocRef::parse() end\n"));
+
DocNode *n=g_nodeStack.pop();
ASSERT(n==this);
}
@@ -2155,7 +2157,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
}
-QString DocLink::parse(bool isJavaLink)
+QString DocLink::parse(bool isJavaLink,bool isXmlLink)
{
QString result;
g_nodeStack.push(this);
@@ -2187,6 +2189,13 @@ QString DocLink::parse(bool isJavaLink)
warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unsupported symbol %s found",
g_token->name.data());
break;
+ case TK_HTMLTAG:
+ if (g_token->name!="see" || !isXmlLink)
+ {
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Warning: Unexpected xml/html command %s found",
+ g_token->name.data());
+ }
+ goto endlink;
case TK_LNKWORD:
case TK_WORD:
if (isJavaLink) // special case to detect closing }
@@ -4847,11 +4856,31 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
// can we expect from Microsoft...)
{
QString cref;
+ //printf("XML_SEE: empty tag=%d\n",g_token->emptyTag);
if (findAttribute(tagHtmlAttribs,"cref",&cref))
{
- DocRef *ref = new DocRef(this,cref);
- m_children.append(ref);
- ref->parse();
+ if (g_token->emptyTag) // <see cref="..."/> style
+ {
+ bool inSeeBlock = g_inSeeBlock;
+ g_token->name = cref;
+ g_inSeeBlock = TRUE;
+ handleLinkedWord(this,m_children);
+ g_inSeeBlock = inSeeBlock;
+ }
+ else // <see cref="...">...</see> style
+ {
+ //DocRef *ref = new DocRef(this,cref);
+ //m_children.append(ref);
+ //ref->parse();
+ doctokenizerYYsetStatePara();
+ DocLink *lnk = new DocLink(this,cref);
+ m_children.append(lnk);
+ QString leftOver = lnk->parse(FALSE,TRUE);
+ if (!leftOver.isEmpty())
+ {
+ m_children.append(new DocWord(this,leftOver));
+ }
+ }
}
else
{