【问题标题】:Google Apps Script auto-generated documentation see and prettyprintGoogle Apps 脚本自动生成的文档 see and prettyprint
【发布时间】:2018-02-15 06:23:58
【问题描述】:

在为 Google 应用脚本库使用自动生成的文档时,是否可以将 Google prettyprint 类用于代码示例?我尝试将其包含在 pre 标签中: <pre class="prettyprint">

但似乎在这一代中被剥离了。

还有没有办法使用@see 命令来引用代码文档中的函数或外部资源?

【问题讨论】:

    标签: google-apps-script documentation jsdoc


    【解决方案1】:

    google-apps-script 支持的 gsdoc 标签有很多限制,您只描述了其中两个 - 不支持 html 元素属性和有限的 doc 标签。我在How to preview jsdoc comments in google doc scripts 中描述了其他一些问题。

    还有未解决的问题:

    您可以针对您特别关注的问题添加一个新问题。 @see 标记特别奇怪,因为它出现在 Base Services 文档中,因此该标记要么仅适用于 Google,要么已替换为 html。

    一种选择是在另一个平台或托管服务上构建和托管您的文档。这就是为一些著名的库所做的,例如2D Array Library。然后,您可以使用 jsdoc 生成您的文档,并利用整个标签集的丰富性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-02-06
      • 1970-01-01
      • 2013-06-30
      • 1970-01-01
      • 2016-05-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多