Bug 400345 - [PATCH] perl syntax highlighting: add labels
Summary: [PATCH] perl syntax highlighting: add labels
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-26 15:44 UTC by bes.internal
Modified: 2019-09-23 04:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bes.internal 2018-10-26 15:44:19 UTC
Please support definition of perl LABEL.
Definition as LABEL: or label: and call like goto LABEL
Ref http://perldoc.perl.org/functions/goto.html

It looks like this to me.
http://internal.by/i/20181026184338.png


reverse patch over version 7:
----------------------------------
diff --git a/perl.xml b/perl.xml
index 5ecdc47..cd3d3ce 100644
--- a/perl.xml
+++ b/perl.xml
@@ -349,8 +349,6 @@
         <RegExpr attribute="Pod" context="pod" String="\=\w+(\s|$)" column="0" beginRegion="POD"/>
         <DetectSpaces />
         <DetectChar attribute="Comment" context="comment" char="#" />
-        <RegExpr attribute="Label" String="^[A-Z0-9_]+:$" />
-        <RegExpr attribute="Label small" String="^[a-z0-9]+:$" />
 
         <!-- Numeric values. Note that we have to allow underscores between two digits (thus the creepy regular expressions). -->
         <RegExpr attribute="Hex" String="\b\-?0[xX]([0-9a-fA-F]|_[0-9a-fA-F])+" context="slash_safe_escape"/>
@@ -848,8 +846,6 @@
     </contexts>
     <itemDatas>
       <itemData name="Normal Text"               defStyleNum="dsNormal" />
-      <itemData name="Label"                     defStyleNum="dsLabel" />
-      <itemData name="Label small"               defStyleNum="dsLabel small" />
       <itemData name="Keyword"                   defStyleNum="dsKeyword" />
       <itemData name="Pragma"                    defStyleNum="dsKeyword" />
       <itemData name="Function"                  defStyleNum="dsFunction" />
----------------------------------
Comment 1 Nibaldo G. 2018-10-29 05:32:06 UTC
It would be great if you could send your patch to the syntax-highlighting repository: https://phabricator.kde.org/source/syntax-highlighting/ (file: data/syntax/perl.xml)

Here is the documentation to send patches with Arcanist: https://community.kde.org/Infrastructure/Phabricator

The only problem I see in your changes, is that you use "dsLabel" and "dsLabel small" in defStyleNum, which (I understand) are not valid styles. The styles are described here: https://docs.kde.org/trunk5/en/applications/katepart/highlight.html (section: Available Default Styles).
Although the ideal is not to use hard colors, if you use background color you can write:

<itemData name="Label" defStyleNum="dsNormal" bold="1" color="#FFFFFF" selColor="#FFFFFF" backgroundColor="#FF007F" />
Comment 2 Christoph Cullmann 2019-08-24 16:10:18 UTC
Yes, provide a patch please!
Thanks.
Comment 3 Bug Janitor Service 2019-09-08 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2019-09-23 04:33:09 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!