(s: re.Match)
| 115 | references to any found options.""" |
| 116 | |
| 117 | def _add_backquotes(s: re.Match) -> str: |
| 118 | to_add: str = s.string[s.start() : s.end()] |
| 119 | flag = re.search(r"-+[\w-]+[^\.\=\s\/]*", to_add) |
| 120 | if flag is not None and flag.string[flag.start() : flag.end()] in refs: |
| 121 | # add cross reference |
| 122 | cross_ref = flag.string[flag.start() : flag.end()] |
| 123 | option = s.string[s.start() : s.end()] |
| 124 | return f":option:`{option} <{cross_ref}>`" |
| 125 | else: |
| 126 | return add_backquotes(s) |
| 127 | |
| 128 | return _add_backquotes |
| 129 |
nothing calls this directly
no test coverage detected