Closed JLWFuQrioea69ugsykvQcg closed 6 years ago
Ok so I thought I figured it out but not so much. I want it to identify the comment in a line with other code and mark it as a comment only if it's followed by a ";". How would I do that?
Ok I think I solved my issue using an "or" with a positive lookbehind looking for a ";". This is my syntax: "(^[\s%]\*)|(?<=;)[\s%]\*" It seems to work everywhere I checked it and not mess up other highlighting.
The "line_comment_string" works as intended when the comment is on it's own line with nothing preceding it. How would I modify the syntax below to accommodate scenarios where the comment occurs within a data step, etc. and follows valid code? I've attached a sample below where "test comment 1" highlights correctly, but "test comment 2" which follows the set statement does not. The SAS code works as intended but he highlighting does not flag it. I know I can move all my comments to their own line but this isn't always ideal depending on the comment and formatting.