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 339491 - PHP syntax highlighting is not working well using the heredoc way
PHP syntax highlighting is not working well using the heredoc way
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
1.6.x
Other All
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-23 19:32 UTC by azugaldia
Modified: 2007-08-25 13:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description azugaldia 2006-04-23 19:32:44 UTC
Please describe the problem:
Some texts inside a heredoc definition will confuse the highlighting, giving
wrong colors to the document.

I have found the problem writing XML definitions.

Steps to reproduce:
1. New document
2. Activate php syntax highlighting
3. Write this php code, for example:

echo <<< HTML
<?xml version="1.0" encoding="UTF-8"?>
HTML;


Actual results:
Colors are wrong

Expected results:
Right colors for the text, and for the rest of the code

Does this happen every time?
Yes

Other information:
The heredoc syntaxis is defined here:
http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc
Comment 1 Steve Frécinaux 2006-04-23 19:55:52 UTC
This syntax is not highlighted because of a limitation of the highlighting engine.
This bug is somewhat related to bug #323998.

Reassigning to gtksourceview since it belongs to the syntax highlighting stuff.
Comment 2 Sebastien Bacher 2006-05-06 22:26:50 UTC
Ubuntu bug about that: https://launchpad.net/products/gtksourceview/+bug/43182

"gEdit Incorrectly Highlights strings in Heredoc

http://img69.imageshack.us/img69/5664/geditbug3no.png

Within Heredoc string syntax, PHP can have both apostrophes (') and double quotes (") without the need for escaping them. View the attached image. If I have an apostrophe within heredoc (as an apostrophe, not syntacially), gEdit highlights the rest of the document as if it was in quote marks (highlights the remaining document pink).

This is very hard to describe. I am also unsure how it SHOULD highlight but the current way "
Comment 3 thelema 2007-06-15 16:14:18 UTC
proper heredoc processing available in php.lang attached to bug 341215
Comment 4 Paolo Borelli 2007-08-25 13:45:21 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.