]> granicus.if.org Git - clang/commitdiff
clang-format: Add empty line before code-blocks in Docs.
authorDaniel Jasper <djasper@google.com>
Tue, 6 Oct 2015 12:11:51 +0000 (12:11 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 6 Oct 2015 12:11:51 +0000 (12:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249394 91177308-0d34-0410-b5e6-96231b3b80d8

docs/ClangFormatStyleOptions.rst
docs/tools/dump_format_style.py

index fd14d90ff537fe39bc7514922a1c90dcd44d34b8..7d31a5869cef0e46ee2684556566b5d26a92bc2f 100644 (file)
@@ -155,6 +155,7 @@ the configuration (without a prefix: ``Auto``).
 
   This applies to round brackets (parentheses), angle brackets and square
   brackets. This will result in formattings like
+
   .. code-block:: c++
     someLongFunction(argument1,
                      argument2);
@@ -164,6 +165,7 @@ the configuration (without a prefix: ``Auto``).
 
   This will align the assignment operators of consecutive lines. This
   will result in formattings like
+
   .. code-block:: c++
     int aaaa = 12;
     int b    = 23;
@@ -174,6 +176,7 @@ the configuration (without a prefix: ``Auto``).
 
   This will align the declaration names of consecutive lines. This
   will result in formattings like
+
   .. code-block:: c++
     int         aaaa = 12;
     float       b = 23;
@@ -389,11 +392,13 @@ the configuration (without a prefix: ``Auto``).
   instead of as function calls.
 
   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']
 
@@ -415,6 +420,7 @@ the configuration (without a prefix: ``Auto``).
   (http://llvm.org/docs/CodingStandards.html#include-style).
 
   To configure this in the .clang-format file, use:
+
   .. code-block:: c++
     IncludeCategories:
       - Regex:           '^"(llvm|llvm-c|clang|clang-c)/'
index 8d1323e8a1ae0de59da8c5a501b3c6c0d2951778..3c04171044e22104f4596e4139e27f61f5665b75 100755 (executable)
@@ -87,7 +87,7 @@ class EnumValue:
 
 def clean_comment_line(line):
   if line == '/// \\code':
-    return '.. code-block:: c++\n'
+    return '\n.. code-block:: c++\n'
   if line == '/// \\endcode':
     return ''
   return line[4:] + '\n'