mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
Ignore comments when creating man page completion
This commit is contained in:
parent
f8fa69f817
commit
d2d707a6fa
1 changed files with 3 additions and 1 deletions
|
@ -528,7 +528,6 @@ class TypeDarwinManParser(ManParser):
|
|||
line = line.replace('.Nm', CMDNAME)
|
||||
line = line.replace('\\ ', ' ')
|
||||
line = line.replace('\& ', '')
|
||||
line = line.replace(r'.\"', '')
|
||||
return line
|
||||
|
||||
def is_option(self, line):
|
||||
|
@ -567,6 +566,9 @@ class TypeDarwinManParser(ManParser):
|
|||
desc_lines = []
|
||||
while lines and not self.is_option(lines[0]):
|
||||
line = lossy_unicode(lines.pop(0).strip())
|
||||
# Ignore comments
|
||||
if line.startswith(r'.\"'):
|
||||
continue
|
||||
if line.startswith('.'):
|
||||
line = self.groff_replace_escapes(line)
|
||||
line = self.trim_groff(line).strip()
|
||||
|
|
Loading…
Reference in a new issue