From 964ab956e046d446a9e087de70d914d7a583d1de Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Fri, 10 Jul 2020 16:30:44 +0200 Subject: [PATCH] Fix DeprecationWarning about 'invalid escape sequence' in tools/docs Python scripts (#2281) --- docs/conf.py | 2 +- tools/mkdoc.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 585987ec6..663a816d5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -238,7 +238,7 @@ latex_elements = { #'pointsize': '10pt', # Additional stuff for the LaTeX preamble. -'preamble': '\DeclareUnicodeCharacter{00A0}{}', +'preamble': r'\DeclareUnicodeCharacter{00A0}{}', # Latex figure (float) alignment #'figure_align': 'htbp', diff --git a/tools/mkdoc.py b/tools/mkdoc.py index c85e09d4d..cd982e070 100755 --- a/tools/mkdoc.py +++ b/tools/mkdoc.py @@ -106,8 +106,8 @@ def process_comment(comment): result = result2 # Doxygen tags - cpp_group = '([\w:]+)' - param_group = '([\[\w:\]]+)' + cpp_group = r'([\w:]+)' + param_group = r'([\[\w:\]]+)' s = result s = re.sub(r'\\c\s+%s' % cpp_group, r'``\1``', s)