Is there a macro for code snippets introduced with "---"?

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 4 09:19:49 PDT 2017


On 07/04/2017 12:37 AM, Sönke Ludwig wrote:
> The problem is that syntax highlighting of code blocks happens at an 
> earlier stage according to the spec (see "Phases of Processing" at 
> http://dlang.org/spec/ddoc.html).
> 
> I just checked and I'm actually doing it the other way around in DDOX, 
> without encountering different results so far, so it may be realistic to 
> change this for Ddoc, too.

Thanks. I think the best way to do it is to have the earlier stage 
transform all sugar (---, backticks, tags with colons, ...) to standard 
macros, and then make one pass that expands macros. That gives maximum 
control to the user and allows us to e.g. improve the sugar easily. -- 
Andrei


More information about the Digitalmars-d mailing list