On Monday, 10 March 2014 at 16:58:45 UTC, Vladimir Panteleev
wrote:
On Monday, 10 March 2014 at 16:54:37 UTC, Brad Anderson wrote:
I wanted to do just this so I considered adding a predefined
macro to ddoc to get line numbers like I did to get filenames
(I needed SRCFILENAME to add the Improve This Page button) but
the line numbers would pretty quickly lose sync between master
and the documentation so that would also require integrating
the release tag into the documentation somehow so I gave up on
that idea.
So... don't link to master?
The dmd repo has a VERSION file. Can that be used to link to
the respective tag instead?
I'm not sure how ddox works but I suspect that wouldn't be
terrible difficult to integrate. Doing it with ddoc would require
something like copying the value from VERSION into a macro within
std.ddoc using the html make target. Not terribly difficult but
now that we are switching to ddox we might as well do it using
ddox where line information is already easily accessible.