Spell checking does not correctly work

Bug #789051 reported by itsols
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: gedit

I use GEdit for PHP development.
On a single page, I'm looking at html, php and javascript, along with plain text like headings, paragraphs, etc.

The problem is that When I enable Auto spell checking only what I DON'T WANT TO CHECK gets checked. For example, html meta tags, meta descriptions and css class names are highlighted with a wavy line. But the plain text within html body are NOT highlighted.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gedit 2.30.3-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-28.50-generic 2.6.35.11
Uname: Linux 2.6.35-28-generic i686
Architecture: i386
Date: Fri May 27 15:16:42 2011
ExecutablePath: /usr/bin/gedit
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: gedit

Revision history for this message
itsols (itsols) wrote :
Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Cyril (ravat) wrote :

Hi

I found something. The file which determines php highlighting is /usr/share/gtksourceview-2.0/language-specs/php.lang.

In this file, in line 321, '<context id="php" class="no-spell-check">' seems to mean that all the edited script is unchecked, unless if the no-spell-check class is disabled (ex : strings have 'class-disabled="no-spell-check"'). But what is outside php code is not detected, thus can't have any class.

I think (but I'm really not an expert) it would be better to only uncheck what is actually php code, ie to switch of the no-spell-check for 'php' in line 321, and to switch on in line 291 for 'php-blocks'.

I'm not sure it's enough, but it works as I expect here.

I explained it here : <http://blog.cyril-ravat.fr/post/2011/08/26/Gedit%2C-spell-check-and-PHP-syntax>.

Changed in gedit (Ubuntu):
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.