dlang / ddox

Advanced D documentation engine
MIT License
63 stars 21 forks source link

Macros in comments are not ignored #168

Open MetaLang opened 7 years ago

MetaLang commented 7 years ago

The following is taken from a documented unittest for std.string.lineSplitter:

///
@safe pure unittest
{
    import std.array : array;

    string s = "Hello\nmy\rname\nis";

    /* notice the call to `array` to turn the lazy range created by
    lineSplitter comparable to the `string[]` created by splitLines.
    */
    assert(lineSplitter(s).array == splitLines(s));
}

And the end result is as follows (the page in question is here): image

DDOC seems to handle this correctly (assuming that macros in comments should be ignored) as instead of a link the raw macros appear in the comment.