-
Notifications
You must be signed in to change notification settings - Fork 5k
Add language: LPC #7179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add language: LPC #7179
Conversation
|
Note to the maintainers: I was not able to write a heuristic that could handle |
|
This PR will close #7178 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review your regexes to ensure they run linearly and do not suffer from ReDoS... your lpc pattern definitely suffers from ReDoS.
Please also update your sample to only include real-world examples. Several of your samples are contrived just to validate the syntax highlighter. Additionally, the sample that is suppressed in the diff indicates it's too big for our needs so will need removing or reducing.
lildude
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being held back by the fact you have not addressed the feedback about the vulnerable regexes in the heuristics.
|
ReDos has been addressed. Also replaced samples as requested. @lildude I still need advice on |
lildude
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your regexes are still vulnerable to ReDoS.
@lildude I still need advice on
samples/c/nightmare.h. Remove LPC from the.hextension?
Whooops. Sorry I missed that. If you can't write a heuristic that only matches LPC, then it's best to leave it off. We fought for years trying to find the compromise we currently have, and even have it documented in our troubleshooting guide.
The same applies for your .c heuristic - it need to 100% only match LPC as I don't want to get into a similar battle with C.
The regexes also need to be safe from ReDos and RE2 compatible.
|
Thanks @lildude. Let me know... |
Description
This PR adds syntax highlighting for the LPC language, a C-like language used in MUD drivers such as LDMud and FluffOS.
Checklist:
Note: While this search does show widespread use of LPC, it understates the popularity of the language. The nature of most mudlibs is such that they are stored in private repos.
#ffb100