Re: Best practice for embedded code samles? [Was: drm/drv: Use // for comments in example code]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Aug 2019, Jonathan Corbet <corbet@xxxxxxx> wrote:
> On Sun, 11 Aug 2019 23:32:15 +0200
> Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
>
>> I wonder if there is a better way to embed a code sample
>> than reverting to // style comments.
>> 
>> As the kernel do not like // comments we should try to avoid them in
>> examples.
>
> If you're embedding a code sample *into a code comment* then I suspect
> this is about as good as it gets.  The alternative is to put it in as a
> plain literal text block.  That would lose the syntax highlighting; I
> think that's an entirely bearable cost, but others seem to feel
> differently about it.

Not really a Sphinx limitation, is it? You can't embed a /* */ block
comment within a /* */ block comment anyway, Sphinx or not.

BR,
Jani.

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux