[PATCH RFC] hgweb: improve annotate flow

Patrick Mézard pmezard at gmail.com
Fri Nov 18 14:15:22 CST 2011


Le 18/11/11 19:55, Laurens Holst a écrit :
> Op 18-11-2011 19:37, Patrick Mézard schreef:
>> It actually exists but there is nothing to scroll so it gives the impression the anchor is not there. Just look for 'id="t1.372"' in the page source. That said, the anchor generation is a little ad-hoc and I would not be surprised to find bugs in this area with complicated patches mixing binaries and renames.
>>
>> Also, Javascript could be used here to highlight the target line or the target hunk and avoid this no-scroll issue (or even CSS if the id passed as a parameter as well).
> 
> Actually there’s an easier way to do this, without scripting; If you move the ID from the <a> tag to the <td> tag, you can use the CSS :target pseudo-class to highlight the line, something like:
> 
> td:target { background-color: yellow }

Thanks, I have updated the demo server. And mpm link now looks like:

  http://mezard.eu/hg/hg-does-it-look-good-for-you/rev/5868dd69fb03/#t1.372

--
Patrick Mézard


More information about the Mercurial-devel mailing list