All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Anna-Maria Behnsen <anna-maria@linutronix.de>, linux-doc@vger.kernel.org
Subject: Re: Help required - kernel-doc, code block and backslash
Date: Mon, 15 Jan 2024 12:38:38 -0700	[thread overview]
Message-ID: <87ttnee69t.fsf@meer.lwn.net> (raw)
In-Reply-To: <87y1cqbg01.fsf@somnus>

Anna-Maria Behnsen <anna-maria@linutronix.de> writes:

> Hi,
>
> I'll try to integrate some documentation which is already written in
> code comments into the kernel documentation.
>
> There I face the problem with a backslash at the end of a line in a
> 'code block' and this ends up in removing the newline.

Yes, kernel-doc does that...looking at the history, that behavior was
added in 2012 (commit 65478428443) because otherwise multi-line macros
are not handled properly.

Fixing this properly is not going to be all that easy; the code reading
the source file is well before any sort of parsing, so it has no idea of
whether it's in a comment or not.

A really ugly workaround... put something relatively inconspicuous, like
"     .", after the backslash, and at least your formatting won't be
mangled.

> Another question: Is there an linux-doc irc channel to ask simple
> questions?

I don't really do IRC, just don't have the spare attention span for it.
Feel free to email me anytime though.

jon

  reply	other threads:[~2024-01-15 19:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 18:36 Help required - kernel-doc, code block and backslash Anna-Maria Behnsen
2024-01-15 19:38 ` Jonathan Corbet [this message]
2024-01-15 20:16   ` Matthew Wilcox
2024-01-16  9:53     ` Anna-Maria Behnsen
2024-01-15 20:35   ` Vegard Nossum
2024-01-16 16:55   ` Anna-Maria Behnsen
2024-01-16 18:28     ` Jonathan Corbet
2024-01-17 11:19       ` Anna-Maria Behnsen
2024-01-17 15:22         ` Jonathan Corbet

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=87ttnee69t.fsf@meer.lwn.net \
    --to=corbet@lwn.net \
    --cc=anna-maria@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.