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.
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.
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.
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... |
lildude
left a comment
There was a problem hiding this comment.
We need tests for your heuristics and a search query for the .h extension in the PR template too.
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