包括@在wihtout任何错误ASDoc注释? [英] Include @ in ASDoc comments wihtout any errors?

查看:174
本文介绍了包括@在wihtout任何错误ASDoc注释?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果你在你的ASDoc的 @ 象征,code编译,但发生器的的ASDoc会叫出声来难以理解的错误消息。

If you have the @ symbol in your ASDoc, the code will compile, but the generator for the ASDoc will yell out an unintelligible error message.

/**
 * Removes the following characters which are forbidden:
 *    @/\"#$%&'()*:;<=>!?
 */
public function removeForbiddenChars(str:String):String

有没有什么办法可以在您的ASDoc的 @ 符号,而被抛出的错误?

Is there any way to include the @ symbol in your ASDoc without an error being thrown?

推荐答案

据<一href="http://help.adobe.com/en_US/flex/using/WSd0ded3821e0d52fe1e63e3d11c2f44bb7b-7fed.html#WSd0ded3821e0d52fe1e63e3d11c2f44bb7b-7ff6"相对=nofollow>由Adobe 文件:

的ASDoc通过了所有的HTML标签和标签实体评论到输出。因此,如果你要使用特殊字符在注释中,使用HTML code等效输入。例如,使用小于号(&LT; )或大于号(&GT; )的符号发表评论,请使用&放大器; LT; &放大器; GT; 要在注释中使用at符号(<$ C C $> @ ),使用&放大器;#64; ,否则,这些字符是PTED作为输出文字HTML字符间$ P $。

ASDoc passes all HTML tags and tag entities in a comment to the output. Therefore, if you want to use special characters in a comment, enter them using HTML code equivalents. For example, to use a less-than (<) or greater-than (>) symbols in a comment, use &lt; and &gt;. To use the at-sign (@) in a comment, use &#64;. Otherwise, these characters are interpreted as literal HTML characters in the output.

虽然文件中没有提及,这是不允许的第四个符号&安培; ,且必须由&放大器来代替;放大器;

Although not mentioned in the documentation,a fourth symbol that is not allowed is &, and must be replaced by &amp;.

所以,如果一个人遵循的例子中的ASDoc这些说明:

So, if one were to follow these instructions for the example ASDoc:

/**
 * Removes the following characters which are forbidden:
 *    &#64;/\"#$%&amp;'()*:;&lt;=&gt;!?
 */
public function removeForbiddenChars(str:String):String

当看在你的编辑评论这可能不是很清楚,但是这将是明确的,一旦的ASDoc已经被编译成HTML。也许有可能短语这样一种方式,特殊字符不使用注释:

It may not be clear when looking at the comment in your editor, but it will be clear once the ASDoc has been compiled into HTML. Perhaps one could phrase the comment in such a way that the special characters aren't used:

Removes /\"#$%'()*:;=!? as well as the 'at' symbol (&#64;), the ampersand symbol (&amp;), the 'less than' symbol (&lt;), and the 'greater than' symbol (&lt;)

这篇关于包括@在wihtout任何错误ASDoc注释?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆