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 120602 - highlighting is not correct after an apostrophe
highlighting is not correct after an apostrophe
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: General
unspecified
Other Windows
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
: 115300 131922 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-08-24 14:46 UTC by Mohammed Sameer
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mohammed Sameer 2003-08-24 14:46:02 UTC
Highlighting this piece of XML code isn't correct:

<?xml version="1.0" encoding="iso-8859-6"?>
<title>I'm </title>

the last </title> is highlighted, This shouldn't be ?

Version 0.5
Comment 1 Paolo Maggi 2004-01-02 10:16:51 UTC
*** Bug 115300 has been marked as a duplicate of this bug. ***
Comment 2 Paolo Maggi 2004-01-05 11:16:14 UTC
From bug #115300.

Gustavo wrote:

| I don't think we can do much to improve this situation, except maybe
| put end-at-line-end to TRUE in both string patterns.
| 
| For a complete and definitive solution, we will have to wait for the
| stack based highlighting engine.

For the moment, I will go for this "work around"
Comment 3 Paolo Maggi 2004-01-19 15:14:00 UTC
*** Bug 131922 has been marked as a duplicate of this bug. ***
Comment 4 Paolo Maggi 2004-01-19 15:15:13 UTC
Look at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=226215 too.

I have a patch that implements a simple workaround for this bug.
Comment 5 Paolo Maggi 2004-02-13 17:37:33 UTC
Fixed in CVS HEAD.

Gustavo: I've seen it was too late for 0.9.
I think we could do a 0.10 or 0.9.1 if we want some user feedback on
this fix.

Committed patch:

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtksourceview/ChangeLog,v
retrieving revision 1.147
diff -u -p -r1.147 ChangeLog
--- ChangeLog	12 Feb 2004 22:21:49 -0000	1.147
+++ ChangeLog	13 Feb 2004 17:36:47 -0000
@@ -1,3 +1,11 @@
+2004-02-13  Paolo Maggi  <paolo.maggi@polito.it>
+
+	* gtksourceview/language-specs/xml.lang:
+	* gtksourceview/language-specs/html.lang: fixed bug #120602 -
+	highlighting is not correct after an apostrophe. I'm not very happy
+	with the fix since it is a sort of workaround, but probably it is
the best
+	we can do with the current highlight engine.
+
 === gtksourceview 0.9.0 ===
 
 2004-02-12  Gustavo Giráldez  <gustavo.giraldez@gmx.net>
Index: gtksourceview/language-specs/html.lang
===================================================================
RCS file:
/cvs/gnome/gtksourceview/gtksourceview/language-specs/html.lang,v
retrieving revision 1.6
diff -u -p -r1.6 html.lang
--- gtksourceview/language-specs/html.lang	30 Dec 2003 16:24:04 -0000	1.6
+++ gtksourceview/language-specs/html.lang	13 Feb 2004 17:36:47 -0000
@@ -12,10 +12,9 @@
 		<end-regex>&gt;</end-regex>
 	</syntax-item>
 
-	<string _name="String" style ="String" end-at-line-end="FALSE">
-		<start-regex>&quot;</start-regex>
-		<end-regex>&quot;</end-regex>
-	</string>
+	<pattern-item _name="String" style="String">
+		<regex>(&quot;[^&lt;&quot;]*&quot;)</regex>
+	</pattern-item>
 
 	<pattern-item _name="Entity" style="Character">
 		<regex>&amp;[a-zA-Z]+;</regex>
Index: gtksourceview/language-specs/xml.lang
===================================================================
RCS file: /cvs/gnome/gtksourceview/gtksourceview/language-specs/xml.lang,v
retrieving revision 1.4
diff -u -p -r1.4 xml.lang
--- gtksourceview/language-specs/xml.lang	26 May 2003 14:50:09 -0000	1.4
+++ gtksourceview/language-specs/xml.lang	13 Feb 2004 17:36:47 -0000
@@ -12,17 +12,10 @@
 		<end-regex>&gt;</end-regex>
 	</syntax-item>
 
-	<string _name="String" style ="String" end-at-line-end="FALSE">
-		<start-regex>&quot;</start-regex>
-		<end-regex>&quot;</end-regex>
-	</string>
-
-	<string _name="String 2" style ="String" end-at-line-end="FALSE">
-		<start-regex>&apos;</start-regex>
-		<end-regex>&apos;</end-regex>
-	</string>
-
-
+	<pattern-item _name="String" style="String">
+	
<regex>(&quot;[^&lt;&quot;]*&quot;)|(&apos;[^&lt;&apos;]*&apos;)</regex>
+	</pattern-item>
+ 
 	<pattern-item _name="Entity" style="Keyword">
 		<regex>(&amp;|%)[a-zA-Z0-9#][a-zA-Z0-9]*;</regex>
 	</pattern-item>
Comment 6 Paolo Maggi 2004-02-13 17:39:57 UTC
Gustavo: I have not committed the patch in the new branch.
BTW, I think we could safely move all the fixes to HEAD in the new
branch just before moving it to HEAD.