diff --git a/0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch b/0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch deleted file mode 100644 index 9c40bb83c98b55d5ea638f473c18e9b1e87563e8..0000000000000000000000000000000000000000 --- a/0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch +++ /dev/null @@ -1,543 +0,0 @@ -From a049b539113d20be25df41b65aa0c8981d835511 Mon Sep 17 00:00:00 2001 -From: ecasglez <29178639+ecasglez@users.noreply.github.com> -Date: Sat, 2 Oct 2021 13:16:49 +0200 -Subject: [PATCH] Fix "do concurrent" and "go to" keywords in the Fortran - lexer. (#1877) - -* Fix "do concurrent" and "go to" keywords in the Fortran lexer. - -* "Go to" statement was only highlighted if there was no space between "go" and "to". -* "Concurrent" keyword in the "Do Concurrent" statement was never highlighted because of a typo. It has been fixed. In addition, it now highlights them only if "Concurrent" is right after the "Do" keyword. -* I had to put the "do concurrent" changes before the already available list of keywords. Otherwise it won't highlight "Concurrent" because it finds first the "Do" keyword in the other list and stops searching for more keywords. - -* Fix a bug while parsing Fortran files with go to and do concurrent statements causing wrong highlighting. - -* For example, in the variable name "gotoErr", "goto" was highlighted but it shouldn't. - -* Update Fortran tests to the changes for the "go to statements" - -* Use Text.Whitespace to distinguish Fortran multiword keywords - -Co-authored-by: ecasglez ---- - pygments/lexers/fortran.py | 8 +- - tests/examplefiles/fortran/zmlrpc.f90.output | 168 +++++++++++++----- - .../examplefiles/fortranfixed/ahcon.f.output | 6 +- - 3 files changed, 135 insertions(+), 47 deletions(-) - -diff --git a/pygments/lexers/fortran.py b/pygments/lexers/fortran.py -index 6c6b8f8c..049a57cd 100644 ---- a/pygments/lexers/fortran.py -+++ b/pygments/lexers/fortran.py -@@ -48,11 +48,15 @@ class FortranLexer(RegexLexer): - ], - 'core': [ - # Statements -+ -+ (r'\b(DO)(\s+)(CONCURRENT)\b', bygroups(Keyword, Text.Whitespace, Keyword)), -+ (r'\b(GO)(\s*)(TO)\b', bygroups(Keyword, Text.Whitespace, Keyword)), -+ - (words(( - 'ABSTRACT', 'ACCEPT', 'ALL', 'ALLSTOP', 'ALLOCATABLE', 'ALLOCATE', - 'ARRAY', 'ASSIGN', 'ASSOCIATE', 'ASYNCHRONOUS', 'BACKSPACE', 'BIND', - 'BLOCK', 'BLOCKDATA', 'BYTE', 'CALL', 'CASE', 'CLASS', 'CLOSE', -- 'CODIMENSION', 'COMMON', 'CONCURRRENT', 'CONTIGUOUS', 'CONTAINS', -+ 'CODIMENSION', 'COMMON', 'CONTIGUOUS', 'CONTAINS', - 'CONTINUE', 'CRITICAL', 'CYCLE', 'DATA', 'DEALLOCATE', 'DECODE', - 'DEFERRED', 'DIMENSION', 'DO', 'ELEMENTAL', 'ELSE', 'ENCODE', 'END', - 'ENDASSOCIATE', 'ENDBLOCK', 'ENDDO', 'ENDENUM', 'ENDFORALL', -@@ -60,7 +64,7 @@ class FortranLexer(RegexLexer): - 'ENDSELECT', 'ENDSUBMODULE', 'ENDSUBROUTINE', 'ENDTYPE', 'ENDWHERE', - 'ENTRY', 'ENUM', 'ENUMERATOR', 'EQUIVALENCE', 'ERROR STOP', 'EXIT', - 'EXTENDS', 'EXTERNAL', 'EXTRINSIC', 'FILE', 'FINAL', 'FORALL', 'FORMAT', -- 'FUNCTION', 'GENERIC', 'GOTO', 'IF', 'IMAGES', 'IMPLICIT', -+ 'FUNCTION', 'GENERIC', 'IF', 'IMAGES', 'IMPLICIT', - 'IMPORT', 'IMPURE', 'INCLUDE', 'INQUIRE', 'INTENT', 'INTERFACE', - 'INTRINSIC', 'IS', 'LOCK', 'MEMORY', 'MODULE', 'NAMELIST', 'NULLIFY', - 'NONE', 'NON_INTRINSIC', 'NON_OVERRIDABLE', 'NOPASS', 'ONLY', 'OPEN', -diff --git a/tests/examplefiles/fortran/zmlrpc.f90.output b/tests/examplefiles/fortran/zmlrpc.f90.output -index ff27ddb2..64daf0c0 100644 ---- a/tests/examplefiles/fortran/zmlrpc.f90.output -+++ b/tests/examplefiles/fortran/zmlrpc.f90.output -@@ -908,7 +908,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -947,7 +949,9 @@ - "'no_ml_ in mlprc_aply?'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case' Keyword -@@ -1034,7 +1038,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'allocate' Keyword -@@ -1251,7 +1257,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -1442,7 +1450,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -1522,7 +1532,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -1889,7 +1901,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n\n ' Keyword -@@ -1991,7 +2005,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case' Keyword -@@ -2409,7 +2425,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -2537,7 +2555,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -2618,7 +2638,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -2827,7 +2849,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'enddo\n\n\n ' Keyword -@@ -2886,7 +2910,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'do ' Keyword -@@ -3028,7 +3054,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n ' Keyword -@@ -3179,7 +3207,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'call ' Keyword -@@ -3237,7 +3267,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'enddo\n\n ' Keyword -@@ -3276,7 +3308,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case' Keyword -@@ -3429,7 +3463,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -3523,7 +3559,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'mlprec_wrk' Name -@@ -3598,7 +3636,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'do ' Keyword -@@ -3759,7 +3799,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -3887,7 +3929,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -3967,7 +4011,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -4197,7 +4243,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'if' Keyword -@@ -4282,7 +4330,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'endif\n\n ' Keyword -@@ -4426,7 +4476,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n\n ' Keyword -@@ -4549,7 +4601,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n\n ' Text - 'case' Keyword -@@ -4772,7 +4826,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -4898,7 +4954,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'mlprec_wrk' Name -@@ -4973,7 +5031,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'do ' Keyword -@@ -5188,7 +5248,9 @@ - "'Allocate'" Literal.String.Single - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'end ' Keyword -@@ -5274,7 +5336,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'else\n ' Keyword -@@ -5354,7 +5418,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else' Keyword -@@ -5574,7 +5640,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'call ' Keyword -@@ -5631,7 +5699,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'if' Keyword -@@ -5716,7 +5786,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n ' Text - 'endif\n\n ' Keyword -@@ -5858,7 +5930,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'else\n ' Keyword -@@ -5995,7 +6069,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'call ' Keyword -@@ -6053,7 +6129,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'enddo\n\n ' Keyword -@@ -6096,7 +6174,9 @@ - '0' Literal.Number.Integer - ')' Punctuation - ' ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n\n ' Text - 'case ' Keyword -@@ -6142,7 +6222,9 @@ - ')' Punctuation - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'end ' Keyword -@@ -6190,7 +6272,9 @@ - ')' Punctuation - ')' Punctuation - '\n ' Text --'goto ' Keyword -+'go' Keyword -+'to' Keyword -+' ' Text - '9999' Literal.Number.Integer - '\n\n ' Text - 'end ' Keyword -diff --git a/tests/examplefiles/fortranfixed/ahcon.f.output b/tests/examplefiles/fortranfixed/ahcon.f.output -index bb1e3839..26a015a8 100644 ---- a/tests/examplefiles/fortranfixed/ahcon.f.output -+++ b/tests/examplefiles/fortranfixed/ahcon.f.output -@@ -681,9 +681,9 @@ - '1.D0' Literal.Number.Float - ')' Punctuation - ' ' Text --'GO' Name --' ' Text --'TO' Name -+'GO' Keyword -+' ' Text.Whitespace -+'TO' Keyword - ' ' Text - '100' Literal.Number.Integer - '\n' Text --- -2.33.0 - diff --git a/0001-fixed-typo.patch b/0001-fixed-typo.patch deleted file mode 100644 index bb9d73728dc1b5d24172c67ee6e56c47bd3a575a..0000000000000000000000000000000000000000 --- a/0001-fixed-typo.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8eb17ae0541cfaa1140f75358251450bd41c8dfb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Cl=C3=A9ment=20Saccoccio?= -Date: Thu, 13 May 2021 12:08:41 +0200 -Subject: [PATCH] fixed typo - ---- - pygments/lexers/grammar_notation.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pygments/lexers/grammar_notation.py b/pygments/lexers/grammar_notation.py -index 79c02e38..910201cd 100644 ---- a/pygments/lexers/grammar_notation.py -+++ b/pygments/lexers/grammar_notation.py -@@ -117,7 +117,7 @@ class AbnfLexer(RegexLexer): - (words(_core_rules, suffix=r'\b'), Keyword), - - # nonterminals (ALPHA *(ALPHA / DIGIT / "-")) -- (r'[a-zA-Z][a-zA-Z0-9-]+\b', Name.Class), -+ (r'[a-zA-Z][a-zA-Z0-9-]*\b', Name.Class), - - # operators - (r'(=/|=|/)', Operator), --- -2.33.0 - diff --git a/Pygments-2.10.0.tar.gz b/Pygments-2.11.0.tar.gz similarity index 36% rename from Pygments-2.10.0.tar.gz rename to Pygments-2.11.0.tar.gz index c4fd31f19a63e10b689f6983011954ceb839fb10..ac934b3901f28213ea05b3e378fe7f8162813feb 100644 Binary files a/Pygments-2.10.0.tar.gz and b/Pygments-2.11.0.tar.gz differ diff --git a/python-pygments.spec b/python-pygments.spec index e9ed7abe55ced1524593c739de8e08c52385c8ad..7733dbe2bc1d24689c6d0d73fbb6f2d2bd81b8ff 100644 --- a/python-pygments.spec +++ b/python-pygments.spec @@ -16,14 +16,11 @@ need to prettify source code. Highlights are: \ %bcond_without tests Name: python-pygments Summary: Syntax highlighting engine written in Python -Version: 2.10.0 -Release: 5 +Version: 2.11.0 +Release: 1 License: BSD-2-Clause URL: http://pygments.org/ -Source0: https://pypi.org/packages/source/P/Pygments/Pygments-%{version}.tar.gz - -Patch0: 0001-fixed-typo.patch -Patch1: 0001-Fix-do-concurrent-and-go-to-keywords-in-the-Fortran-.patch +Source0: https://files.pythonhosted.org/packages/1d/60/bb5bdd45e28a5acecf9273350b903fb8151ed899c4a384c983efd8a6730b/Pygments-2.11.0.tar.gz BuildArch: noarch @@ -64,9 +61,7 @@ chmod -x %{buildroot}%{_mandir}/man1/*.1 cp -r doc/docs doc/reST %if %{with tests} %check -make test -%endif - +%{__python3} -m pytest %files -n python3-pygments %license LICENSE @@ -81,6 +76,9 @@ make test %endif %changelog +* Wed Apr 19 2023 wubijie - 2.11.0-1 +- Update package to version 2.11.0 + * Tue Jan 17 2023 caofei - 2.10.0-5 - Fix "do concurrent" and "go to" keywords in the Fortran