Some feedback on the website.

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 16 07:50:54 PST 2015


On 12/16/2015 10:13 AM, Adam D. Ruppe wrote:
> And you know, there, I think we are still better off enhancing what we
> have than throwing it out. Cross referencing for example, in the
> compiler, means it can automatically emit some kind of link with the
> full name of the symbol done with scope resolution.

I have a pretty cool idea on how to do cross referencing and other 
global things simply.

All we need is that ddoc generates plaintext wrapped in a macro. For 
example, consider the input:

====
This is a $(D ddoc) sentence with a lil $(B bold) in the mix.
====

Right now the generated output consists of the raw text interspersed 
with the expansion of the macros. What we need is this:

====
$(DDOC_RAWTEXT This is a )$(D ddoc)$(DDOC_RAWTEXT  sentence with a lil 
)$(B bold)$(DDOC_RAWTEXT  in the mix.)
====

Expansion would proceed normally. The default value is:

DDOC_RAWTEXT=$0

With this change to ddoc it becomes easy to define filters that 
eliminate all text and tags except those of interest. For example, 
generating a list of all URLs for verification purposes is trivial. 
Cross-referencing, glossary, etc. etc. become easy to automated.

Another cool project!


Andrei



More information about the Digitalmars-d mailing list