Re: [PATCH] scripts/kernel-doc: added support for html5

From: Randy Dunlap
Date: Wed Jul 25 2012 - 14:15:42 EST


On 07/25/2012 06:38 AM, Dan Luedtke wrote:

> New output option html5 writes validating HTML5 and adds

> CSS classes ready to be selected by third-party stylesheets.
>
> Signed-off-by: Dan Luedtke <mail@xxxxxxxx>
> ---
> scripts/kernel-doc | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 249 insertions(+), 6 deletions(-)
>
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 9b0c0b8..f85b278 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -182,6 +189,14 @@ my $local_lt = "\\\\\\\\lt:";
> my $local_gt = "\\\\\\\\gt:";
> my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>"
>
> +# modern html


Just say "html5" or "html version 5".
A few years from now it won't be modern.

> +my %highlights_html5 = ( $type_constant, "<span class=\"const\">\$1</span>",
> + $type_func, "<span class=\"func\">\$1</span>",
> + $type_struct_xml, "<span class=\"struct\">\$1</span>",
> + $type_env, "<span class=\"env\">\$1</span>",
> + $type_param, "<span class=\"param\">\$1</span>" );
> +my $blankline_html5 = $local_lt . "br /" . $local_gt;
> +
> # XML, docbook format
> my %highlights_xml = ( "([^=])\\\"([^\\\"<]+)\\\"", "\$1<quote>\$2</quote>",
> $type_constant, "<constant>\$1</constant>",



Have you tested typedef, enum, DOC:, etc.?
The example web page that you posted does not use that AFAICT.


Otherwise it looks OK to me.

Thanks,
--
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/