07-26-2016 12:47 PM
If you have experience with (Ruby) regular expressions, you can contribute. Or if you can think of other good code examples, you are welcome to give me links or comment on the issue over at GitHub.
08-01-2016 02:18 PM
I have a customized set of rules for SAS code using prism.js -- that's what we use for SAS code highlighting here on SAS communities. I'll be happy to supply that if you think it might help. It's regex-based, along with a CSS file for how to color.
08-01-2016 02:21 PM
That would be fantastic! I would definitely use it. Is it in a GitHub repository? If it isn't to be made public, you can email it to me.
08-01-2016 02:54 PM
08-01-2016 03:28 PM
Yes, mine has more stuff!
The prism-sas.js contains basic regex patterns that are matched in precedence order. It will match patterns from the top rule down to the bottom, and when it finds a match for the token it exits. If you write a rule that isn't getting hit, it's because the token is hitting some other rule first.
08-01-2016 05:24 PM
These look great! Thank you for sharing.
You should submit a pull request to Prism with these. They are big improvements upon what they already have, and other SAS+Prism users will benefit.