Closed boarnasia closed 7 years ago
Code is fixed with reference to python domain coding. https://github.com/sphinx-doc/sphinx/blob/master/sphinx/domains/javascript.py#L84
Problem happen in case below:
.. php:method:: inputs(array $fields = [], $options = [])
In this case, result should be:
Cake\View\Helper\FormHelper::inputs(array $fields = [], $options = []])
But actually wrong:
Cake\View\Helper\FormHelper::inputs(array $fields = , []$options = []])
Above problem already fixed by this PR.
Unfortunately, this code still has another comma defect. The defect emerges when in case below:
.. php:method:: foo(string $var =",", string $buz = true)
In this case, separating with comma, arguments become 3 of 'string $var="', '"', 'string $buz = true'.
However, last defect is a problem of _pseudo_parse_arglist that should be fixed in python domain, but, I think, it is not a problem of phpdomain.
In addition, it doesn't happen in cake3 doc because of there are no signature with "," default parameter as long as I've checked.
Thank you for reading.
Update has done.
Thanks :+1: I've packaged a new release of this package which should get picked up by CakePHP docs next time they are built.
Code is fixed with reference to python domain coding. https://github.com/sphinx-doc/sphinx/blob/master/sphinx/domains/javascript.py#L84
Problem happen in case below:
In this case, result should be:
But actually wrong:
Above problem already fixed by this PR.
Unfortunately, this code still has another comma defect. The defect emerges when in case below:
In this case, separating with comma, arguments become 3 of 'string $var="', '"', 'string $buz = true'.
However, last defect is a problem of _pseudo_parse_arglist that should be fixed in python domain, but, I think, it is not a problem of phpdomain.
In addition, it doesn't happen in cake3 doc because of there are no signature with "," default parameter as long as I've checked.
Thank you for reading.