diff options
| author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-12-12 00:52:58 +0100 |
|---|---|---|
| committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-12-12 00:54:06 +0100 |
| commit | f2b0e5f46a9e1873d4ee4dae0e7760b2f703fbb5 (patch) | |
| tree | ce2989c1859e5476ae836f4c7e8e6d4a64d53966 /kde-frameworks/syntax-highlighting/files/syntax-highlighting-5.77.0-bashfix-2.patch | |
| parent | eef336bd0db27b16a5ca39bd70e17fb96f7c0b90 (diff) | |
| download | kde-f2b0e5f46a9e1873d4ee4dae0e7760b2f703fbb5.tar.gz kde-f2b0e5f46a9e1873d4ee4dae0e7760b2f703fbb5.tar.bz2 kde-f2b0e5f46a9e1873d4ee4dae0e7760b2f703fbb5.zip | |
kde-frameworks/syntax-highlighting: Fix bash syntax highlighting
See also: https://invent.kde.org/frameworks/syntax-highlighting/-/issues/5
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
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 00000000000..3ff4bdc0131 --- /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 + |
