Bug 320813

Summary: Python: syntax identifies strings as comments
Product: [Applications] kate Reporter: Yuri <yks-uno>
Component: syntaxAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jeteon2web, kjslag, oss
Priority: NOR    
Version: 3.10.3   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 3.13.0

Description Yuri 2013-06-06 09:58:39 UTC
Every python string which appears as the first token on a line is highlighted as comment.
In the example below strings which appear as strings are designated OK, and the erroneous strings 'Bad' appear as comment while it should also appear as string.
x = { 'key_OK': 'value_OK',
  'key_Bad': 'value_OK',
}
y = ('value_OK',
  'value_Bad', 'value_OK' )
Single or double or triple quotes don't affect the behaviour.
This is an apparent duplicate of 313007 (and others), but that was marked as FIXED and reappeared, so I filed a new bug.

Reproducible: Always

Steps to Reproduce:
1. Create a file with Python syntax
2. enter a 'string' or "string" or """string"""
3. See the entered text highlighted as comment instead of as string
Actual Results:  
the entered text is highlighted as comment

Expected Results:  
the entered text highlighted as string

This is an apparent duplicate of 313007 (and others), but that was marked as FIXED and reappeared, so I filed a new bug.
Comment 1 Kevin 2013-07-27 01:28:27 UTC
I see the exact same behavior on Arch Lnux with Kate 3.10.5 and KDE 4.10.5
Comment 2 Neo 2013-10-01 11:08:35 UTC
I've experienced the same on both Ubuntu 12.10 and Kubuntu 13.04
Comment 3 Gerald Senarclens de Grancy 2014-05-12 20:31:38 UTC
Git commit b52ae19dc53016ac17a513033e8f52da95e44045 by Gerald Senarclens de Grancy.
Committed on 12/05/2014 at 20:30.
Pushed by geralds into branch 'master'.

Added automated TC for bugs 313007 and 320813

both tests pass as this was fixed a while ago

A  +5    -0    tests/data/syntax_highlighting/python/string_1/expected
A  +16   -0    tests/data/syntax_highlighting/python/string_1/input.js
A  +4    -0    tests/data/syntax_highlighting/python/string_1/origin

http://commits.kde.org/kate/b52ae19dc53016ac17a513033e8f52da95e44045
Comment 4 Gerald Senarclens de Grancy 2014-05-12 20:33:07 UTC

*** This bug has been marked as a duplicate of bug 313007 ***