-
Notifications
You must be signed in to change notification settings - Fork 41
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
Reporter doesn't highlight es6 arrow functions and popups don't always appear #61
Comments
thanks for the report, @Lokiem , are these two separate issues? |
They may be related, as the result of the regex match is used for the popover JS. The popover being cutoff is related to the container property of the popover function (Currently not set, so I would assume it's defaulting to it's parent, which looks to be .CodeMirror as it has a overflow:hidden), if that property is set to body then the cutoff is fixed, though linespacing on the popover is a little larger. I couldn't figure out what was causing the popover to irregularly not work, but I'm willing to assume it may have just been one of the tweaks I was making to get the other parts working. On running a clean plato, and just adding the small changes I've outlined I didn't have any issues with the popovers. |
Ok let me try out that regext - see if it catches all the functions. I want to see if I can reproduce the problem and the fix. Appreciate the feedback, @Lokiem I can't get to it for a while; however, if you manage to make a Pull request with the proposed changes I will happily pull it in. |
@Lokiem I updated the deps and am doing some testing |
@Lokiem the deps are updated again, I'm closing this but if it is still giving you problems lmk and I'll repoen |
The regex for the highlighter requires the format of non-es6 anonymous functions.
lib/assets/scripts/plato-file.js line 55, if the regex is changed to '(function\\s*)?(\\()[^()]*\\)' then it should cover old and new anonymous functions. (Not familiar with Github so don't know what I'm doing with making changes myself!)
Another bug in the report js appears to be the popups when hovering over highlighted function markers, if it's at the top of the code window then it's cut off, and it appears to be fairly irregular for what functions it actually shows up for in general.
The text was updated successfully, but these errors were encountered: