mirror of
https://github.com/Kitware/CMake.git
synced 2026-06-24 08:47:59 +00:00
Help: Improve abbreviated command-line option roles
Slightly tweak the helper roles that automatically generate targets for command-line options to also strip values from `--arg <value>` options.
This commit is contained in:
@@ -592,7 +592,7 @@ class CMakeOptionXRefRole(OptionXRefRole):
|
||||
super().__init__()
|
||||
|
||||
def __call__(self, typ, rawtext, text, *args, **kwargs):
|
||||
content = f'{text} <{self.command} {text.split('=')[0]}>'
|
||||
content = f'{text} <{self.command} {re.split(r'[ =]', text)[0]}>'
|
||||
return super().__call__('std:option', text, content, *args, **kwargs)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user