r249542 - clang-format: Hopefully fix code blocks in docs.

Daniel Jasper via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 06:02:45 PDT 2015


Author: djasper
Date: Wed Oct  7 08:02:45 2015
New Revision: 249542

URL: http://llvm.org/viewvc/llvm-project?rev=249542&view=rev
Log:
clang-format: Hopefully fix code blocks in docs.

Otherwise I will have to install sphinx ;)..

Modified:
    cfe/trunk/docs/ClangFormatStyleOptions.rst
    cfe/trunk/docs/tools/dump_format_style.py

Modified: cfe/trunk/docs/ClangFormatStyleOptions.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/ClangFormatStyleOptions.rst?rev=249542&r1=249541&r2=249542&view=diff
==============================================================================
--- cfe/trunk/docs/ClangFormatStyleOptions.rst (original)
+++ cfe/trunk/docs/ClangFormatStyleOptions.rst Wed Oct  7 08:02:45 2015
@@ -157,6 +157,7 @@ the configuration (without a prefix: ``A
   brackets. This will result in formattings like
 
   .. code-block:: c++
+
     someLongFunction(argument1,
                      argument2);
 
@@ -167,6 +168,7 @@ the configuration (without a prefix: ``A
   will result in formattings like
 
   .. code-block:: c++
+
     int aaaa = 12;
     int b    = 23;
     int ccc  = 23;
@@ -178,6 +180,7 @@ the configuration (without a prefix: ``A
   will result in formattings like
 
   .. code-block:: c++
+
     int         aaaa = 12;
     float       b = 23;
     std::string ccc = 23;
@@ -394,12 +397,14 @@ the configuration (without a prefix: ``A
   These are expected to be macros of the form:
 
   .. code-block:: c++
+
     FOREACH(<variable-declaration>, ...)
       <loop-body>
 
   In the .clang-format configuration file, this can be configured like:
 
   .. code-block:: c++
+
     ForEachMacros: ['RANGES_FOR', 'FOREACH']
 
   For example: BOOST_FOREACH.
@@ -422,6 +427,7 @@ the configuration (without a prefix: ``A
   To configure this in the .clang-format file, use:
 
   .. code-block:: c++
+
     IncludeCategories:
       - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
         Priority:        2

Modified: cfe/trunk/docs/tools/dump_format_style.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/tools/dump_format_style.py?rev=249542&r1=249541&r2=249542&view=diff
==============================================================================
--- cfe/trunk/docs/tools/dump_format_style.py (original)
+++ cfe/trunk/docs/tools/dump_format_style.py Wed Oct  7 08:02:45 2015
@@ -87,7 +87,7 @@ class EnumValue:
 
 def clean_comment_line(line):
   if line == '/// \\code':
-    return '\n.. code-block:: c++\n'
+    return '\n.. code-block:: c++\n\n'
   if line == '/// \\endcode':
     return ''
   return line[4:] + '\n'




More information about the cfe-commits mailing list