From: Diederik de Haas <didi.debian@cknow.org>
To: Linux Documentation <linux-doc@vger.kernel.org>,
Bagas Sanjaya <bagasdotme@gmail.com>
Subject: Re: checkpatch doc suggestion
Date: Sun, 12 May 2024 17:58:10 +0200 [thread overview]
Message-ID: <2996994.g7u86YH9XO@bagend> (raw)
In-Reply-To: <ZjTe1STECXg2mmmJ@archie.me>
[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]
Hi Bagas,
On Friday, 3 May 2024 14:55:49 CEST Bagas Sanjaya wrote:
> On Tue, Apr 30, 2024 at 12:56:30PM +0200, Diederik de Haas wrote:
> > I think it would be really useful if (f.e.) the following URL
> > https://docs.kernel.org/dev-tools/checkpatch.html#BAD_FIXES_TAG
> >
> > would lead me straight to the BAD_FIXES_TAG explanation.
>
> So to add link to arbitrary location in the docs, you have to explicitly add
> target (anchor) to desired location. Then you can reference it using the
> target's name. For example, to accomplish your suggestion above:
>
> ```
> diff --git a/Documentation/dev-tools/checkpatch.rst
> b/Documentation/dev-tools/checkpatch.rst index
> 12796899584739..002b0aa68b8022 100644
> --- a/Documentation/dev-tools/checkpatch.rst
> +++ b/Documentation/dev-tools/checkpatch.rst
> @@ -612,6 +612,8 @@ Commit message
>
> See:
> https://www.kernel.org/doc/html/latest/process/submitting-patches.html#desc
> ribe-your-changes
>
> +.. _bad_fixes_tag:
> +
> **BAD_FIXES_TAG**
> The Fixes: tag is malformed or does not follow the community
> conventions. This can occur if the tag have been split into multiple lines
> ```
Thanks to your hint and some experimentation, I managed to add id attributes
to the various ``dl`` elements and can directly reference the tags :-)
But I noticed 2 things in the generated HTML documentation:
1) The id attributes are all lowercase, regardless of how I defined them in
``checkpatch.rst``
2) The underscores (``_``) have been replaced with dashes (``-``)
So instead of linking to checkpatch.html#BAD_FIXES_TAG I have to link to
checkpatch.html#bad-fixes-tag. I was hoping that I could get the literal tags
names (including underscores and uppercase letters) as id attribute.
Is something rst/sphinx always does or did I do something wrong?
Cheers,
Diederik
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-05-12 15:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 10:56 checkpatch doc suggestion Diederik de Haas
2024-05-03 12:55 ` Bagas Sanjaya
2024-05-06 13:59 ` Diederik de Haas
2024-05-08 0:16 ` Bagas Sanjaya
2024-05-12 15:58 ` Diederik de Haas [this message]
2024-05-13 5:08 ` Akira Yokosawa
2024-05-13 9:53 ` Diederik de Haas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2996994.g7u86YH9XO@bagend \
--to=didi.debian@cknow.org \
--cc=bagasdotme@gmail.com \
--cc=linux-doc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).