text highlighting nested languages?

SyntaxEditor for Windows Forms Forum

Posted 14 years ago by GavinK151
Avatar
hi guys,

I have altered the HTML xml language definition file to add a new set of tags that get highlighted. This works fine unless these tags appear within an existing HTML tag. so for example this gets highlighted fine:

<mytag>

something

</mytag>
but if I have:

<input type="text" id="<mytag>something</mytag>"/>
Then <mytag>something</mytag> does NOT get highlighted (unless I remove the opening html <.

I see the same behaviour in the sample app with <% %> asp tags.


Is there anyway to get round this issue?

thanks!!

[Modified at 02/08/2006 10:09 AM]

Comments (1)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
The lexical parser is greedy so once it starts matching a pattern, it doesn't break until it finds the end of the pattern. To support things how you want, you need to make the contents of the string attributes break on '<' characters. Then you probably need to add the tag state as a child state of strings.


Actipro Software Support

The latest build of this product (v2020.1 build 0400) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.