Re: [PATCH] doc/sphinx: Pass right filename as source

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

 



On Wed, 01 Jun 2016, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote:
> With this error output becomes almost readable. The line numbers are
> still totally bonghits, but that's a lot harder to pull out of
> kerneldoc. We'd essentially have to insert some special markers in the
> kernel-doc output, split the output along these markers and then
> insert each block separately using
>
>      state_machine.insert_input(block, source, first_line)
>
> Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> Cc: linux-doc@xxxxxxxxxxxxxxx
> Cc: Jonathan Corbet <corbet@xxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxxx>

Much better indeed, thanks.

I pushed this along with a python2 vs. python3 fix [1] to my
sphinx-for-docs-next branch of [2].

BR,
Jani.

[1] https://cgit.freedesktop.org/~jani/drm/commit/?h=sphinx-for-docs-next&id=ba35018593547eac69998e2571fc95cf620f2220
[2] git://people.freedesktop.org/~jani/drm


> ---
>  Documentation/sphinx/kernel-doc.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/sphinx/kernel-doc.py b/Documentation/sphinx/kernel-doc.py
> index a6e170872c8a..9fc2c27916a9 100644
> --- a/Documentation/sphinx/kernel-doc.py
> +++ b/Documentation/sphinx/kernel-doc.py
> @@ -57,7 +57,7 @@ class KernelDocDirective(Directive):
>          env.note_dependency(os.path.abspath(filename))
>  
>          tab_width = self.options.get('tab-width', self.state.document.settings.tab_width)
> -        source = self.state_machine.input_lines.source(self.lineno - self.state_machine.input_offset - 1)
> +        source = filename
>  
>          # FIXME: make this nicer and more robust against errors
>          if 'export' in self.options:

-- 
Jani Nikula, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux