Skip to content

Commit a5ea672

Browse files
Merge pull request #91 from cpprefjp/comment_syntax_for_global_qualify
GLOBAL_QUALIFY_LISTにコメントを書けるようにした
2 parents d101636 + 1a2ff60 commit a5ea672

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

run.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,12 @@ def main():
563563
sidebar_index = None
564564

565565
with open('{}/GLOBAL_QUALIFY_LIST.txt'.format(settings.INPUT_DIR), encoding='utf-8') as f:
566-
global_qualify_list = '\n'.join([line.strip() for line in f])
566+
ls = []
567+
for line in f:
568+
stripped_line = line.strip()
569+
if stripped_line and not stripped_line.startswith('#'):
570+
ls.append(stripped_line)
571+
global_qualify_list = '\n'.join(ls)
567572

568573
filename = '{}/GLOBAL_DEFINED_WORDS.json'.format(settings.INPUT_DIR)
569574
if os.path.isfile(filename):

0 commit comments

Comments
 (0)