Closed
Description
Hey, I've got a syntax highlighting rule that should match the first word of each line like this:
<Rule color="CmdOrVar"> ^[+\-_a-zA-Z]([\w]*)?(\s|$) </Rule>
and it works when trying it on regexr:
But in the Editor it looks like this and it feels like it's deciding for each word instead of each line:
Metadata
Assignees
Labels
No labels
Activity
MathiasLui commentedon Mar 12, 2023
I have tried so long for different solutions for this as well as some other things and it feels impossible to do anything more with regex than just highlighting certain keywords, strings or comments...
Is there maybe a way to write my own logic for highlighting text, based on code instead of regex?
jimfoye commentedon Mar 12, 2023
You can derive a class from DocumentColorizingTransformer.
MathiasLui commentedon Mar 13, 2023
Thanks I'll try that!
MathiasLui commentedon Mar 14, 2023
Thanks, I managed to make that work, uglily, but it works