Add BuildConflicts recognition and fix some matching rules

BuildConflicts is a valid key in a spec file, so it should obviously
be recognized.

A number of the regex statements for recognizing camel case words
were not correctly specified (e.g. BuildArch vs buildArch), and those
are now fixed to be recognized.
This commit is contained in:
Neal Gompa 2019-08-08 23:19:05 -04:00
parent 01f43f4ca0
commit 73713ed7c9

View file

@ -29,7 +29,7 @@ function hljsDefineRpmSpecfile(hljs) {
hljs.QUOTE_STRING_MODE,
{
className: "type",
begin: /^(Name|BuildRequires|Version|Release|Epoch|Summary|Group|License|Packager|Vendor|Icon|URL|Distribution|Prefix|Patch[0-9]*|Source[0-9]*|Requires\(?[a-z]*\)?|[a-z]+Req|Obsoletes|Recommends|Suggests|Supplements|Enhances|Provides|Conflicts|RemovePathPostfixes|Build[a-z]+|[a-z]+Arch|Auto[a-z]+)(:)/,
begin: /^(Name|BuildRequires|BuildConflicts|Version|Release|Epoch|Summary|Group|License|Packager|Vendor|Icon|URL|Distribution|Prefix|Patch[0-9]*|Source[0-9]*|Requires\(?[a-z]*\)?|[a-zA-Z]+Req|Obsoletes|Recommends|Suggests|Supplements|Enhances|Provides|Conflicts|RemovePathPostfixes|Build[a-zA-Z]+|[a-zA-Z]+Arch|Auto[a-zA-Z]+)(:)/,
},
{
className: "keyword",