1797 – Documentation comments - ///

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1797 - Documentation comments - ///
Summary: Documentation comments - ///
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: Unknown W. Brackets
URL:
Keywords: ddoc
Depends on:
Blocks:
Reported: 2008年01月21日 20:21 UTC by Unknown W. Brackets
Modified: 2015年06月09日 05:15 UTC (History)
0 users

See Also:


Attachments
Simple lexer.c patch (876 bytes, patch)
2008年01月23日 03:38 UTC, Unknown W. Brackets
Details | Diff
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Unknown W. Brackets 2008年01月21日 20:21:18 UTC
C# style documentation comments, which use lines prepended with ///, are not being parsed correctly. Two lines in a row are treated as separate blocks, and separated with the DDOC_BLANKLINE macro.
It seems to me this was once supported, although ddoc.html has always
listed "///" as a single line documentation comment.
/// Summary
///
/// Example line 1
/// Example line 2
Expected Results:
Summary
Example line 1 Example line 2
Actual Results:
Summary
Example line 1
Example line 2
If I have time (won't tonight), I'll try to figure up a patch for this issue, if I can test it with the compiler sources/latest dmdfe.
-[Unknown]
Comment 1 Jarrett Billingsley 2008年01月21日 22:37:21 UTC
See also http://d.puremagic.com/issues/show_bug.cgi?id=1652, probably the same issue?
Comment 2 Unknown W. Brackets 2008年01月23日 03:38:45 UTC
Created attachment 219 [details] 
Simple lexer.c patch
Okay, this patch does two things. First, it fixes this issue by not adding an extra \n between two nearby block comments.
This does not break that this:
/**
 * Summary
 */
/**
 * Long Description
 */
Still works properly. It does not now nor did it before work for this:
/** Summary
 */
/** Long Description
 */
So this patch doesn't (that I can tell) break anything worse than current, but does improve ///.
Second, it fixes an issue wherein /** ... */ comments were typically not properly being separated. Meaning, before this did not even work:
/**
 * Summary
 */
/**
 * Long Description
 */
Based on the code, the fact that the combine comments function was trying to make that work, and the documentation... I fixed it so this works as well (the problem is that last line, " */".
-[Unknown]
Comment 3 Walter Bright 2008年12月08日 00:54:02 UTC
Fixed in DMD 1.037 and 2.021


AltStyle によって変換されたページ (->オリジナル) /