Why I'm hesitating to switch to D

Adam Ruppe destructionator at gmail.com
Thu Jun 30 05:35:23 PDT 2011


Walter Bright wrote:
> In Ddoc, you can define your own macros to do that, for example:
>     H3=<h3>$0</h3>


So, I was just writing up a complaint about ddoc's escaping of
characters when I looked at doc.c and found it already had a
solution... except looking at the code, it doesn't seem to be
fully implemented.

=======
$ cat test72.d
extern(C) void printf(in char*, ...);
/**
        Macros:
        ESCAPES=/a/lol
*/

/// this is (cool) $19 & <span> arguably wrong
void main() {
        printf("Hello, & world!\n".ptr);
}


$ dmd test72.d -D
Segmentation fault
=========

Poo. Now I wish I hadn't deleted the proposal I typed up...

generally though: have the ESCAPES thing be implemented fully, and
add ($DDOC_RAW) to bypass it, so you can still embed html in there
while getting escaped output by default.

(in std.ddoc you'd define HTML=($DDOC_RAW $0) so you can handle different embedded
raw source differently in different output formats.)


More information about the Digitalmars-d mailing list