mirror of
https://github.com/openSUSE/osc.git
synced 2025-08-05 07:03:38 +02:00
Better escaping regexps.
This commit is contained in:
12
osc/cmdln.py
12
osc/cmdln.py
@@ -118,12 +118,12 @@ def alias(*aliases):
|
||||
return decorate
|
||||
|
||||
MAN_REPLACES = [
|
||||
(re.compile(r'(^|[ \t])--([^/ \t-]*)-([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\-\2\-\3\-\4\5'),
|
||||
(re.compile(r'(^|[ \t])-([^/ \t-]*)-([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\2\-\3\-\4\5'),
|
||||
(re.compile(r'(^|[ \t])--([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\-\2\-\3\4'),
|
||||
(re.compile(r'(^|[ \t])-([^/ \t-]*)-([^/ \t-]*)($|[ \t=])'), r'\1\-\2\-\3\4'),
|
||||
(re.compile(r'(^|[ \t])--([^/ \t-]*)($|[ \t=])'), r'\1\-\-\2\3'),
|
||||
(re.compile(r'(^|[ \t])-([^/ \t-]*)($|[ \t=])'), r'\1\-\2\3'),
|
||||
(re.compile(r'(^|[ \t\[\'])--([^/ \t-]*)-([^/ \t-]*)-([^/ \t-]*)($|[ \t=\]\'])'), r'\1\-\-\2\-\3\-\4\5'),
|
||||
(re.compile(r'(^|[ \t\[\'])-([^/ \t-]*)-([^/ \t-]*)-([^/ \t-]*)($|[ \t=\]\'])'), r'\1\-\2\-\3\-\4\5'),
|
||||
(re.compile(r'(^|[ \t\[\'])--([^/ \t-]*)-([^/ \t-]*)($|[ \t=\]\'])'), r'\1\-\-\2\-\3\4'),
|
||||
(re.compile(r'(^|[ \t\[\'])-([^/ \t-]*)-([^/ \t-]*)($|[ \t=\]\'])'), r'\1\-\2\-\3\4'),
|
||||
(re.compile(r'(^|[ \t\[\'])--([^/ \t-]*)($|[ \t=\]\'])'), r'\1\-\-\2\3'),
|
||||
(re.compile(r'(^|[ \t\[\'])-([^/ \t-]*)($|[ \t=\]\'])'), r'\1\-\2\3'),
|
||||
]
|
||||
|
||||
def man_escape(text):
|
||||
|
Reference in New Issue
Block a user