Build a URL from the label, a base, and an end.
(label: str, base: str, end: str)
| 29 | |
| 30 | |
| 31 | def build_url(label: str, base: str, end: str) -> str: |
| 32 | """ Build a URL from the label, a base, and an end. """ |
| 33 | clean_label = re.sub(r'([ ]+_)|(_[ ]+)|([ ]+)', '_', label) |
| 34 | return '{}{}{}'.format(base, clean_label, end) |
| 35 | |
| 36 | |
| 37 | class WikiLinkExtension(Extension): |
nothing calls this directly
no outgoing calls
no test coverage detected