When using the custom rules for a UOJ-based OJ problem I get this console log:
TypeError: Cannot read properties of undefined (reading 'parse')
at parse (content.js:49:6070)
at handleMessage (content.js:49:7106)
It seems that getParserByName('UOJProblemParser') returns undefined because the UOJProblemParser instance in parsers has .constructor.name === '_UOJProblemParser', which doesn't match the given parser name.
ESBuild appears to prefix classes with static members with an underscore. Fixed in 5458859e64208e80d0c1d5907356834702ee76fb, will be released soon. Thanks for reporting the issue!
When using the custom rules for a UOJ-based OJ problem I get this console log:
It seems that
getParserByName('UOJProblemParser')
returnsundefined
because the UOJProblemParser instance inparsers
has.constructor.name === '_UOJProblemParser'
, which doesn't match the given parser name.