summaryrefslogtreecommitdiffstats
path: root/src/docparser.cpp
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2014-12-19 14:19:01 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2014-12-19 14:19:01 (GMT)
commitf9c9edba086f544b813ff036ea9209744da18c44 (patch)
tree77cb5a20c3ab2c4fcbbd8920d6a9dce28a99b1d8 /src/docparser.cpp
parentfa239ea9a3bba27e4fff84629883ee400f674c1e (diff)
downloadDoxygen-f9c9edba086f544b813ff036ea9209744da18c44.zip
Doxygen-f9c9edba086f544b813ff036ea9209744da18c44.tar.gz
Doxygen-f9c9edba086f544b813ff036ea9209744da18c44.tar.bz2
Bug 704090 - Allow Class{T}.Method in cref to refer to a generic class in XML comments
Diffstat (limited to 'src/docparser.cpp')
-rw-r--r--src/docparser.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index b7e8dad..12eae8a 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -232,6 +232,23 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
//---------------------------------------------------------------------------
+// replaces { with < and } with > inside string s
+static void unescapeCRef(QCString &s)
+{
+ char *p = s.data();
+ if (p)
+ {
+ char c;
+ while ((c=*p))
+ {
+ if (c=='{') c='<'; else if (c=='}') c='>';
+ *p++=c;
+ }
+ }
+}
+
+//---------------------------------------------------------------------------
+
/*! search for an image in the imageNameDict and if found
* copies the image to the output directory (which depends on the \a type
* parameter).
@@ -6045,6 +6062,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
QCString exceptName;
if (findAttribute(tagHtmlAttribs,"cref",&exceptName))
{
+ unescapeCRef(exceptName);
retval = handleParamSection(exceptName,DocParamSect::Exception,TRUE);
}
else
@@ -6089,6 +6107,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
//printf("XML_SEE: empty tag=%d\n",g_token->emptyTag);
if (findAttribute(tagHtmlAttribs,"cref",&cref))
{
+ unescapeCRef(cref);
if (g_token->emptyTag) // <see cref="..."/> style
{
bool inSeeBlock = g_inSeeBlock;
@@ -6123,6 +6142,7 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
QCString cref;
if (findAttribute(tagHtmlAttribs,"cref",&cref))
{
+ unescapeCRef(cref);
// Look for an existing "see" section
DocSimpleSect *ss=0;
QListIterator<DocNode> cli(m_children);