diff --git a/scripts/generate_controls_doc.py b/scripts/generate_controls_doc.py index 93f1a29e..0af82803 100644 --- a/scripts/generate_controls_doc.py +++ b/scripts/generate_controls_doc.py @@ -10,7 +10,7 @@ # File Header: def GetHeader(): - return """# How to Use the Intercept Layer for OpenCL Applications + return r"""# How to Use the Intercept Layer for OpenCL Applications This file is automatically generated using the script `generate_controls_doc.py`. Please do not edit it manually! @@ -145,7 +145,7 @@ def GetHeader(): # File Footer: def GetFooter(): - return """ + return r""" --- \* Other names and brands may be claimed as the property of others. @@ -184,7 +184,7 @@ def GetFooter(): numberOfControls = 0 for line in srcFile: - separator = re.search("^CLI_CONTROL_SEPARATOR\((.*)\)$", line) + separator = re.search(r"^CLI_CONTROL_SEPARATOR\((.*)\)$", line) if separator: full = separator.group(1).strip() @@ -198,7 +198,7 @@ def GetFooter(): numberOfSeparators = numberOfSeparators + 1 continue - control = re.search("^CLI_CONTROL\((.*)\)$", line) + control = re.search(r"^CLI_CONTROL\((.*)\)$", line) if control: full = control.group(1).strip() @@ -218,8 +218,8 @@ def GetFooter(): # Replace underscores with escaped underscores: description = description.replace("_", "\\_") # Escape angle brackets: - description = description.replace("<", "\<") - description = description.replace(">", "\>") + description = description.replace("<", r"\<") + description = description.replace(">", r"\>") docFile.write('##### `' + name + '` (' + type + ')\n\n') docFile.write(description + '\n\n')