[Kbabel] highlighting - first draft

Marco Wegner dubbleu@web.de
Thu, 28 Nov 2002 15:46:45 +0100


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 26 November 2002 12:29, Stanislav Visnovsky wrote:
> On Mon, 25 Nov 2002, Marco Wegner wrote:
[...]
> > No, I haven't. I only know that I like the look of the highlighting as it
> > is done in Kate. Therefore I thought I could try something like that...
> > I'll give it a try and then we'll see.
>
> So, why not to use the kate highlighting stuff? (Just a quick idea, no
> serious thinking about it.)

One point is that Kate's highlighting system is IMHO much too complicated for
our purpose since it is designed for so many different languages/file types.
For KBabel's highlighting I needed merely a hundred lines of code - including
lots of comments and blank lines...

The other point is that several features are missing there: entities are not
supported, as well as C-Format and masked characters. Errors are not reported
as well (in terms of a different colour).

Well, and the regexp for checking for tags is
   <\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*
Not exactly complete. Oh and I just see, there is even a bug in it: no spaces
are allowed between '<' and '/' IIRC - and I have read the docs from W3.org 
;-)

Marco

- --
Marco Wegner <mail@marcowegner.de>, <dubbleu@web.de>
Contributing to KBabel http://i18n.kde.org/tools/kbabel
   and kde-i18n-de http://i18n.kde.org/teams/de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE95ixeX3rotM03gSgRAhwOAJsEBZ8JKBUrp7mXQ4g1G6KGvLGPnQCaAwhQ
W0JH9j2XyY8B6tAEZqj9Uuc=
=RbE8
-----END PGP SIGNATURE-----