Re: Automatic linking of constants
| From: | Christoph Becker | Date: | Tue, 16 Jun 2015 14:10:48 +0000 |
| Subject: | Re: Automatic linking of constants | ||
| References: | 1 2 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969385772@lists.php.net to get a copy of this message | ||
Hannes Magnusson wrote:
> On Mon, Jun 15, 2015 at 11:25 AM, Christoph Becker <cmbecker69@gmx.de> wrote:
>>
>> I have quickly fixed doc bug #60971 by manually adding <link>s to the
>> constant IDs. I wonder if it would be possible to let PHD do this work
>> for <constant>, similar to how it's done for <function>.
>>
>> I would appreciate any hints where to look to add this feature in the
>> sources, about potential pitfalls, and what generally might have to be
>> taken into account.
>
> We index all <refname>s (function names) in the indexing stage.
> Then precompile the function map into a object property for easy
> lookup of functionname=>xml:id-chunk
>
> I don't think we currently index the constants as we don't have a very
> defined markup for constants.
> I imagine we could infer that a variablelist on chunk with the xml:id
> containing "constant" could maybe work...
> But that isn't really guaranteed, and may not pickup all or even
> pickup wrong things...
Thanks, Hannes, for the hints. I'll try to have a closer look at it.
--
Christoph M. Becker