Bug 7468 – Ddoc does not output DOCTYPE declaration

Status
RESOLVED
Resolution
WONTFIX
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-08T15:55:16Z
Last change time
2021-03-19T23:59:32Z
Keywords
bootcamp, ddoc
Assigned to
No Owner
Creator
SyntaxColoring

Attachments

IDFilenameSummaryContent-TypeSize
1073Ddoc.patchPatch to add DOCTYPE declaration.text/plain848

Comments

Comment #0 by SyntaxColoring — 2012-02-08T15:55:16Z
Ddoc outputs seemingly valid HTML, except it does not include a DOCTYPE declaration. It should output something like the following at the beginning of every generated file: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
Comment #1 by smjg — 2012-02-12T10:52:01Z
The default DDoc macros are a hornet's nest of presentational markup that ought to be logical. I ended up using a custom ddoc file that redefines a lot.
Comment #2 by SyntaxColoring — 2012-02-12T12:00:54Z
Created attachment 1073 Patch to add DOCTYPE declaration. I've attached a patch to add a transitional DOCTYPE declaration. The default Ddoc output format is still rather messy, but at least now it's valid HTML.
Comment #3 by wolframw — 2021-03-19T23:59:32Z
DOCTYPE is now expected to be in the Ddoc macro definition file and was added to the default macro file by https://github.com/dlang/dmd/pull/6173.