kjs: accept non-breaking space

Harri Porten porten at froglogic.com
Tue Sep 30 18:25:36 CEST 2003


Hi,

here's a patch for kjs/lexer.cpp that turns non-breaking whitespace
characters into valid source code character.

The patch is trivial but I'm sure it has the potential to save quite some
time when debugging weird syntax errors :)

Harri.
-------------- next part --------------
cvs -f log -N -r1.55 lexer.cpp

RCS file: /home/kde/kdelibs/kjs/lexer.cpp,v
Working file: lexer.cpp
head: 1.55
branch:
locks: strict
access list:
keyword substitution: kv
total revisions: 63;	selected revisions: 1
description:
----------------------------
revision 1.55
date: 2003/09/30 14:24:53;  author: porten;  state: Exp;  lines: +1 -1
allow no-break space
=============================================================================
cvs -f diff -kk -bp -u -r1.54 -r1.55 lexer.cpp
Index: lexer.cpp
===================================================================
RCS file: /home/kde/kdelibs/kjs/lexer.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -b -p -u -r1.54 -r1.55
--- lexer.cpp	25 Apr 2003 04:53:15 -0000	1.54
+++ lexer.cpp	30 Sep 2003 14:24:53 -0000	1.55
@@ -569,7 +569,7 @@ int Lexer::lex()
 bool Lexer::isWhiteSpace(unsigned short c)
 {
   return (c == ' ' || c == '\t' ||
-          c == 0x0b || c == 0x0c);
+          c == 0x0b || c == 0x0c || c == 0xa0);
 }
 
 bool Lexer::isIdentLetter(unsigned short c)


More information about the Khtml-devel mailing list