D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 11463 - DDoc html to show the normal escaped ASCII chars
Summary: DDoc html to show the normal escaped ASCII chars
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 enhancement
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2013-11-07 02:40 UTC by bearophile_hugs
Modified: 2022-03-28 03:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2013-11-07 02:40:10 UTC
This is a minor priority enhancement request.

This is a small program:


///
void foo(char c = '\n') {}
///
void bar(char c = '\r') {}
void main() {}



If I compile it with -D it generates an HTML file that contains:

...
<dl><dt><big><a name="foo"></a>void <u>foo</u>(char <i>c</i> = '\x0a');
</big></dt>
<dd><br><br>
</dd>
<dt><big><a name="bar"></a>void <u>bar</u>(char <i>c</i> = '\x0d');
...


I suggest to show '\n' and '\r' there, to make the documentation more similar to the original code and a little more readable.

For an example of it see the online HTML documentation of std.stdio.byLine:

auto byLine(Terminator = char, Char = char)(KeepTerminator keepTerminator = KeepTerminator.no, Terminator terminator = '\x0a') if (isScalarType!Terminator);
Comment 1 Dlang Bot 2022-03-24 13:02:15 UTC
@dkorpel created dlang/dmd pull request #13883 "Fix Issue 11463 - DDoc html to show the normal escaped ASCII chars" fixing this issue:

- Fix Issue 11463 - DDoc html to show the normal escaped ASCII chars

https://github.com/dlang/dmd/pull/13883
Comment 2 Dlang Bot 2022-03-28 03:57:48 UTC
dlang/dmd pull request #13883 "Fix Issue 11463 - DDoc html to show the normal escaped ASCII chars" was merged into master:

- 837ae3d7aa514de34aae2c8dd68bd6b5ad2b578f by dkorpel:
  Fix Issue 11463 - DDoc html to show the normal escaped ASCII chars

https://github.com/dlang/dmd/pull/13883