From 6c5946160b581ae8521ceec1f6446e842a845716 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Tue, 2 Dec 2014 14:21:16 +0000 Subject: [PATCH] clang-format: Escape '*' in generated flag documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223118 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/ClangFormatStyleOptions.rst | 2 +- docs/tools/dump_format_style.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/ClangFormatStyleOptions.rst b/docs/ClangFormatStyleOptions.rst index af9181ace0..ce6fae19c0 100644 --- a/docs/ClangFormatStyleOptions.rst +++ b/docs/ClangFormatStyleOptions.rst @@ -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. diff --git a/docs/tools/dump_format_style.py b/docs/tools/dump_format_style.py index 66bad8bb4e..fdf03c6244 100755 --- a/docs/tools/dump_format_style.py +++ b/docs/tools/dump_format_style.py @@ -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'\s*(.*?)\s*<\/tt>', r'``\1``', text) text = re.sub(r'\\c ([^ ,;\.]+)', r'``\1``', text) text = re.sub(r'\\\w+ ', '', text) -- 2.40.0