[clang-tools-extra] [clang-doc] Wire Markdown parser into MDGenerator for fenced code blocks (PR #201746)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 09:55:41 PDT 2026


================
@@ -0,0 +1,157 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "Markdown.h"
+#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Allocator.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
+
+#define DEBUG_TYPE "clang-doc-markdown"
+
+namespace clang {
+namespace doc {
+namespace markdown {
----------------
ilovepi wrote:

historically we've kept the separate namespaces, but since you don't leave it for the entire file you can probably just do this.
```suggestion
namespace clang::doc::markdown {
```
@evelez7 Thoughts? this is a bit more modern of a style, but it'd be inconsistent w/ existing clang-doc convention. Its also a bit questionable that we put anything in the `clang` namespace, but we've done that forever, so 🤷  we should change it but its very low priority.

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


More information about the cfe-commits mailing list