Skip to content

Commit 9ec518a

Browse files
Copilotswissspidy
andcommitted
Handle multiline descriptions for @return and other tags
Extended the fix to handle multiline descriptions for all docblock tags (@return, @throws, etc.), not just @param. Removed the 'param' === $param_name check so any tag with a description can span multiple lines. Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
1 parent 4f9bc64 commit 9ec518a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/Handbook_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@ private static function parse_docblock( $docblock ) {
812812
end( $ret['parameters'][ $param_name ] );
813813
$key = key( $ret['parameters'][ $param_name ] );
814814
reset( $ret['parameters'][ $param_name ] );
815-
// Always set $in_param for @param tags to capture multiline descriptions
816-
if ( 'param' === $param_name && ! empty( $ret['parameters'][ $param_name ][ $key ][2] ) ) {
815+
// Always set $in_param for tags that can have multiline descriptions
816+
if ( ! empty( $ret['parameters'][ $param_name ][ $key ][2] ) ) {
817817
$in_param = [ $param_name, $key ];
818818
} else {
819819
$in_param = false;

0 commit comments

Comments
 (0)