Mantis 错误注释格式

发布于 2024-09-30 08:47:36 字数 284 浏览 8 评论 0 原文

是否可以格式化在 Mantis 错误跟踪器中输入的某个问题的错误注释(评论)?

我正在使用 Mantis v1.0.8

例如

“样本螳螂错误笔记”

,以纯文本形式显示。

我想将其加粗或以不同的颜色显示,

例如类似于 https://stackoverflow.com/editing-help

是否有任何其他错误跟踪系统允许此类功能?

Is it possible to format bugnotes(comments) entered in Mantis bug tracker for an issue ?

I am using Mantis v1.0.8

e.g.

"sample mantis bug notes"

which appears as plain text.

I would like to make it bold or to display in different color

e.g. similar to https://stackoverflow.com/editing-help

does any other bug tracking system allow such feature ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风吹雨成花 2024-10-07 08:47:36

正如 Gawciomhu 所说,该列表是有限的,在当前的 mantis 1.2.15 中允许在描述和内容中使用以下标签其他多行字段:

      1. < /code>、

         >、

  • 此外,摘要和其他单行字段(例如操作系统平台)中允许使用以下标签: 。在问题摘要中强调一些内容很有趣,对吧? :)

    没有明确说明的是这些列表是可定制的。不幸的是,它们是所谓的全局设置,因此无法使用 Web 界面进行设置,但如果您可以调整已安装的 mantis 代码,则可以修改 / config_inc.php 文件(旨在本地修改)并在其中添加以下选项:

    /**
     * These are the valid html tags for multi-line fields (e.g. description)
     * [...]
     */
    $g_html_valid_tags = 'p, li, ul, ol, br, pre, i, b, u, em, strong, code';
    
    /**
     * These are the valid html tags for single line fields (e.g. issue summary).
     * [...]
     */
    $g_html_valid_tags_single_line = 'i, b, u, em, strong, code';
    

    服务器重新启动后,您应该能够在摘要和描述中使用 标记你的问题。

    不幸的是,mantis 标签过滤器似乎不允许任何标签属性,因此允许自由格式化并不容易。就我个人而言,我调整了它的样式表来调整

     标签内容的显示颜色。为此,您可以编辑 /css/default.css` 文件并添加/调整以下规则:

    pre         { margin-top: 0px; margin-bottom: 0px; color: #0000CC; }
    code        { color: #0000CC; }
    em > strong { color: #CC0000; }
    

    这样您的报告可能会获得一些颜色:)

    As it was said by Gawcio and mhu, the list is limited and in current mantis 1.2.15 use of following tags is allowed in description and other multi-line fields: <p>, <li>, <ul>, <ol>, <br>, <pre>, <i>, <b>, <u>, <em>, <strong>.

    Additionally, following tags are allowed in summary and other single-line fields (e.g. OS or Platform): <i>, <b>, <u>, <em>, <strong>. That's funny to have some emphasis in issue summary, right? :)

    What is not explicitly said, is that these lists are customizable. Unfortunately, they are so-called global settings, so they can't be set using web interface, but if you have a possibility of tweaking the installed mantis code, you can modify the <mantis-doc-root>/config_inc.php file (which is purposed to be modified locally) and add following options there:

    /**
     * These are the valid html tags for multi-line fields (e.g. description)
     * [...]
     */
    $g_html_valid_tags = 'p, li, ul, ol, br, pre, i, b, u, em, strong, code';
    
    /**
     * These are the valid html tags for single line fields (e.g. issue summary).
     * [...]
     */
    $g_html_valid_tags_single_line = 'i, b, u, em, strong, code';
    

    After server restart, you should be able to use the <code> tag in summary and description of your issues.

    Unfortunately, mantis tags filters seem to disallow any tag attributes, so it won't be easy to allow free formatting. Personally, I have adjusted its style sheet to tweak the colour in which content of <pre> and <code> tags is displayed. To achieve it, you can edit the <mantis-doc-root>/css/default.css` file and add/adjust following rules:

    pre         { margin-top: 0px; margin-bottom: 0px; color: #0000CC; }
    code        { color: #0000CC; }
    em > strong { color: #CC0000; }
    

    This way your report may gain some colours :)

    菩提树下叶撕阳。 2024-10-07 08:47:36

    在 Mantis 中,我们可以使用一些 HTML 标签(不幸的是并非所有标签都受支持)。根据我的经验(我记得很清楚),我成功地使用了: > ;、 和列表,有序

    1. 和无序(项目符号):

      • 。它使注释和描述更具可读性。

    目前我正在使用 1.1.8 版本的 Mantis,但我在旧版本(1.0 之前)中成功使用了它 - 所以你的也应该处理这个问题。

    In Mantis one can use some of HTML tags (unfortunately not all are supported). From my experience (as I remember well) I've successfully used: <B>, <I>, <U>, <S> and lists, both ordered <OL><LI> and unordered (bullets): <UL><LI>. It makes notes and descriptions more readable.

    Currently I'm using 1.1.8 version of Mantis but I was successfully using it in older version (prior to 1.0) - so yours should also handle that.

    等风来 2024-10-07 08:47:36

    使用 /config/config_inc.php 下的个人 config_inc.php 文件覆盖 Mantis(版本<1.3)默认配置

    您可以覆盖此配置文件中的所有默认设置。例如 $g_html_valid_tags$g_bug_view_page_fields、...只需从 /config_defaults_inc.php 复制/粘贴默认值> 到您的 /config/config_inc.php 文件。

    Overwrite Mantis (ver.<1.3) default configuration by using your personal config_inc.php file under <mantis-doc-root>/config/config_inc.php

    You can overwrite all default settings in this config file. E.g. $g_html_valid_tags, $g_bug_view_page_fields, ... Just copy/paste the default values from <mantis-doc-root>/config_defaults_inc.php to your <mantis-doc-root>/config/config_inc.php file.

    ~没有更多了~
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文