================ @@ -118,8 +138,8 @@ class Document { BulletList &addBulletList(); /// Doesn't contain any trailing newlines. - /// We try to make the markdown human-readable, e.g. avoid extra escaping. - /// At least one client (coc.nvim) displays the markdown verbatim! ---------------- tcottin wrote:
Do you have an idea how altering the escaping behaviour based on the comment syntax could look like? The comment kinds/styles which are attached to symbols can be distinguished using the [RawComment::CommentKind](https://clang.llvm.org/doxygen/classclang_1_1RawComment.html#a1d5ae0acdc245f39b71a158ec9932038) enum. One simple differentiation could be normal and BCPL comments. These could be escaped e.g. All other kinds are valid doxygen code blocks. Of course we could say `RCK_BCPLSlash` is escaped and `RCK_JavaDoc` not. But doxygen does not distinguish between those and the `MARKDOWN_SUPPORT` option would affect all equally. Also, I have no idea how we could distinguish documentation styles for other tools, like `headerdoc` which is mentioned in `RCK_Qt` comment kind. I dont know how the markdown behaviour with `headerdoc` is or if its even supported. I think, even if we distinguish the different comment styles to determine the escaping behaviour, there is no universal solution which satisfies all users with such an approach. Introducing an option to configure the escaping behaviour is the most user friendly way imo. Such an option could also be extended to allow different escaping behaviour for different comment styles. Note: this patch is the first one to support parsing of doxygen style comments and showing the parsed documentation as markdown in the hover. Meaning doxygen special commands like `\b bold` will be translated to markdown `**bold**` to be rendered similar to doxygen output by the client. We could also make a new option to enable/disable the doxygen parsing as a whole and only apply the new escaping behaviour if doxygen parsing is configured by the user. https://github.com/llvm/llvm-project/pull/140498 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits