[clang] [clang-tools-extra] [llvm] [clangd] introduce doxygen parser (PR #150790)

Maksim Ivanov via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 6 11:02:39 PDT 2025


================
@@ -363,7 +363,12 @@ class CodeBlock : public Block {
   void renderMarkdown(llvm::raw_ostream &OS) const override {
     std::string Marker = getMarkerForCodeBlock(Contents);
     // No need to pad from previous blocks, as they should end with a new line.
-    OS << Marker << Language << '\n' << Contents << '\n' << Marker << '\n';
+    OS << Marker << Language << '\n' << Contents;
+    if (Contents.back() != '\n')
----------------
emaxx-google wrote:

Is the string guaranteed to be nonempty here?

https://github.com/llvm/llvm-project/pull/150790


More information about the llvm-commits mailing list