From 971b9c53c7f692c2964e9715cfd55207892fc377 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 15 Jun 2015 15:26:46 +0300 Subject: [PATCH] improvements to rpmspec lexer --- python-pygments.spec | 4 +++- rpmspec.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 rpmspec.patch diff --git a/python-pygments.spec b/python-pygments.spec index f5b486c..4900d10 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -8,11 +8,12 @@ Summary: A generic syntax highlighter as Python 2.x module Summary(pl.UTF-8): Moduł Pythona 2.x do ogólnego podświetlania składni Name: python-%{module} Version: 2.0.2 -Release: 1 +Release: 2 License: BSD Group: Development/Languages/Python Source0: http://pypi.python.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz # Source0-md5: 238587a1370d62405edabd0794b3ec4a +Patch0: rpmspec.patch URL: http://pygments.org/ %if %{with python2} BuildRequires: python @@ -104,6 +105,7 @@ forów, wiki i inne plikacje wymagające ładnego wyświetlania kodu %prep %setup -q -n Pygments-%{version} +%patch0 -p1 %build %if %{with python2} diff --git a/rpmspec.patch b/rpmspec.patch new file mode 100644 index 0000000..f638ef4 --- /dev/null +++ b/rpmspec.patch @@ -0,0 +1,12 @@ +--- Pygments-2.0.2/pygments/lexers/installers.py~ 2014-11-10 21:17:51.000000000 +0200 ++++ Pygments-2.0.2/pygments/lexers/installers.py 2015-06-15 14:57:19.665609691 +0300 +@@ -201,7 +201,8 @@ + (r'.', Text), + ], + 'macro': [ +- (r'%define.*\n', Comment.Preproc), ++ (r'%(?:un)?define.*\n', Comment.Preproc), ++ (r'%include.*\n', Comment.Preproc), + (r'%\{\!\?.*%define.*\}', Comment.Preproc), + (r'(%(?:if(?:n?arch)?|else(?:if)?|endif))(.*)$', + bygroups(Comment.Preproc, Text)), -- 2.44.0