www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12594] New: Follow anchor naming standards in generated html


          Issue ID: 12594
           Summary: Follow anchor naming standards in generated html when
                    parsing templates.
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: dev nomad.so

Created attachment 1346
  --> https://issues.dlang.org/attachment.cgi?id=1346&action=edit
Generated html from standard class and template class.

When generating html using ddoc from standard classes or structs etc. the
anchors referring to methods inside the html look like this:

<a name="Foo.bar"></a>

Where Foo is the class and bar is the method. So anchor names reflect the
hierarchy of the nested elements. Another example is if you have nested static
structs the generated anchors look like this:

<a name="CommandArgs.Event.button"></a>

Where CommandArgs is the outer struct, Event is a nested static struct and
button is an element of Event. With anchors named like this, creating indexes
from generated ddoc html is a breeze.

The problem is that when an element is a template of some sort this standard is
not followed. For example, if the above class example was generated from a
templated class the anchor for the bar method would look like this instead:

<a name="bar"></a>

Which is missing the parent. See the attachment.

This enhancement is to request all anchors in all generated html follow the
same standard of including the nesting information in the name of the anchors.

Apr 18 2014