Re: [RFC/PATCH] gitweb: Add committags support
- From
Junio C Hamano <junkio@cox.net>
- Date
- Sep 24, 2006, 10:34 UTC
- Message-ID
- <7vy7s9bljc.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <ef5jkv$gep$1@sea.gmane.org>
Jakub Narebski <jnareb@gmail.com> writes:
> Don't forget about final s,\n,<br/>\n,gm if we parse it as a whole, > and not line by line.
Yes, the driver and individual tag markers need to have a convention on who is responsible for doing <br />. One reasonable convention would be to make the driver side responsible for taking \n and turns it into <br /> in plain strings, and make the tag markers responsible for doing so in their marked-up output.
For example, when bugzilla_tagger is annotating this commit message:
This rewrites frotz() routine to work around Bug
#22574. The fix was confirmed by Xyzzy.Thanks for everybody who helped with this rewrite.
it would match with a regexp /\b(?i:bug)\s*#?(\d+)/s to pick up "Bug\n#22574", extract 22574, and produce:
('This rewrites frotz() routine to work around ',
\'<a href="/cgi-bin/bugzilla.cgi?id=22574">Bug<br/>#22574</a>',
'. The fix was confirmed by Xyzzy.\n\nThanks for everybody...')