Re: [RFC/PATCH] gitweb: Add committags support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jakub Narebski <jnareb@xxxxxxxxx> writes:

> Yet another question is how to deal with commit message specific
> "syntax highlighting". Currently, parsing commit message line by line,
> we treat specially signoff lines (syntax highlighting, and removing
> trailing empty lines after signoff), empty lines (we collapse consecutive
> empty lines); the rest goes through format_log_line_html... and committags.

Actually I was hoping that my bright idea(tm) of passing the
whole message to a chain of tag markers would solve that
automatically.  You define a std marker whose purpose is _not_ 
to add anchor elements leading to other URLs but mark up
sign-off lines and stuff.  Put that at the beginning or at the
end of the chain as you see fit and it would do its work just
like other real tag markers would do.

For example, one of the things it would do is to unhighlight
the Signed-off-by: lines.  It would match and split with

	/(.*?)^(Signed-off-by: .*?)$(.*)/ms

then add:

	( $1, # pass as literal we did not touch
          \'<span class="signoff">', # unhighlight
          $2, # give chance to muck with e-mail address to downstream
	      # markers
          \'</span>'
        )

to its output buffer and process the rest ($3).  A downstream
tag maker may match e-mail address the above left and might mark
it up with mailto: URL.


          

	

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]