[Kbabel] Re: Highlighting

Marco Wegner dubbleu@web.de
Wed, 16 Oct 2002 18:13:05 +0200


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

On Wednesday 16 October 2002 11:58, Stanislav Visnovsky wrote:
> On Mon, 14 Oct 2002, Marco Wegner wrote:
> > For instance a tag where the name starts with a number (e.g. <0tagnam=
e>)
> > is invalid. I could easily check for this before highlighting. But th=
is
> > should not be done by the highlighter (quoting Stanislav: "IMHO the
> > syntax highlighter should simply color the text, not doing any tests.=
").
> > So how much testing should I do? Therefore my question whether simply=
 to
> > check for "<.*>" and "&.*;" and leave the rest to validation in
> > CatManListItem.
>
> IMHO syntax highlighter should be as precise as it can get using regula=
r
> expressions, but not more than that :-)). Of course, the best way to
> would be to highlight exactly the same stuff as the validation does, bu=
t
> it is not always possible to do that (to keep it in regular expressions=
).

Which means that only valid format should be highlighted then, correct? O=
kay,
now I think I know in which direction to go... ;-)

> Maybe we can reuse xml.xml definition of Kate highlighter.

Not so sure we should do that. There's no support for entities, C-Format =
or
masked charachters there... And the testing for tags is quite basic IMHO.

Marco

- --
mail@marcowegner.de
dubbleu@web.de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1-cvs (GNU/Linux)

iD8DBQE9rZAZX3rotM03gSgRAgycAKCz1qg9ncuOfYiMU75XiBccYFnEwACfXInL
pG3UmmVuWdK273WTjT0prAA=3D
=3DzqPs
-----END PGP SIGNATURE-----