[Bug 170597] New: syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

View: New views
6 Messages — Rating Filter:   Alert me  

[Bug 170597] New: syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

by Bugzilla from stefano.crocco@alice.it :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.kde.org/show_bug.cgi?id=170597

           Summary: syntax highlighter for ruby files doesn't correctly
                    highlights symbols ending in !, ? and =
           Product: kate
           Version: unspecified
          Platform: Compiled Sources
        OS/Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: syntax
        AssignedTo: kwrite-devel@...
        ReportedBy: stefano.crocco@...


Version:            (using Devel)
Installed from:    Compiled sources

ruby allows symbols ending with the characters !, = and ? and also the :[]
symbol, but all of them are recognised incorrectly by the syntax highlighter:
:name= is highlighted as if it were the symbol :name followed by the operator
=. The same happens for symbols ending in ! and ?. The symbol :[] is
highlighted as if the : were a normal character and the [] a normal operator.
In all cases, the entire sequence of characters should be treated as a symbol.


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@...
https://mail.kde.org/mailman/listinfo/kwrite-devel

[Bug 170597] syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

by Bugzilla from stefano.crocco@alice.it :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.kde.org/show_bug.cgi?id=170597





--- Comment #1 from Stefano Crocco <stefano crocco alice it>  2008-09-07 10:48:56 ---
Created an attachment (id=27294)
 --> (http://bugs.kde.org/attachment.cgi?id=27294)
A patch which should give the correct highlighting

To fix the behaviour for symbols ending in !, = and ? I just added this at the
end of the regexp checking for symbols:
[=?!]?

To get the correct result for the :[] symbol, I added this rule below the one
mentioned above:
<StringDetect attribute="Symbol" String=":[]" contex="check_div_1"/>

To apply the patch, go in the directory containing the ruby.xml file and
execute patch


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@...
https://mail.kde.org/mailman/listinfo/kwrite-devel

[Bug 170597] syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

by Bugzilla from robinpeder@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.kde.org/show_bug.cgi?id=170597


Robin Pedersen robinpeder gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robinpeder@...
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1




--- Comment #2 from Robin Pedersen <robinpeder gmail com>  2008-09-08 22:51:49 ---
Confirmed in trunk


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@...
https://mail.kde.org/mailman/listinfo/kwrite-devel

[Bug 170597] syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

by Bugzilla from robinpeder@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.kde.org/show_bug.cgi?id=170597


Robin Pedersen robinpeder gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #3 from Robin Pedersen <robinpeder gmail com>  2008-09-08 23:10:17 ---
I committed the patch in trunk, 4.1 and 4.0. Thanks.


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@...
https://mail.kde.org/mailman/listinfo/kwrite-devel

[Bug 170597] syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

by Bugzilla from stefano.crocco@alice.it :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.kde.org/show_bug.cgi?id=170597





--- Comment #4 from Stefano Crocco <stefano crocco alice it>  2008-09-15 10:01:16 ---
Created an attachment (id=27422)
 --> (http://bugs.kde.org/attachment.cgi?id=27422)
A patch which gives the correct highlighting

In this patch, the rule which detects the :[] symbol is replaced by a regexp
which also matches the sequence :[]=


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@...
https://mail.kde.org/mailman/listinfo/kwrite-devel

[Bug 170597] syntax highlighter for ruby files doesn't correctly highlights symbols ending in !, ? and =

by Bugzilla from robinpeder@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://bugs.kde.org/show_bug.cgi?id=170597





--- Comment #5 from Robin Pedersen <robinpeder gmail com>  2008-09-16 11:49:30 ---
Second patch committed. Thanks again!


--
Configure bugmail: http://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@...
https://mail.kde.org/mailman/listinfo/kwrite-devel
LightInTheBox - Buy quality products at wholesale price!