mirror of https://github.com/ansible/ansible.git
[2.14] ansible-doc: fix broken seealso links in text output (#80285)
* ansible-doc: fix broken seealso links in text output (#80280) * Fix broken URLs. * Also remove auto-generated description for modules outside ansible.builtin. (cherry picked from commitpull/80361/headfafb23094e
) * Fix URL processing. (#80295) (cherry picked from commit086ae42209
)
parent
17ca4169da
commit
08297ce0db
@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- "ansible-doc - stop generating wrong module URLs for module see-alsos. The URLs for modules in ansible.builtin do now work, and URLs for modules outside ansible.builtin are no longer added (https://github.com/ansible/ansible/pull/80280)."
|
@ -0,0 +1,15 @@
|
||||
"""Unwrap URLs to docs.ansible.com and remove version"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
data = sys.stdin.read()
|
||||
data = re.sub('(https://docs\\.ansible\\.com/[^ ]+)\n +([^ ]+)\n', '\\1\\2\n', data, flags=re.MULTILINE)
|
||||
data = re.sub('https://docs\\.ansible\\.com/ansible(|-core)/(?:[^/]+)/', 'https://docs.ansible.com/ansible\\1/devel/', data)
|
||||
sys.stdout.write(data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
Loading…
Reference in New Issue