Skip to content
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

The RemoveComments method has a bug and is not friendly to input with regular expressions. #140

Open
MrLi2018 opened this issue May 23, 2023 · 1 comment
Labels

Comments

@MrLi2018
Copy link

Hello, sorry to interrupt, please help make sure this is a problem.
@tangrammer @turbanoff @obourgain @sinaa @thjaeckle
Original Script:
var summary_rep = /.(xlgei-0/\d/\d/\d\d)./;
var summary_str=summary.match(summary_rep)[1];
summary_str=summary_str.replace(///g,"-");
return summary_str

Script after the RemoveComments method is invoked:
var summary_rep = /.(xlgei-0/\d/\d/\d\d)./;
var summary_str = summary.match(summary_rep)[1];
summary_str = summary_str.replace(/\ return summary_str;

@mxro mxro added the bug label May 26, 2023
@mxro
Copy link
Collaborator

mxro commented May 26, 2023

Thank you for reporting this issue. That's a tricky one.

For reference, the source to remove comments is here: https://github.com/javadelight/delight-nashorn-sandbox/blob/master/src/main/java/delight/nashornsandbox/internal/RemoveComments.java#L12

If anyone got any good ideas how this could be achieved, please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants