[Doxygen-develop] expansion of aliases with multiple references to same argument
Brought to you by:
dimitri
From: Robbie G. <ro...@m8...> - 2007-07-31 00:13:48
|
Hi All, i'm seeing what looks like a bug with an alias of the form "THING{1} =<a href=\"http://prefix/THING-\1\">THING-\1</a>" I was expecting THING{456} to expand to <a href=\"http://prefix/THING-456\">THING-456</a> However, with 1.5.3, it looks like i'm getting <a href=\"http://prefix/THING-456\">THING4561</a> It looks to me like replaceAliasArgument in util.cpp is the culprit - the code uses aliasValue each time around the loop to find the replacement index, but uses these as indexes into result. If the alias arguments expand to strings of length other than 2, these indexes are not in sync after the first replacement. By replacing aliasValue with result in the loop condition and the escaped marker check i get the expected behaviour (patch below). - robbie 6201c6201 < while ((i=aliasValue.find(paramMarker,p))!=-1) // search for marker --- > while ((i=result.find(paramMarker,p))!=-1) // search for marker 6205c6205 < if (i==0 || aliasValue.at(i-1)!='\\') // found unescaped marker --- > if (i==0 || result.at(i-1)!='\\') // found unescaped marker |