so I've written some code which will give me two matching HTML tags, but using the brace matching code for reference, "BraceHighlight(p1,p2)" only works for 2 characters (as expected).
I attempted to do something like this
scintilla.BraceHighlight(tagPos1, tagPos2);for(int i = 0; i< tag.Length; i++){scintilla.BraceHighlight(tagPos1 + i, tagPos2 + 1 + i);}
This only highlights the last character of the tag, which is clearly because each time this method runs, it clears the previous brace highlighting.
Is there any alternative method for this? or would I have to create custom syntax highlighting?
I see no easy way around this.
There is no way to use brace matching to highlight entire words at a time -- only braces. You could try using your custom logic with indicators, however, to give you a brace matching like effect.
so I've written some code which will give me two matching HTML tags, but using the brace matching code for reference, "BraceHighlight(p1,p2)" only works for 2 characters (as expected). I attempted to do something like this
scintilla.BraceHighlight(tagPos1, tagPos2);
for(int i = 0; i< tag.Length; i++)
{
scintilla.BraceHighlight(tagPos1 + i, tagPos2 + 1 + i);
}
This only highlights the last character of the tag, which is clearly because each time this method runs, it clears the previous brace highlighting.
Is there any alternative method for this? or would I have to create custom syntax highlighting? I see no easy way around this.
Thanks in advance.