Commit 2ed3d33a authored by Dimitri van Heesch's avatar Dimitri van Heesch

Fixed issues with @parblock and added regression test case

parent 8cfac90d
...@@ -2403,6 +2403,11 @@ static bool handleParBlock(const QCString &) ...@@ -2403,6 +2403,11 @@ static bool handleParBlock(const QCString &)
warn(yyFileName,yyLineNr, warn(yyFileName,yyLineNr,
"found \\parblock command while already in a parblock!"); "found \\parblock command while already in a parblock!");
} }
if (!g_spaceBeforeCmd.isEmpty())
{
addOutput(g_spaceBeforeCmd);
g_spaceBeforeCmd.resize(0);
}
addOutput("@parblock "); addOutput("@parblock ");
g_insideParBlock = TRUE; g_insideParBlock = TRUE;
return FALSE; return FALSE;
......
...@@ -4945,6 +4945,10 @@ int DocParamSect::parse(const QCString &cmdName,bool xmlContext, Direction d) ...@@ -4945,6 +4945,10 @@ int DocParamSect::parse(const QCString &cmdName,bool xmlContext, Direction d)
{ {
retval = pl->parse(cmdName); retval = pl->parse(cmdName);
} }
if (retval==RetVal_EndParBlock)
{
retval = RetVal_OK;
}
DBG(("DocParamSect::parse() end retval=%d\n",retval)); DBG(("DocParamSect::parse() end retval=%d\n",retval));
DocNode *n=g_nodeStack.pop(); DocNode *n=g_nodeStack.pop();
......
...@@ -1024,7 +1024,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{LNKWORD2} ...@@ -1024,7 +1024,7 @@ REFWORD {LABELID}|{REFWORD2}|{REFWORD3}|{LNKWORD2}
g_token->name = types+"#"+params.mid(i); g_token->name = types+"#"+params.mid(i);
return TK_WORD; return TK_WORD;
} }
<St_Param>[^ \t\n,]+ { <St_Param>[^ \t\n,@\\]+ {
g_token->name = yytext; g_token->name = yytext;
if (g_token->name.at(yyleng-1)==':') if (g_token->name.at(yyleng-1)==':')
{ {
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
<compounddef id="054__parblock_8cpp" kind="file">
<compoundname>054_parblock.cpp</compoundname>
<sectiondef kind="func">
<memberdef kind="function" id="054__parblock_8cpp_1a2dd0ac47f42a9994b91d34403be05fe9" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
<type>void</type>
<definition>void function</definition>
<argsstring>(int client, int *resource, int parblock, int *test, int p)</argsstring>
<name>function</name>
<param>
<type>int</type>
<declname>client</declname>
</param>
<param>
<type>int *</type>
<declname>resource</declname>
</param>
<param>
<type>int</type>
<declname>parblock</declname>
</param>
<param>
<type>int *</type>
<declname>test</declname>
</param>
<param>
<type>int</type>
<declname>p</declname>
</param>
<briefdescription>
</briefdescription>
<detaileddescription>
<para>call by target-specific code to manage resources required by the client.</para>
<para>
<parameterlist kind="param">
<parameteritem>
<parameternamelist>
<parametername direction="in">client</parametername>
</parameternamelist>
<parameterdescription>
<para>ID of client requesting resource. </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">resource</parametername>
</parameternamelist>
<parameterdescription>
<para>Requested resource </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">parblock</parametername>
</parameternamelist>
<parameterdescription>
<para>
<parblock>
<para>This is a test for the @parblock command.</para>
<para>A list if values for the parblock param:<itemizedlist><listitem><para>Item 1. This is short one-line description.</para></listitem><listitem><para>Item 2. This is a long bullet item; sometimes they wrap on multiple lines like this one.</para></listitem></itemizedlist>
</para>
<para>This is the second paragraph description for the @parblock parameter. Always end the text inside the @parblock command with an @endparblock command. </para>
</parblock>
</para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="out">test</parametername>
</parameternamelist>
<parameterdescription>
<para>This is a test parameter for this function to see if it is included in the parameter table </para>
</parameterdescription>
</parameteritem>
<parameteritem>
<parameternamelist>
<parametername direction="in">p</parametername>
</parameternamelist>
<parameterdescription>
<para>
<parblock>
<para>First paragraph of the param description. <verbatim> Second paragraph of the param description.
</verbatim> </para>
</parblock>
</para>
</parameterdescription>
</parameteritem>
</parameterlist>
</para>
</detaileddescription>
<inbodydescription>
</inbodydescription>
<location file="054_parblock.cpp" line="32" column="1"/>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<location file="054_parblock.cpp"/>
</compounddef>
</doxygen>
// objective: test the \parblock command
// check: 054__parblock_8cpp.xml
/** @file */
/**
call by target-specific code to manage resources required by the client.
@param[in] client ID of client requesting resource.
@param[out] resource Requested resource
@param[in] parblock @parblock This is a test for the \@parblock
command.
A list if values for the parblock param:
- Item 1. This is short one-line description.
- Item 2. This is a long bullet item;
sometimes they wrap on multiple lines like this
one.
This is the second paragraph description for the
\@parblock parameter. Always end the text inside
the \@parblock command with an \@endparblock
command.
@endparblock
@param[out] test This is a test parameter for this function to see if
it is included in the parameter table
@param[in] p @parblock First paragraph of the param description.
Second paragraph of the param description.
@endparblock
*/
void function(int client,int *resource,int parblock,int *test,int p);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment