OK here's the challenge.

When we view rpm specs in svn using viewvc like this :-

http://svnweb.mageia.org/packages/cauldron/acidrip/current/SPECS/acidrip.spec?view=markup

...the highlighting is incorrect, because viewvc uses pygments to generate the language highlighting and it sadly has no lexer for rpm spec files.

In many cases the highlighting is totally wrong like this:-

http://svnweb.mageia.org/packages/cauldron/abiword/current/SPECS/abiword.spec?revision=304568&view=markup

...as viewvc makes an incorrect assumption about the lexer needed, based on a parse of the first line. It's horrible.

What is needed is a lexer for rpm spec files.

This would not be too difficult for an experienced Python programmer as the building blocks are all in place within pygments :-

http://pygments.org/docs/lexerdevelopment/

If you view any spec file using the kate editor, you will see the style of highlighting that is needed.

Not only would this benefit Mageia, but all projects using rpm and viewvc.

So that's the challenge - anyone up for it?  :)

Reply via email to