On 03/30/2016 08:33 PM, Thorsten Glaser wrote:
> Hi Thomas,
> 
>> As I'm doing a lot of packaging myself, I've written a Joe syntax
>> highlight script for the debian/control and debian/copyright. It's
>> far from perfect (for example, things in brakets in descriptions
>> are in cyan just like version numbers), at least it's better than
>> the default of no syntax highlighting at all.
> 
> I think I can improve on that. Can you send me a corpus of
> control files to try against, so I catch the corner cases,
> like the one with brackets you described?

Hi Thorsten,

IMO, the way to go is to kind of document the keywords we use for
debian/control, and reference them in the syntax highlight. Then, if
we're using depends / pre-depends / recommends / you-name-it, then we
use the normal brackets handling, if not, then we don't use it. Doing
so, we could also handle error cases (ie: fields we don't recognize),
and make use of the "=Error red bold" defined on top of the file. This
is supposed to work with the "strings" keyword (example in the java.jsf
for example), but I tried and failed to understand how I should do it.

Example of bad highlight:
http://anonscm.debian.org/cgit/openstack/nova.git/tree/debian/control

if you look at the long description, you'll see things in brackets
appear badly highlighted, when they should not.

Cheers,

Thomas Goirand (zigo)

P.S: A backport of joe 4.1 to Jessie would be super nice, even more if
it included this highlighting script.

Reply via email to