After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 139267 - python """Multiline string""" not hilighted when using a non C or english locale
python """Multiline string""" not hilighted when using a non C or english locale
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
git master
Other Linux
: Low normal
: ---
Assigned To: Yevgen Muntyan
GTK Sourceview maintainers
: 311660 337227 344038 345647 372045 (view as bug list)
Depends on: 140097
Blocks:
 
 
Reported: 2004-04-06 17:14 UTC by Benoît Dejean
Modified: 2014-02-15 12:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Screenshot (266.90 KB, image/png)
2004-04-19 11:54 UTC, Benoît Dejean
Details

Description Benoît Dejean 2004-04-06 17:14:38 UTC
gtksourceview fails to hilight python """Multiline string"" but '''Multiline
string''' (i'm using gedit2.5.91)

the python.lang definition looks OK

<string _name = "Multiline String" style = "String" end-at-line-end = "FALSE">
   <start-regex>[uUrR]?&quot;&quot;&quot;</start-regex>
   <end-regex>&quot;&quot;&quot;</end-regex>
</string>
 
<string _name = "Multiline String 2" style = "String" end-at-line-end = "FALSE">
   <start-regex>[uUrR]?&apos;&apos;&apos;</start-regex>
   <end-regex>&apos;&apos;&apos;</end-regex>
</string>
Comment 1 Paolo Maggi 2004-04-13 16:10:01 UTC
hmmm... I don't know Python. Could you try to explain your problem with an example?
Comment 2 Benoît Dejean 2004-04-13 21:29:00 UTC
"""this
is
a
multiline
string
"""
Comment 3 Gustavo Giráldez 2004-04-14 22:03:07 UTC
Works for me, either double or single quotes (version 1.0.0).  What version of
GtkSourceView are you using?
Comment 4 Benoît Dejean 2004-04-15 00:42:03 UTC
pkg-config --modversion gtksourceview-1.0
0.9.2
Comment 5 Gustavo Giráldez 2004-04-19 02:51:54 UTC
> gtksourceview fails to hilight python """Multiline string"" but '''Multiline
string''' (i'm using gedit2.5.91)

Just realized you put only two quotes at the end of the string in your first
comment, so I have to check.  Is this a typo?  If so, could you please post the
file which doesn't work correctly?

Thanks.
Comment 6 Benoît Dejean 2004-04-19 11:54:23 UTC
Created attachment 26810 [details]
Screenshot
Comment 7 Gustavo Giráldez 2004-04-20 01:39:43 UTC
Ok, I can reproduce now, thanks a lot.  Turns out this doesn't work when using a
locale other than C or english.  I'll investigate.  Changing the subject
accordingly.

I can't reopen the bug... seems I need to get some bugzilla power.  Could you
please reopen it for me?
Comment 8 Benoît Dejean 2004-04-20 02:18:55 UTC
my locale is fr_FR.UTF-8
Comment 9 Gustavo Giráldez 2004-04-20 02:44:02 UTC
Ok, this turned out to be yet another problem with pattern priority.  With
different locales, the result from gtk_text_tag_table_foreach() is different,
and thus the syntax_items list in GtkSourceBuffer is built differently.  Then,
in get_syntax_start() the list is searched in order, and in this case both a
simple string and a multi-line string match the beginning of a multi-line string.

Depending on bug 140097.  Should be automatically fixed when we get that one.
Comment 10 Paolo Maggi 2005-08-03 18:17:51 UTC
*** Bug 311660 has been marked as a duplicate of this bug. ***
Comment 11 Paolo Borelli 2006-04-04 17:15:03 UTC
*** Bug 337227 has been marked as a duplicate of this bug. ***
Comment 12 Nikos Kouremenos 2006-04-04 17:20:16 UTC
a sorry I did a look but couldn't find it :(

I copy my pbatic strings that differ from the above reported:

'''prints 'chat' type messages'''
'''Someone's broken this'''
Comment 13 Steve Frécinaux 2006-06-06 17:15:20 UTC
*** Bug 344038 has been marked as a duplicate of this bug. ***
Comment 14 Steve Frécinaux 2006-06-22 12:57:38 UTC
*** Bug 345647 has been marked as a duplicate of this bug. ***
Comment 15 Andrew Conkling 2006-07-16 20:52:40 UTC
(In reply to comment #7)
> Ok, I can reproduce now, thanks a lot.  Turns out this doesn't work when using a
> locale other than C or english.

FWIW, nud_, muntyan, and I (in #gedit on IRC) were able to reproduce this problem with en_US.UTF-8 and en_GB.UTF-8.
Comment 16 Steve Frécinaux 2006-07-16 21:34:56 UTC
Precisely, we were able to reproduce it with '''foo''' type string but not with """foo""" ones.
Comment 17 Paolo Maggi 2006-07-26 09:41:11 UTC
We could try to write a simple hacky solution with the current engine waiting for a real solution with the new hl engine.
Comment 18 Paolo Maggi 2006-12-11 12:14:39 UTC
*** Bug 372045 has been marked as a duplicate of this bug. ***
Comment 19 Steve Frécinaux 2007-07-05 11:17:01 UTC
Is this bug still present with gsv HEAD ?
Comment 20 Yevgen Muntyan 2007-09-10 14:11:49 UTC
Works in Russian, and shouldn't happen at all, since we are using UTF8-aware pcre.