-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Scheme's number is missing lookbehind #702
Comments
Can you please provide examples that are not highlighted properly now and would be fixed with this change? |
The highlighting shows properly if you don't use the CSS classes for anything other than the default setup. The problem comes when you want to use the CSS class for something like drawing a box around the numbers on hover. This expression: (+ 3 4) generates this markup: (+ 3 4)
Single preceding spaces are included in the "token number" class spans because the regexp has a (\s|)) group at the beginning which matches a single space or close paren. Adding lookbehind: true fixes the problem. |
Thanks for reporting! 😉 |
Thanks for the timely fix! I fell asleep before I put in a better example, since GitHub stripped the HTML out of the one I gave. Guess you didn't need it :). |
I understood the problem when I saw the actual code ^^ |
Scheme's number def needs lookbehind: true -- it begins with a preceding space or close paren
The text was updated successfully, but these errors were encountered: