Skip to content

Commit

Permalink
Address syntax warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperCraeghs committed Sep 12, 2024
1 parent fcfb0c8 commit 4fb2a61
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mlx/robot2rst.mako
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ def to_traceable_item(name, prefix=''):
# Move to capitals
name = name.upper()
# Replace ' : ' (or alike) by '-'
name = re.sub('\s*:\s*', '-', name)
name = re.sub(r'\s*:\s*', '-', name)
# Replace '&' by 'AND'
name = name.replace('&', 'AND')
# Remove other special characters
name = re.sub('[^\w\s_-]', '', name)
name = re.sub(r'[^\w\s_-]', '', name)
# Replace spaces with single underscore
name = re.sub('\s+', '_', name)
name = re.sub(r'\s+', '_', name)
return name
Expand Down

0 comments on commit 4fb2a61

Please sign in to comment.