diff options
Diffstat (limited to 'kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bashfix-2.patch')
-rw-r--r-- | kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bashfix-2.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bashfix-2.patch b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bashfix-2.patch new file mode 100644 index 000000000000..3ff4bdc01315 --- /dev/null +++ b/kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bashfix-2.patch @@ -0,0 +1,54 @@ +From b232881ed1ecc010b8a13c6aa295bbdddc87c70b Mon Sep 17 00:00:00 2001 +From: Jonathan Poelen <jonathan.poelen@gmail.com> +Date: Thu, 10 Dec 2020 02:11:29 +0100 +Subject: [PATCH] fix && and || in a subcontext and fix function name pattern + +--- + data/syntax/bash.xml | 10 ++++++---- + 6 files changed, 46 insertions(+), 4 deletions(-) + +diff --git a/data/syntax/bash.xml b/data/syntax/bash.xml +index 3b8824df..70cee765 100644 +--- a/data/syntax/bash.xml ++++ b/data/syntax/bash.xml +@@ -2,7 +2,7 @@ + <!DOCTYPE language SYSTEM "language.dtd" + [ + <!ENTITY tab "	"> +- <!ENTITY funcname "[A-Za-z_:][A-Za-z0-9_:#%@-]*"> ++ <!ENTITY funcname "([^&_fragpathseps;{}=#$]|[+!@](?!\())([^&_fragpathseps;{}=$]*+([+!@](?!\())?+)*+"> + <!ENTITY varname "[A-Za-z_][A-Za-z0-9_]*"> + <!ENTITY eos "(?=$|[ &tab;])"> <!-- eol or space following --> + <!ENTITY eoexpr "(?=$|[ &tab;<>|&;])"> +@@ -28,7 +28,7 @@ + <!ENTITY heredocq "(?|"([^"]+)"|'([^']+)'|\\(.[^&wordseps;&substseps;]*))"> + ]> + +-<language name="Bash" version="16" kateversion="5.62" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL"> ++<language name="Bash" version="17" kateversion="5.62" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;*.nix;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD;APKBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL"> + + <!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl) + Changes by Matthew Woehlke (mw_triad@users.sourceforge.net) +@@ -471,8 +471,8 @@ + <Detect2Chars attribute="Redirection" context="FdRedirection" char="&" char1=">"/> + + <!-- handle branche conditions --> +- <Detect2Chars attribute="Control" context="#pop" char="&" char1="&"/> +- <Detect2Chars attribute="Control" context="#pop" char="|" char1="|"/> ++ <Detect2Chars attribute="Control" context="#stay" char="&" char1="&"/> ++ <Detect2Chars attribute="Control" context="#stay" char="|" char1="|"/> + + <!-- handle &, |, ; --> + <AnyChar attribute="Control" context="#stay" String="&|;"/> +@@ -1269,6 +1269,8 @@ + + <context attribute="Normal Text" lineEndContext="#stay" name="FindExprDblBracketEnd"> + <LineContinue attribute="Escape" context="#stay"/> ++ <Detect2Chars attribute="Control" context="#pop!ExprDblBracket" char="&" char1="&"/> ++ <Detect2Chars attribute="Control" context="#pop!ExprDblBracket" char="|" char1="|"/> + <RegExpr attribute="Keyword" context="#pop" String="\]\](?=($|[ &tab;;|&]))" endRegion="expression"/> + </context> + +-- +GitLab + |