Permalink
Browse files

Physical newlines in ALIASES configuration tags.

Some commands read input till the end of the physical line. In case these commands are used in an alias the rest of the line is lost / gives not the required results.
This patch creates the possibility to have physical newlines in ALIASES.
See also: https://stackoverflow.com/questions/46050789/doxygen-alias-with-multiple-commands
  • Loading branch information...
albert-github committed Sep 9, 2017
1 parent ddae919 commit d6801c4c5eaeebc5e14f5d1cd7c312ad82c1dbbd
Showing with 17 additions and 2 deletions.
  1. +3 −1 doc/custcmd.doc
  2. +4 −1 src/config.xml
  3. +10 −0 src/doxygen.cpp
View
@@ -40,7 +40,9 @@ The simplest form of an alias is a simple substitution of the form
put the command `\sideeffect` (or `@sideeffect`) in the documentation, which
will result in a user-defined paragraph with heading <b>Side Effects:</b>.
Note that you can put `\n`'s in the value part of an alias to insert newlines.
Note that you can put `\n`'s in the value part of an alias to insert newlines
(in the resulting output). You can put `^^` in the value part of an alias to
insert a newline as if a physical newline was in the original file.
Also note that you can redefine existing special commands if you wish.
View
@@ -532,7 +532,10 @@ Go to the <a href="commands.html">next</a> section or return to the
will allow you to
put the command \c \\sideeffect (or \c \@sideeffect) in the documentation, which
will result in a user-defined paragraph with heading "Side Effects:".
You can put \ref cmdn "\\n"'s in the value part of an alias to insert newlines.
You can put \ref cmdn "\\n"'s in the value part of an alias to insert newlines
(in the resulting output).
You can put `^^` in the value part of an alias to insert a newline as if
a physical newline was in the original file.
]]>
</docs>
</option>
View
@@ -9826,6 +9826,16 @@ static void escapeAliases()
}
newValue+=value.mid(p,value.length()-p);
*s=newValue;
p = 0;
newValue = "";
while ((in=value.find("^^",p))!=-1)
{
newValue+=value.mid(p,in-p);
newValue+="\n";
p=in+2;
}
newValue+=value.mid(p,value.length()-p);
*s=newValue;
//printf("Alias %s has value %s\n",adi.currentKey().data(),s->data());
}
}

0 comments on commit d6801c4

Please sign in to comment.