This project is read-only.

Custom "Tags" support for syntax highlighting?

Topics: Developer Forum, User Forum
Mar 9, 2015 at 2:40 PM
Edited Mar 9, 2015 at 2:41 PM
Im trying to figure out how to tell syntax highlighter to give custom style to custom tag. For example lets say we have some .css file like that:
body
{
    color: #000000;
    font-family: Arial;
    margin: 0px;
}
and we want to change it to:
body
{
    color: <$color01$>;
    font-family: Arial;
    margin: 0px;
}
so how to give some custom color/font/bgcolor/etc. to this <$color01$> "tag"?
It would be best to color anything between "<$" and "$>".
Apr 29, 2015 at 3:34 AM
The built-in CSS lexer doesn't recognize the '<$' or '$>' tokens and there is no way to augment the built-in lexer to do so. They come as-is. Not to fear though, you can create your own CSS lexer which does recognize those characters.

An explanation of "Custom Syntax Highlighting" is included in the documentation to the new ScintillaNET version hosted at its new home on GitHub:
https://github.com/jacobslusser/ScintillaNET.

Check it out and if you have additional questions you should use the GitHub repo because the CodePlex project is no longer being supported.


Jacob