summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgentoo90 <gentoo90@gmail.com>2013-02-15 22:31:26 +0200
committergentoo90 <gentoo90@gmail.com>2013-02-15 22:31:26 +0200
commit325a7f391af3e449a8ee20f24403da45f3149211 (patch)
tree442d66e2d9f441a920ce4d32f8d9ae01f4c1c7ac
parent054c464c70c115f476608a51bb0b4a931d1fa400 (diff)
downloadpygments-325a7f391af3e449a8ee20f24403da45f3149211.tar.gz
Minor fixes for RPMSpec and NSIS lexers
- Replace greedy by lazy matching for single quoted strings - Add RPM keyword 'Suggests'
-rw-r--r--pygments/lexers/other.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py
index c8557922..35350de4 100644
--- a/pygments/lexers/other.py
+++ b/pygments/lexers/other.py
@@ -3306,7 +3306,7 @@ class NSISLexer(RegexLexer):
tokens = {
'root': [
(r'[;\#].*\n', Comment),
- (r"'.*'", String.Single),
+ (r"'.*?'", String.Single),
(r'"', String.Double, 'str_double'),
(r'`', String.Backtick, 'str_backtick'),
include('macro'),
@@ -3457,7 +3457,7 @@ class RPMSpecLexer(RegexLexer):
include('macro'),
(r'(?i)^(Name|Version|Release|Epoch|Summary|Group|License|Packager|'
r'Vendor|Icon|URL|Distribution|Prefix|Patch[0-9]*|Source[0-9]*|'
- r'Requires\(?[a-z]*\)?|[a-z]+Req|Obsoletes|Provides|Conflicts|'
+ r'Requires\(?[a-z]*\)?|[a-z]+Req|Obsoletes|Suggests|Provides|Conflicts|'
r'Build[a-z]+|[a-z]+Arch|Auto[a-z]+)(:)(.*)$',
bygroups(Generic.Heading, Punctuation, using(this))),
(r'^%description', Name.Decorator, 'description'),
@@ -3467,7 +3467,7 @@ class RPMSpecLexer(RegexLexer):
r'make(?:install)|ghost|patch[0-9]+|find_lang|exclude|verify)',
Keyword),
include('interpol'),
- (r"'.*'", String.Single),
+ (r"'.*?'", String.Single),
(r'"', String.Double, 'string'),
(r'.', Text),
],