Page 1 of 1

Syntax definition Files

Posted: Fri Jul 26, 2002 11:46 am
by Jane
Hi,
I am using a content management system called Webgenz
I am currently trying to define a syntax file for the code.

What I need to happen is to highlight all areas where a [@ ... ] occurs.
The files also contain html code so I have based the syntax file on the standard HTML one.

At the moment I have used the alternate comment definition
eg
CommentStartAlt = [@
CommentEndAlt = ]

This works fine except where the macro is held with in a string.
eg
meta name="keywords" desc="[@keywords]"
does not highlight.
but
meta name="keywords" desc=[@keywords]
does

Does anyone have any bright ideas

Thanks in advance Jane.

Re: Syntax definition Files

Posted: Fri Jul 26, 2002 4:59 pm
by smhaus_net
Nothing can pick up something inside a String because the content inside a String in not part of the syntax, it is a value for that String.

If highlighting that is more important than colors for String quotes, consider just not highlighting the String. For most of HTML, the quotes are optional anyway.

Re: Syntax definition Files

Posted: Tue Aug 20, 2002 1:51 am
by chris
Have you tried using the single quote instead of the double quote ? Most of the time plain HTML does not really care if attribute values use single ' or double " quotes - just define those two differently and you will have what you want.

Regards,
CM