Top line is not highlighting keywords

SyntaxEditor for Windows Forms Forum

Posted 17 years ago by Marianne
Avatar
The top line of any file is not providing keyword highlighting. What would be the easiest way to troubleshoot this?

------------------------------- Marianne

Comments (5)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Is this showing up in our samples? I'm not seeing it happen.


Actipro Software Support

Posted 17 years ago by Marianne
Avatar
It's only happening in my application but I have no idea why. How should I troubleshoot this? It's almost as if the lexical parser doesn't start until line 2.

------------------------------- Marianne

Posted 17 years ago by Marianne
Avatar
It's not the entire first line, it only occurs on the first keyword if the keyword is at the very start of the document. Think I've isolated the problem. I'm still using dynamic languages and I have a lookbehind for all the keywords:
LookBehind="[^\.]"

I do this so that if a keyword is also part of a COM property like Object.Keyword, the keyword won't highlight. The problem is that it is attempting the lookbehind on the first character and then doesn't color the keyword. Is that clear?

------------------------------- Marianne

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I think I know what it is. In v3.1 our behavior for LookBehinds was incorrect when at the beginning of the document because we simply returned true in that case. There is a forum posting on that.

In v4.0 we enhanced the regex engine to allow zero-width assertions in LookBehind so now you would do the same thing like this (see the VB.NET example for a sample too):
LookBehind="^|[^\.]" 
That is saying allow it at the beginning of a document or not after a dot.


Actipro Software Support

Posted 17 years ago by Marianne
Avatar
Worked perfectly. Thanks.

------------------------------- Marianne

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.