Skip to content

Commit

Permalink
Generate links in man page
Browse files Browse the repository at this point in the history
Some [foo](bar) links were added to manual.yml without updating
build_manpage.py to make it generate roff for "a" tags.

Fixes #2930
  • Loading branch information
emanuele6 committed Oct 12, 2023
1 parent c10cbbf commit f35a9e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion docs/build_manpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@ def _walk(self, root, parent_tag=None):
text = ''.join(root.itertext()).strip()
self.__write_cmd('.SS "{}"'.format(self._h3_sanitize(text)))

elif root.tag == 'p':
elif root.tag in 'p':
if last_tag not in ['h2', 'h3'] and parent_tag not in ['li']:
self.__write_cmd('.P')
self._write_element(root, ensure_newline=(parent_tag != 'li'))

elif root.tag in 'a':
self._write_element(root, ensure_newline=(parent_tag != 'li'))

elif root.tag == 'ul':
if self._ul_is_special(root):
li = root[0]
Expand Down
6 changes: 4 additions & 2 deletions jq.1.prebuilt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f35a9e3

Please sign in to comment.