Re: [PATCH 1/3] doc: introduce a synopsis custom paragraph attribute
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 23, 2024, 23:36 UTC
- Message-ID
- <xmqqo76nznnv.fsf@gitster.g>
- In-Reply-To
- <704f0333ef17c0e3596ba7ef7976ba6584345eff.1721774680.git.gitgitgadget@gmail.com>
"Jean-Noël Avila via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 6 quoted lines
> +ifdef::backend-docbook[] > +ifdef::doctype-manpage[] > +[paradef-default] > +#synopsis-style=template="verseparagraph",filter="sed -E 's!<[a-z-]+>!<emphasis>\\0</emphasis>!g' -E 's!([a-z-]+)!<literal>\\1</literal>!g'" > +synopsis-style=template="verseparagraph",filter="perl -pe 's!([\[\] |()>]|^)([=+a-zA-Z0-9-:+=]+)!\\1<literal>\\2</literal>!g;s!(<\\;[a-zA-Z0-9-.]+>\\;)!<emphasis>\\1</emphasis>!g'" > +#synopsis-style=template="verseparagraph"
This has three candidate definitions, but two are commented out?
Show 7 quoted lines
> +endif::doctype-manpage[] > +endif::backend-docbook[] > + > +ifdef::backend-xhtml11[] > +[paradef-default] > +synopsis-style=template="verseparagraph",filter="perl -pe 's!([\[\] |()>]|^)([+a-zA-Z0-9-:+=]+)!\\1<code>\\2</code>!g;s!(<\\;[a-zA-z0-9-.]+>\\;)!<em>\\1</em>!g'" > +endif::backend-xhtml11[]
With this update, do we now assume that anybody who want to format the documentation from source must have a minimally working Perl on their $PATH? It probably is an OK requirement to have.