-
Notifications
You must be signed in to change notification settings - Fork 588
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
[Regular Expressions] fix #332 and [Clojure] fix and add tests #333
Conversation
for some reason, pushing a context (using an empty match pattern) directly from the |
Hmm, I think we'll want to do this a different way since this could break if this syntax is embedded in another language (like it is with Clojure right now). I may have to dig in to the ST source and see what is causing the issue. |
that would be perfect ;) |
I think it is already broken for Clojure because Regular Expressions uses a push in main, and the Clojure syntax just includes the Regular Expressions main context, and there is no Unfortunately, the Clojure syntax doesn't have any tests, or I would have discovered it while developing my changes. (and it also shows how important it is to run all syntax tests before making a PR, not just the tests for the syntax being worked on.) Confirmed by checking the scopes in this example I modified from the first "hello world clojure" result in google:
so as it stands, I think we will need to make some changes to the Clojure syntax anyway? |
It looks like we can work around this ST3 bug by changing the Regular Expressions main context to:
instead of:
but it doesn't fix the Clojure syntax |
@wbond, in case it helps you investigate what is causing the bug in the ST source, I have logged an issue with the minimal steps required to repro here: sublimehq/sublime_text#1190 |
I've made a fix for Clojure and added tests :) I played around a bit in http://www.tryclj.com/ to learn enough Clojure in order to do so ;) |
94ee410
to
0a9b2fb
Compare
i.e. even if regex has unclosed parens
Excellent, thanks for figuring out how to fix this! |
fix #332