From: Michalis K. <ka...@us...> - 2018-12-31 16:03:40
|
The `@link` should lead to `@link(TRecord2.a)`, not `@link(Two.a)`. In order to link to `TRecord2.a` but show it as `Two.a`, you can write `@link(TRecord2.a Two.a)`, see https://github.com/pasdoc/pasdoc/wiki/LinkTag . That said, indeed it isn't working with the nested record as it should. I'm attaching a testcase I made, based on your code, and indeed it uncovers two situations that don't work as they should. The problem is most likely in PasDoc's `TPasItem.FindNameWithinUnit` method -- it's way too simple :), it was never updated to understand nested structure types. I'll look into this when I'll find a bit time, that's probably next year :) Thanks for the report! Attachments: - [testunit.pas](https://sourceforge.net/p/pasdoc/feature-requests/_discuss/thread/1852b8931a/40d0/attachment/testunit.pas) (1.0 kB; text/x-pascal) --- ** [feature-requests:#60] Follow nested record types** **Status:** open **Group:** **Created:** Mon Dec 31, 2018 07:01 AM UTC by Colin Haywood **Last Updated:** Mon Dec 31, 2018 07:01 AM UTC **Owner:** nobody Easiest explained with an example: ~~~ // Record Two. TRecord2 = record // An exciting value. a: integer; end; // Record One. TRecord1 = record // The record2. Two: TRecord2; // Must be @true if @link(Two.a) is bigger than @code(10). x: boolean; end; ~~~ The pasdoc parser complains that it can't understand the link "Two.a": `Warning[1]: Could not resolve link "Two.a" (from description of "pasdocrecordtest.TRecord1.x")` It seems pasdoc can only identify fields of top-level records by name, not fields of nested records. This is a shame, as it means you have to refer to nested fields by their parent types, which is much less clear for the end-user. Hopefully it would not be too hard to add the ability to follow chains of nested records by their field names. --- Sent from sourceforge.net because pas...@li... is subscribed to https://sourceforge.net/p/pasdoc/feature-requests/ To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pasdoc/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list. |