Skip to content

Commit 9ac348d

Browse files
authored
Merge pull request #3467 from BsAtHome/fix_pyregex-gen_complist
Fix regex syntax error and don't glob hidden files
2 parents 7058694 + ce2344a commit 9ac348d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/src/gen_complist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
import sys
1111

1212
man1_path = '../docs/man/man1'
13-
man1_files = {f for f in os.listdir(man1_path) if os.path.isfile(os.path.join(man1_path, f))}
13+
man1_files = {f for f in os.listdir(man1_path) if f[0] != '.' and os.path.isfile(os.path.join(man1_path, f))}
1414
man9_path = '../docs/man/man9'
15-
man9_files = {f for f in os.listdir(man9_path) if os.path.isfile(os.path.join(man9_path, f))}
15+
man9_files = {f for f in os.listdir(man9_path) if f[0] != '.' and os.path.isfile(os.path.join(man9_path, f))}
1616
man_files = man1_files.union(man9_files)
1717
complist_doc = set()
1818
miss_in_man = set()
@@ -67,7 +67,7 @@ def generate_links(filename, create_backup=True, add_descr=False):
6767
splitted = line.split('|')
6868

6969
if 'link:' in splitted[1]:
70-
link = re.search('(?<=link:).*(?=\[)', splitted[1]).group()
70+
link = re.search('(?<=link:).*(?=\\[)', splitted[1]).group()
7171
if not os.path.isfile(os.path.join('../docs/html/hal',link)):
7272
print('gen_complist: Broken link:', link)
7373
else:

0 commit comments

Comments
 (0)