From f35a9e37551bfcf5967cbd43f546966f4ecfc176 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Thu, 12 Oct 2023 22:05:08 +0200 Subject: [PATCH] Generate links in man page Some [foo](bar) links were added to manual.yml without updating build_manpage.py to make it generate roff for "a" tags. Fixes #2930 --- docs/build_manpage.py | 5 ++++- jq.1.prebuilt | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/build_manpage.py b/docs/build_manpage.py index 4f227b2369..78fa8c24f2 100755 --- a/docs/build_manpage.py +++ b/docs/build_manpage.py @@ -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] diff --git a/jq.1.prebuilt b/jq.1.prebuilt index dbdf52b7a2..cd99e45297 100644 --- a/jq.1.prebuilt +++ b/jq.1.prebuilt @@ -2738,10 +2738,12 @@ jq \'[\.[] | tonumber?]\' .IP "" 0 . .SH "REGULAR EXPRESSIONS" -jq uses the +jq uses the Oniguruma regular expression library, as do PHP, TextMate, Sublime Text, etc, so the description here will focus on jq specifics\. + . .P -Oniguruma supports several flavors of regular expression, so it is important to know that jq uses the +Oniguruma supports several flavors of regular expression, so it is important to know that jq uses the "Perl NG" (Perl with named groups) flavor\. + . .P The jq regex filters are defined so that they can be used using one of these patterns: