diff options
author | Jonathan Corbet <corbet@lwn.net> | 2016-08-24 18:31:15 -0400 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-09-06 10:02:49 -0400 |
commit | 5219f18aaf00f9f9ba572b3817e394043388d4ef (patch) | |
tree | fda434e9d383647a736658cfa0fa13fcdbe3573c | |
parent | ef00028b20481647431ca8bffe5469fb86cf154f (diff) |
docs: Special-case function-pointer parameters in kernel-doc
Add yet another regex to kernel-doc to trap @param() references separately
and not produce corrupt RST markup.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rwxr-xr-x | scripts/kernel-doc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index c5918951a8d3..93721f3c91bf 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -212,6 +212,7 @@ my $anon_struct_union = 0; | |||
212 | my $type_constant = '\%([-_\w]+)'; | 212 | my $type_constant = '\%([-_\w]+)'; |
213 | my $type_func = '(\w+)\(\)'; | 213 | my $type_func = '(\w+)\(\)'; |
214 | my $type_param = '\@(\w+)'; | 214 | my $type_param = '\@(\w+)'; |
215 | my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params | ||
215 | my $type_struct = '\&((struct\s*)*[_\w]+)'; | 216 | my $type_struct = '\&((struct\s*)*[_\w]+)'; |
216 | my $type_struct_xml = '\\&((struct\s*)*[_\w]+)'; | 217 | my $type_struct_xml = '\\&((struct\s*)*[_\w]+)'; |
217 | my $type_env = '(\$\w+)'; | 218 | my $type_env = '(\$\w+)'; |
@@ -292,6 +293,7 @@ my @highlights_rst = ( | |||
292 | # Note: need to escape () to avoid func matching later | 293 | # Note: need to escape () to avoid func matching later |
293 | [$type_member_func, "\\:c\\:type\\:`\$1\$2\\\\(\\\\) <\$1>`"], | 294 | [$type_member_func, "\\:c\\:type\\:`\$1\$2\\\\(\\\\) <\$1>`"], |
294 | [$type_member, "\\:c\\:type\\:`\$1\$2 <\$1>`"], | 295 | [$type_member, "\\:c\\:type\\:`\$1\$2 <\$1>`"], |
296 | [$type_fp_param, "**\$1\\\\(\\\\)**"], | ||
295 | [$type_func, "\\:c\\:func\\:`\$1()`"], | 297 | [$type_func, "\\:c\\:func\\:`\$1()`"], |
296 | [$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"], | 298 | [$type_struct_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"], |
297 | [$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"], | 299 | [$type_enum_full, "\\:c\\:type\\:`\$1 \$2 <\$2>`"], |