Doxygen 在 @snippets 命令后放置 HTML 标签
Doxygen put HTML tag after a @snippets command
我创建了一个别名来将 \snippet
嵌入到 HTML <div></div>
ALIASES += "snippetLang{2}=<div id='' class='snippetcontent'> \snippet </div>"
然后我使用这样的别名:
@snippetLang{CS,ExampleForm.cs OnShow example}
参数扩展正常,但由于代码段的第二个参数跨越到行尾,因此 </div>
标记将被包括在内。
<div id='CS' class='snippetcontent'> \snippet ExampleForm.cs OnShow example </div>
\snippet
命令现在将查找引用“OnShow example </div>
”,而不仅仅是“OnShow example
”
有什么方法可以让 doxygen 扩展 \snippet
单独一行的命令,像这样?
<div id='CS' class='snippetcontent'>
\snippet ExampleForm.cs OnShow example
</div>
Doxygen 版本为 1.8.14
来自 doxygen 文档 (1.8.15):
ALIASES This tag can be used to specify a number of aliases that act
as commands in the documentation. An alias has the form: name=value For
example adding "sideeffect=@par Side Effects:\n" will allow you to put
the command \sideeffect (or @sideeffect) in the documentation, which
will result in a user-defined paragraph with heading "Side Effects:".
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.
When you need a literal { or } or , in the value part of an alias you
have to escape them by means of a backslash (), this can lead to
conflicts with the commands{ and } for these it is advised to use
the version @{ and @} or use a double escape (\{ and \})
版本:
ALIASES += "snippetLang{2}=<div id='' class='snippetcontent'> \snippet ^^</div>"
适用于 1.8.14 及更高版本
版本
ALIASES += "snippetLang{2}=<div id='' class='snippetcontent'> \snippet \n</div>"
适用于 1.8.14 之前的版本
我创建了一个别名来将 \snippet
嵌入到 HTML <div></div>
ALIASES += "snippetLang{2}=<div id='' class='snippetcontent'> \snippet </div>"
然后我使用这样的别名:
@snippetLang{CS,ExampleForm.cs OnShow example}
参数扩展正常,但由于代码段的第二个参数跨越到行尾,因此 </div>
标记将被包括在内。
<div id='CS' class='snippetcontent'> \snippet ExampleForm.cs OnShow example </div>
\snippet
命令现在将查找引用“OnShow example </div>
”,而不仅仅是“OnShow example
”
有什么方法可以让 doxygen 扩展 \snippet
单独一行的命令,像这样?
<div id='CS' class='snippetcontent'>
\snippet ExampleForm.cs OnShow example
</div>
Doxygen 版本为 1.8.14
来自 doxygen 文档 (1.8.15):
ALIASES This tag can be used to specify a number of aliases that act as commands in the documentation. An alias has the form: name=value For example adding "sideeffect=@par Side Effects:\n" will allow you to put the command \sideeffect (or @sideeffect) in the documentation, which will result in a user-defined paragraph with heading "Side Effects:". 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. When you need a literal { or } or , in the value part of an alias you have to escape them by means of a backslash (), this can lead to conflicts with the commands{ and } for these it is advised to use the version @{ and @} or use a double escape (\{ and \})
版本:
ALIASES += "snippetLang{2}=<div id='' class='snippetcontent'> \snippet ^^</div>"
适用于 1.8.14 及更高版本
版本
ALIASES += "snippetLang{2}=<div id='' class='snippetcontent'> \snippet \n</div>"
适用于 1.8.14 之前的版本