Skip to content

Commit 04adb1d

Browse files
fix: fixed bug in manpage.py
1 parent aaf4cdc commit 04adb1d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

explainshell/manpage.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def _parse_synopsis(base, synopsis):
174174
synopsis = synopsis[len(base) + 3: -1]
175175
if synopsis[-1] == ".":
176176
synopsis = synopsis[:-1]
177+
178+
if not SPLIT_SYNOP.match(synopsis):
179+
return []
180+
177181
return SPLIT_SYNOP.match(synopsis).groups()
178182

179183

0 commit comments

Comments
 (0)