On 5/19/15 11:57 AM, Vladimir Panteleev wrote:
On Tuesday, 19 May 2015 at 16:14:29 UTC, Andrei Alexandrescu wrote:
At least for the ddoc-based documentation, I think this is a CSS-only
matter. Any takers?

 From a quick look, I think this will require changes in DMD Ddoc
generation (to distinguish enums from other nested constructs), site
.ddoc changes (to take advantage of the compiler changes and emit HTML
tables instead of lists), and possibly CSS.

I wonder whether a style can change an otherwise non-table tag to a table-like behavior. Here's the verbatim fragment generated for OpenRight (no broken lines at http://pasted.co/17dbcc83):

====
$(DDOC_DECL
  $(DDOC_ANCHOR OpenRight)enum $(DDOC_PSYMBOL OpenRight): int;
)
$(DDOC_DECL_DD
  $(DDOC_SECTIONS
$(DDOC_SUMMARY Interval option specifier for $(D until) (below) and others.)
  )
  $(DDOC_ENUM_MEMBERS
    $(DDOC_DECL $(DDOC_ANCHOR OpenRight.no)$(DDOC_PSYMBOL no))
    $(DDOC_DECL_DD
      $(DDOC_SECTIONS
$(DDOC_SUMMARY Interval is closed to the right (last element included))
      )
    )
    $(DDOC_DECL $(DDOC_ANCHOR OpenRight.yes)$(DDOC_PSYMBOL yes))
    $(DDOC_DECL_DD
      $(DDOC_SECTIONS
$(DDOC_SUMMARY Interval is open to the right (last element is not included))
      )
    )
  )
)
====

The challenge is defining DDOC_ENUM_MEMBERS (which right now is the same as DDOC_MEMBERS in such a way that achieves the better formatting.


Andrei

Reply via email to