Conversation
|
Yep, that works for me. |
| # This module contains methods for escaping characters in Doxygen comments. | ||
| module Doxygen | ||
| def self.escape(value) | ||
| value.gsub(/[\.*%!`#<>_+-]/, '\\\\\0') |
There was a problem hiding this comment.
I'm not certain this is correct though, as e.g. mainy comments do contain markdown.
The one comment I had issue with had a single backtick, but many other have proper mardown codeblocks.
There was a problem hiding this comment.
Ah, right. I tried /verbatim but that wraps the result in a codeblock. I think I can just rename this method and it should be ok.
There was a problem hiding this comment.
(It's only applied to that one specific place where token comments are shown)
There was a problem hiding this comment.
I still don't follow. These comment do contain doxygen code (markdown really but WTV) so it shouldn't be fully escaped.
IMO it's not that we're missing some automated escaping, it's that the YAML file do contain invalid markdown/doxygen, the fix can only be manual.
There was a problem hiding this comment.
It's only for these comments
Lines 327 to 655 in 62c7300
Makes sense for these I think, there is no markdown (yet). You would have to escape many other places manually otherwise. I tried that but doxygen doesn't really do what I want it to.
I'm also fine with your PR. I never looked at the generated docs before so it doesn't really matter that much to me.
There was a problem hiding this comment.
Ah I see. I guess that currently work since none of these comments do use Doxygen formatting, but would be a problem in the future if one wanted to.
You have more context than me so up to you (or to Kevin).
Many characters have special meaning and break formatting
c588996 to
0b9d516
Compare
Many characters have special meaning and break formatting
Before:

After:

@byroot can you check if this fixes #3895 for you? It doesn't break when I run it locally even though I use the same version as you.