-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
clojure-find-ns breaks if the ns form is preceded by whitespace #593
Comments
…eded by ws Problem was that the regexp here expected (ns form to start right in the beginning of the line. I added zero or more whitespace in the beginning which corrects the issue. Adds also a unit test which covers the issue.
I tried to fix this issue by altering the regex to allow whitespace before the ns form. However, @yuhan0 quickly pointed out that this approach may cause unexpected behaviour when ns form is inside a comment block for example. For example
|
How relevant is this problem? What if the buffer contained the following:
note the lack of whitespace. |
See clojure-emacs/cider#3009
Expected behavior
clojure-find-ns
should handle properly anns
form with preceding whitespace.Actual behavior
It returns
nil
.Steps to reproduce the problem
Try evaluating the
defn
form.Environment & Version information
clojure-mode version
Emacs version
26.3
Operating system
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: