icsharpcode/AvalonEdit

Problem with syntax highlighting

Closed this issue · 5 comments

Hi. I have this syntax highlighting:
https://pastebin.com/4g7EzCPp
There is a problem about command.
It's working pretty good normally:
obraz
But if there is another highlighting's object, it doesn't override it and doesn't work.
obraz
And, one more thing. I have this:

<Span foreground="#41bbe2">
	<Begin>&lt;#</Begin>
	<End>&gt;</End>
</Span>

Why the hash doesn't work? Like... Highlighting doesn't care about it.
obraz
It should only highlight the second example.

Why the hash doesn't work?

regex uses # to denote comments.

regex uses # to denote comments.

Ah, okay. Fixed it.

Oh. The first part works now when i fixed the "<#>". Thanks!

Oh. No.
obraz
So now I just need to override the ""

I replaced the regex with this:

<Span color="Command">
	<Begin>command \u0020/</Begin>
	<End>:</End>
</Span>

It works. If I will have any problems,, i'll write.