D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1574 - DDoc documentation lacks macro examples
Summary: DDoc documentation lacks macro examples
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: Andrej Mitrovic
URL:
Keywords: ddoc, pull
Depends on:
Blocks:
 
Reported: 2007-10-11 20:42 UTC by Bill Baxter
Modified: 2014-05-05 19:38 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Bill Baxter 2007-10-11 20:42:14 UTC
There isn't a single example of how to actually use a macro on the ddoc instructions pages (http://www.digitalmars.com/d/ddoc.html ; http://www.digitalmars.com/d/1.0/ddoc.html)

Theres some verbose description of how macros can have arguments blah blah blah, but it should be followed by an example like:

"""
For example, to use the predefined bold formatting macro, B:
/** A function of some sort.
 *
 *  After calling this, you $(B absolutely must) remember to brush your teeth.
 */
"""

... at least after reading the description a few times I $(I think) that's how DDoc macros are supposted to be used.
Comment 1 BCS 2007-10-11 21:42:28 UTC
Take a look at the Phobos source. IIRC it has many examples
Comment 2 Bill Baxter 2007-10-11 21:53:21 UTC
Thanks.  I know it does.  The point of filing the bug report is to make life easier for future users so they don't have to go digging through the phobos source just to find out how to make some text bold.
Comment 3 BCS 2007-10-11 23:00:20 UTC
I hear you. I was proposing a work around, not a solution.
Comment 5 github-bugzilla 2014-05-05 19:38:18 UTC
Commits pushed to master at https://github.com/D-Programming-Language/dlang.org

https://github.com/D-Programming-Language/dlang.org/commit/810afe594a0c35e681cba31d4b9fa40dfe27452b
Fix Issue 1574 - Add a simple example of macro substitution.

https://github.com/D-Programming-Language/dlang.org/commit/b558bb26c84794c0633b7a4497184c0cdf14be4f
Merge pull request #565 from AndrejMitrovic/Fix1574

Issue 1574 - Add a simple example of macro substitution.