[mlir] better formatting in interface docs
authorAlex Zinenko <zinenko@google.com>
Mon, 15 Mar 2021 10:10:32 +0000 (11:10 +0100)
committerAlex Zinenko <zinenko@google.com>
Mon, 15 Mar 2021 10:10:32 +0000 (11:10 +0100)
Start the description from a new line instead of putting the first
paragraph in the section header. Wrap the class name in backticks to
make it clear that it relates to the code.

mlir/tools/mlir-tblgen/OpInterfacesGen.cpp

index 77de47d..2f8f22c 100644 (file)
@@ -381,7 +381,8 @@ static void emitInterfaceDoc(const llvm::Record &interfaceDef,
   Interface interface(&interfaceDef);
 
   // Emit the interface name followed by the description.
-  os << "## " << interface.getName() << " (" << interfaceDef.getName() << ")";
+  os << "## " << interface.getName() << " (`" << interfaceDef.getName()
+     << "`)\n\n";
   if (auto description = interface.getDescription())
     mlir::tblgen::emitDescription(*description, os);