Fix DeprecationWarning about 'invalid escape sequence' in tools/docs Python scripts (#2281)

This commit is contained in:
Yannick Jadoul 2020-07-10 16:30:44 +02:00 committed by GitHub
parent f980d76d38
commit 964ab956e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ latex_elements = {
#'pointsize': '10pt', #'pointsize': '10pt',
# Additional stuff for the LaTeX preamble. # Additional stuff for the LaTeX preamble.
'preamble': '\DeclareUnicodeCharacter{00A0}{}', 'preamble': r'\DeclareUnicodeCharacter{00A0}{}',
# Latex figure (float) alignment # Latex figure (float) alignment
#'figure_align': 'htbp', #'figure_align': 'htbp',

View File

@ -106,8 +106,8 @@ def process_comment(comment):
result = result2 result = result2
# Doxygen tags # Doxygen tags
cpp_group = '([\w:]+)' cpp_group = r'([\w:]+)'
param_group = '([\[\w:\]]+)' param_group = r'([\[\w:\]]+)'
s = result s = result
s = re.sub(r'\\c\s+%s' % cpp_group, r'``\1``', s) s = re.sub(r'\\c\s+%s' % cpp_group, r'``\1``', s)