Den 23-08-2011 22:26, Jonathan M Davis skrev:
On Tuesday, August 23, 2011 12:50 Adam D. Ruppe wrote:
Jonathan M Davis wrote:
DDoc does not understand scoping at all.

Actually, DDoc understands scoping very well, and even outputs
the data with appropriate nesting in HTML!

The problem is that the<a name="">  anchors discard that
information for whatever reason.

I'm not sure if it's just another crappy macro in the std.ddoc or
if it's that the full name isn't made available by ddoc, but either
way, the HTML actually does show scopes properly. A post-processor
can create proper anchors from just that existing structure!

You're right. Aside from the anchors, ddoc deals with the scoping properly,
but as far as the anchors go, ddoc doesn't deal with the scoping property at
all. I'm fairly certain that the anchors are generated by ddoc, not std.ddoc
(it generates the links at the top of the page using the anchors, but as far
as I can tell, the anchors exist before std.ddoc does it's thing). So, unless
ddoc itself is fixed, the only way to get proper anchors is to process the
files after ddoc has done its thing, which really isn't acceptable. It needs
to be fixed. The problem is that we need someone who knows enough about ddoc
to be able to fix it to take the time to fix it - either that or someone needs
to learn. I've been tempted to dig in and do it so that std.datetime's links
can be made sane, but the task seems daunting enough that I haven't really
looked into it yet. I may have to though if no one else steps up, since
std.datetime's links really need to be improved.

- Jonathan M Davis

For now I've worked around it by introducing a new DDOC_ANCHOR in std.ddoc that I hope will get accepted. This makes it possible for me to reference my inner struct/classes.

/Jonas

Reply via email to