I'm trying to color a simple string like "hello" with custom lexem and it doesn't seem to work. I know it can work because the SQL language built in highlights it just fine. Is there a way to view the resources for the SQL language to see how this is done? The problem with this one is that it highlights green but nearby text also highlights in some cases.
<syncfusion:Lexem StartText=""[\w]+"" IsRegex="True" ContainsEndText="False" IsMultiline="False" LexemType="Literals" FormatName="ReturnFormat"/>
Sorry I wasn't clear in my question. I want to color a string green IF it is enclosed by quotes.
So
"Hello" would be green
Hello would be black
I have it working now. It works without regular expression.
<syncfusion:Lexem StartText=""" EndText=""" ContainsEndText="False" IsMultiline="False" FormatName="ReturnFormat"/>
Well with this method brackets will not work. With this input the quoted value is correct but everything adjacent to the right of bracket value is colored.
hello"hello"hello[hello]hello
<syncfusion:FormatsCollection x:Key="CustomLanguage">
<syncfusion:EditFormats Foreground="Green" FormatName="ReturnFormat"/>
<syncfusion:EditFormats Foreground="Purple" FormatName="ValueFormat"/>
</syncfusion:FormatsCollection>
<syncfusion:LexemCollection x:Key="CustomLangaugeLexem">
<syncfusion:Lexem StartText=""" EndText=""" ContainsEndText="False" IsMultiline="False" FormatName="ReturnFormat"/>
<syncfusion:Lexem StartText="[" EndText="]" ContainsEndText="True" IsMultiline="False" FormatName="ValueFormat"/>
</syncfusion:LexemCollection>