]> granicus.if.org Git - clang/commitdiff
clang-format: Escape '*' in generated flag documentation.
authorDaniel Jasper <djasper@google.com>
Tue, 2 Dec 2014 14:21:16 +0000 (14:21 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 2 Dec 2014 14:21:16 +0000 (14:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223118 91177308-0d34-0410-b5e6-96231b3b80d8

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

index af9181ace0e062faead6daab29fac1897039dd85..ce6fae19c09b3e8d28f539994f067c978cc6c3d6 100644 (file)
@@ -308,7 +308,7 @@ the configuration (without a prefix: ``Auto``).
 
 **DerivePointerAlignment** (``bool``)
   If ``true``, analyze the formatted file for the most common
-  alignment of & and *. ``PointerAlignment`` is then used only as fallback.
+  alignment of & and \*. ``PointerAlignment`` is then used only as fallback.
 
 **DisableFormat** (``bool``)
   Disables formatting at all.
index 66bad8bb4e7e2b8163a0e43fdc5c108028334156..fdf03c6244ce8125fa1e2bd2fa4acbcca26fbbcc 100755 (executable)
@@ -17,6 +17,7 @@ def substitute(text, tag, contents):
   return re.sub(pattern, '%s', text, flags=re.S) % replacement
 
 def doxygen2rst(text):
+  text = re.sub(r'([^/\*])\*', r'\1\\*', text)
   text = re.sub(r'<tt>\s*(.*?)\s*<\/tt>', r'``\1``', text)
   text = re.sub(r'\\c ([^ ,;\.]+)', r'``\1``', text)
   text = re.sub(r'\\\w+ ', '', text)