(match, module)
| 507 | # This is more complex than a static regular expression allows. |
| 508 | |
| 509 | def rewriteResourceID(match, module): |
| 510 | anchor = match.group(1) |
| 511 | text = match.group(2) |
| 512 | |
| 513 | return f'xref:{module}{pagename}#{anchor}[{text}]' |
| 514 | |
| 515 | specLinkSubstitute = lambda match: rewriteResourceID(match, remapState.module) |
| 516 | else: |