Jump to content

HTML escaping mangling C++ comments

c++ escape comment.

  • Please log in to reply
2 replies to this topic

#1 Mickael



  • Members
  • Pip
  • 8 posts

Posted 20 November 2018 - 01:20 PM


my team is working a lot on C++ code, containing a lot of templates, which means quite many "<" and ">" symbols.

Unfortunately the Swarm comments on the web interface are converted to safe HTML entities, so instead of:

unique_lock<mutex> _Lock(_Mtx);
_Set_value_raw(_STD forward<_Ty>(_Val),&_Lock, _At_thread_exit);

we see that displayed:

unique_lock&lt;mutex&gt; _Lock(_Mtx);
_Set_value_raw(_STD forward&lt;_Ty&gt;(_Val), &amp;_Lock, _At_thread_exit);

which unfortunately makes comments on how to fix code pretty hard to read (specially with the lack of syntax coloring).

Any chance that this can be fixed soon?

#2 P4Dale


    Advanced Member

  • Staff
  • 49 posts

Posted 26 November 2018 - 12:59 PM

Hello Mickael,

I have had a quick look with our latest code in development and can't reproduce the issue your reporting in comment within side the block code.

Here are the example I tried in three different comments:
1. ----------------------------------------------------------------------------
Change me to :
unique_lock<mutex> _Lock(_Mtx);
_Set_value_raw(_STD forward<_Ty>(_Val),&_Lock, _At_thread_exit);
2. ----------------------------------------------------------------------------

In quote block
unique_lock<mutex> _Lock(_Mtx);
_Set_value_raw(_STD forward<_Ty>(_Val),&_Lock, _At_thread_exit);
3. ----------------------------------------------------------------------------
```unique_lock<mutex> _Lock(_Mtx);
_Set_value_raw(_STD forward<_Ty>(_Val),&_Lock, _At_thread_exit);```

All of these seems to come out without string being changed. First one with no box around. Second with grey box around it, black text. Third one grey box with red text in one line.


Swarm Dev.

#3 Mickael



  • Members
  • Pip
  • 8 posts

Posted 26 November 2018 - 01:18 PM

Could it be because we are not on the latest version?
(We are apparently using

SWARM/2018.1/1699920 (2018/09/12))

Also tagged with one or more of these keywords: c++, escape, comment.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users