Skip to content
Snippets Groups Projects
Commit 0735f068 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Merge branch 'resolve-so-gz' into 'master'

Resolve .so links with .gz suffix

See merge request !30
parents 9f9ba6e5 1b57c4c4
No related branches found
No related tags found
1 merge request!30Resolve .so links with .gz suffix
......@@ -167,6 +167,8 @@ class ManPage(models.Model):
# eliminate the '.so' macro
if re.fullmatch(r"^\.so [A-Za-z0-9@._+\-:\[\]\/]+\s*$", stripped):
path = stripped.split()[1]
if path.endswith('.gz'):
path = path[:-3]
pp = PurePath(path)
target_name = pp.stem
target_section = pp.suffix[1:] # strip the dot
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment