[Issue 9731] New: Ddoc should output per-paragraph macro instead of $(DDOC_BLANKLINE)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Mar 15 10:20:39 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9731

           Summary: Ddoc should output per-paragraph macro instead of
                    $(DDOC_BLANKLINE)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: hsteoh at quickfur.ath.cx


--- Comment #0 from hsteoh at quickfur.ath.cx 2013-03-15 10:20:38 PDT ---
Currently, ddoc does not have a direct way of identifying paragraphs in ddoc
comments. The only thing support right now is $(DDOC_BLANKLINE), which defaults
to <br><br>. This (more-or-less) works for HTML output, but it doesn't work so
well for more semantically-driven output formats that want to know paragraph
boundaries explicitly.

There is a way to hack this to work in HTML by defining DDOC_BLANKLINE=</p><p>
and DDOC_SECTION=<p>$0</p>, but this doesn't work if you define
DDOC_SECTION_H=<h4>$0</h4>, because then the h4 is nested inside the p, which
is non-compliant.

Basically, there is no way to correctly support correct element nesting in HTML
(or other strictly-nested formats like DocBook) without post-processing (e.g.,
set DDOC_BLANKLINE to some marker string that gets substituted by an external
tool with suitable open/close tags depending on the surrounding context).

It would be nice if ddoc could output macros based on paragraph boundaries
rather than linebreaks, say $(DDOC_PARAGRAPH) or something similar, so that
translation into other formats than HTML 4.x is easier.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list