Page 1 of 1
enclosing code in comments so mantis doesn't interpret
Posted: 16 Jul 2015, 17:22
by Kunda
What is the tag that needs to be put around a block of code in a mantis comment so it won't interpret html tags or special chars like ~ or #
EDIT: Example, if someone wants to add a backtrace and not have all the strings prepended with '#' be interpreted as an mantisbt issue number
Re: enclosing code in comments so mantis doesn't interpret
Posted: 19 Jul 2015, 10:31
by atrol
This is not possible out of the box.
You can just deactivate the whole special treatment for ~ and # by using the configuration page of the MantisCoreFormatting plugin.
Re: enclosing code in comments so mantis doesn't interpret
Posted: 20 Jul 2015, 17:25
by Kunda
atrol wrote:This is not possible out of the box.
You can just deactivate the whole special treatment for ~ and # by using the configuration page of the MantisCoreFormatting plugin.
Yea.. that's not the answer I was hoping for.
What are other workarounds ?
Re: enclosing code in comments so mantis doesn't interpret
Posted: 20 Jul 2015, 18:57
by atrol
Workarounds (not really):
1) If you start from scratch you could change the bug link tag by adding the following line to file config_inc.php, and adjust to your needs, something where you think it will not appear in normal text, e.g.
2) I had a look at the example you mentioned in IRC
You could attach traces as text files instead of posting them in field additional information.
Solution
Introduce a new option in Mantis (or better an option in MantisCoreFormatting plugin.), e.g. something like $g_no_link_tag = 'nolink';
To allow posts like
<nolink>This is no link for issue #4711</nolink>
Re: enclosing code in comments so mantis doesn't interpret
Posted: 20 Jul 2015, 21:24
by Kunda
Yea.. see if I take workaround #1 then all previous issues that use that formatting break.
Attaching traces as texts is not ideal, but I see the ingenuity in it.
I think the <nolink> solution is the best one. Will it also not interpret html tags?
Re: enclosing code in comments so mantis doesn't interpret
Posted: 22 Jul 2015, 20:53
by atrol
Kunda wrote:Will it also not interpret html tags?
Depends on how it would be implemented.
Don't expect that there will be something implemented. This is nothing more than a proposal from me.
If you want this feature in a future version you have to
- enter a feature request at
http://www.manisbt.org/bugs
- wait until someone is interested in implementing it (maybe years) or much better
- fork us on GitHub and send a pull request
I know, that's not the answer you are hoping for
