[viewvc-dev] Errors viewing rpm spec files with Name: etc on line 1

Barry Jackson <[email protected]> Thu, 25 Oct 2012 15:54:47 -0700 (PDT)
Newsgroups gmane.comp.version-control.cvs.viewcvs.devel
Message-ID <2129754084.13757.1351205687699.JavaMail.httpd__49404.0014841177$1351214911$gmane$org@localhost>
There is a problem with the pygments handling of rpm spec files when the content of line one contains Name: or Epoch: etc. All text is outlined in red and seen as an error.
Here is an example:-
http://svnweb.mageia.org/packages/cauldron/yaflight/current/SPECS/yaflight.spec?view=markup&pathrev=310060

If a macro is placed on line one the problem goes away.

This seems to have started in 1.1.12 with Revision 2658.
"Failing all else, use the Pygments guess_lexer() function to guess a file's content type from the first line of its text"

I hope this can be fixed as it's quite distracting ;)

------------------------------------------------------
http://viewvc.tigris.org/ds/viewMessage.do?dsForumId=4251&dsMessageId=3023559

To unsubscribe from this discussion, e-mail: [[email protected]].