diff --git a/scripts/kernel-doc b/scripts/kernel-doc index d5e9f765b4fc..4c9ada36fe6b 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -214,15 +214,19 @@ my $type_constant = '\%([-_\w]+)'; my $type_func = '(\w+)\(\)'; my $type_param = '\@(\w+(\.\.\.)?)'; my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params -my $type_struct = '\&((struct\s*)*[_\w]+)'; -my $type_struct_xml = '\\&((struct\s*)*[_\w]+)'; my $type_env = '(\$\w+)'; -my $type_enum_full = '\&(enum)\s*([_\w]+)'; -my $type_struct_full = '\&(struct)\s*([_\w]+)'; -my $type_typedef_full = '\&(typedef)\s*([_\w]+)'; -my $type_union_full = '\&(union)\s*([_\w]+)'; +my $type_enum = '\&(enum\s*([_\w]+))'; +my $type_struct = '\&(struct\s*([_\w]+))'; +my $type_typedef = '\&(typedef\s*([_\w]+))'; +my $type_union = '\&(union\s*([_\w]+))'; my $type_member = '\&([_\w]+)(\.|->)([_\w]+)'; +my $type_fallback = '\&([_\w]+)'; +my $type_enum_xml = '\&(enum\s*([_\w]+))'; +my $type_struct_xml = '\&(struct\s*([_\w]+))'; +my $type_typedef_xml = '\&(typedef\s*([_\w]+))'; +my $type_union_xml = '\&(union\s*([_\w]+))'; my $type_member_xml = '\&([_\w]+)(\.|-\>)([_\w]+)'; +my $type_fallback_xml = '\&([_\w]+)'; my $type_member_func = $type_member . '\(\)'; # Output conversion substitutions. @@ -232,10 +236,14 @@ my $type_member_func = $type_member . '\(\)'; my @highlights_html = ( [$type_constant, "\$1"], [$type_func, "\$1"], + [$type_enum_xml, "\$1"], [$type_struct_xml, "\$1"], + [$type_typedef_xml, "\$1"], + [$type_union_xml, "\$1"], [$type_env, "\$1"], [$type_param, "\$1"], - [$type_member_xml, "\$1\$2\$3"] + [$type_member_xml, "\$1\$2\$3"], + [$type_fallback_xml, "\$1"] ); my $local_lt = "\\\\\\\\lt:"; my $local_gt = "\\\\\\\\gt:"; @@ -245,10 +253,14 @@ my $blankline_html = $local_lt . "p" . $local_gt; # was "
"
my @highlights_html5 = (
[$type_constant, "\$1"],
[$type_func, "\$1"],
+ [$type_enum_xml, "\$1"],
[$type_struct_xml, "\$1"],
+ [$type_typedef_xml, "\$1"],
+ [$type_union_xml, "\$1"],
[$type_env, "\$1"],
[$type_param, "\$1]"],
- [$type_member_xml, "\$1\$2\$3"]
+ [$type_member_xml, "\$1\$2\$3"],
+ [$type_fallback_xml, "\$1"]
);
my $blankline_html5 = $local_lt . "br /" . $local_gt;
@@ -256,11 +268,15 @@ my $blankline_html5 = $local_lt . "br /" . $local_gt;
my @highlights_xml = (
["([^=])\\\"([^\\\"<]+)\\\"", "\$1\$2
"],
[$type_constant, "