1
1

syntax: spec: drop invalid parentheses after "Summary"

Also, add the missing "RemovePathPostfixes", add extra word boundaries,
and reshuffle and regroup some things.
Этот коммит содержится в:
Benno Schulenberg 2020-02-25 11:34:41 +01:00
родитель fcbe5aedbd
Коммит 9c70fdaef9

Просмотреть файл

@ -4,13 +4,13 @@ syntax spec "\.spec(\.[^/]+)?$"
comment "#" comment "#"
# Main tags. # Main tags.
color brightblue "\<(Name|Version|Release|Summary|Group|URL|Url|Epoch|Icon|Serial)[[:space:]]*:"
color brightblue "\<(BuildArch(itectures)?|Exclusive(Arch|OS)|Exclude(Arch|OS))[[:space:]]*:" color brightblue "\<(BuildArch(itectures)?|Exclusive(Arch|OS)|Exclude(Arch|OS))[[:space:]]*:"
color brightblue "\<(Conflicts|Enhances|Obsoletes|Provides|Requires(\(.*\))?|Recommends|Suggests|Supplements|BuildConflicts|BuildRequires|PreReq)[[:space:]]*:" color brightblue "\<(Provides|Requires(\(.*\))?|Obsoletes|Conflicts|Recommends|Suggests|Supplements|Enhances|PreReq)[[:space:]]*:"
color brightblue "\<(Epoch|Icon|Nosource|Nopatch|Serial)[[:space:]]*:" color brightblue "\<(BuildRoot|BuildRequires|BuildConflicts|Prefix|RemovePathPostfixes)[[:space:]]*:"
color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:" color brightblue "\<(AutoReq|AutoProv|AutoReqProv)[[:space:]]*:"
color brightblue "\<(Copyright|License|Summary(\(.*\))?|Distribution|Vendor|Packager|Group|BuildRoot|Prefix)[[:space:]]*:" color brightblue "\<(License|Copyright|Distribution|Vendor|Packager)[[:space:]]*:"
color brightblue "\<(Name|Version|Release|URL|Url)[[:space:]]*:" color brightblue "\<((Source|Patch)[0-9]*|Nosource|Nopatch)[[:space:]]*:"
color brightblue "\<(Source|Patch)[0-9]*[[:space:]]*:"
# Architectures. # Architectures.
color brightred "\<(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppciseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x?|noarch)\>" color brightred "\<(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppciseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x?|noarch)\>"
# Architecture and OS conditionals. # Architecture and OS conditionals.
@ -22,10 +22,10 @@ color yellow start="%__" end="\ "
color magenta start="%\{" end="\}" color magenta start="%\{" end="\}"
color yellow start="%\{__" end="\}" color yellow start="%\{__" end="\}"
# Sections. # Sections.
color red "^%(build$|changelog|check$|clean$|description|files|install$|package|prep$)" color red "^%((prep|build|install|check|clean)$|(description|files|package|changelog)\>)"
color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?|verifyscript)" color red "^%((pre|post)(trans|un)?|trigger(prein|in|un|postun)?)\>"
color red "^%(trans)?filetrigger(in|un|postun)?" color red "^%(trans)?filetrigger(in|un|postun)\>"
color red "^%(sourcelist|patchlist|generate_buildrequires)" color red "^%(sourcelist|patchlist|generate_buildrequires|verifyscript)\>"
# Conditionals and defines. # Conditionals and defines.
color brightred "%(if|elif|else|endif|define|global|undefine)\>" color brightred "%(if|elif|else|endif|define|global|undefine)\>"
@ -33,8 +33,9 @@ color brightred "%(if|elif|else|endif|define|global|undefine)\>"
color cyan "(#|%dnl[[:space:]]).*" color cyan "(#|%dnl[[:space:]]).*"
# Special case: "# norootforbuild" is handled as main tag. # Special case: "# norootforbuild" is handled as main tag.
color brightblue "^# norootforbuild" color brightblue "^# norootforbuild"
# First the author, then just the date of %changelog entries. # For %changelog entries: first the author, then just the date.
color yellow "^\* .+>" color yellow "^\* .+>"
color brightyellow "^\* [[:alnum:] ]+ [0-9]{4} " color brightyellow "^\* [[:alnum:] ]+ [0-9]{4} "
# Trailing whitespace. # Trailing whitespace.
color ,green "[[:space:]]+$" color ,green "[[:space:]]+$"